Alex Deucher
aa22ae4b1f
drm/powerplay/hwmgr: log errors in tonga_hwmgr_backend_init
...
Helpful in debugging init issues.
Reviewed-by: Tom St Denis <tom.stdenis@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2015-12-21 16:42:55 -05:00
Alex Deucher
a71e06d972
drm/powerplay: add debugging output to processpptables.c
...
To help track down init errors.
Reviewed-by: Tom St Denis <tom.stdenis@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2015-12-21 16:42:55 -05:00
Alex Deucher
1d5498c23e
drm/powerplay: add debugging output to tonga_processpptables.c
...
To help track down init errors.
Reviewed-by: Tom St Denis <tom.stdenis@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2015-12-21 16:42:54 -05:00
Eric Yang
14f634110f
amd/powerplay: Add structures required to report configuration change
...
Add required structures for amd_powerplay_display_configuration_change
Signed-off-by: Eric Yang <eric.yang2@amd.com >
2015-12-21 16:42:54 -05:00
Vitaly Prosyak
1c9a90820b
amd/powerplay: Fix get dal power level
...
Simplify data struct for get dal power level
Signed-off-by: Vitaly Prosyak <vitaly.prosyak@amd.com >
2015-12-21 16:42:53 -05:00
Vitaly Prosyak
c4dd206be1
amd\powerplay Implement get dal power level
...
Implement get dal power level and simple clock info
Signed-off-by: Vitaly Prosyak <vitaly.prosyak@amd.com >
2015-12-21 16:42:52 -05:00
Rex Zhu
9c5f8de6ef
drm/amd/powerplay: display gpu load when print performance for tonga.
...
Reviewed-by: Alex Deucher <alexander.deucher@amd.com >
Reviewed-by: Jammy Zhou <Jammy.Zhou@amd.com >
Signed-off-by: Rex Zhu <Rex.Zhu@amd.com >
2015-12-21 16:42:52 -05:00
Rex Zhu
17c00a2fed
drm/amd/powerplay: move shared function of vi to hwmgr. (v2)
...
v2: agd: rebase on upstream
Reviewed-by: Alex Deucher <alexander.deucher@amd.com >
Signed-off-by: Rex Zhu <Rex.Zhu@amd.com >
2015-12-21 16:42:51 -05:00
kbuild test robot
195567e99b
drm/amd/powerplay: fix boolreturn.cocci warnings
...
drivers/gpu/drm/amd/amdgpu/../powerplay/hwmgr/ppatomctrl.c:475:10-11: WARNING: return of 0/1 in function 'atomctrl_lookup_gpio_pin' with return type bool
Return statements in functions returning bool should use
true/false instead of 1/0.
Generated by: scripts/coccinelle/misc/boolreturn.cocci
CC: yanyang1 <young.yang@amd.com >
Signed-off-by: Fengguang Wu <fengguang.wu@intel.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2015-12-21 16:42:49 -05:00
Eric Huang
db18ce397c
drm/amd/powerplay: add functions set/get_fan_control_mode in hwmgr for Fiji.
...
Reviewed-by: Alex Deucher <alexander.deucher@amd.com >
Signed-off-by: Eric Huang <JinHuiEric.Huang@amd.com >
2015-12-21 16:42:49 -05:00
Eric Huang
9dcfc1936a
drm/amd/powerplay: add functions set/get_fan_control_mode in hwmgr for Tonga.
...
Reviewed-by: Alex Deucher <alexander.deucher@amd.com >
Signed-off-by: Eric Huang <JinHuiEric.Huang@amd.com >
2015-12-21 16:42:48 -05:00
Eric Huang
7ae0a66134
drm/amd/powerplay: Fix a bug in fan control setting default mode for Tonga and Fiji.
...
Reviewed-by: Alex Deucher <alexander.deucher@amd.com >
Signed-off-by: Eric Huang <JinHuiEric.Huang@amd.com >
2015-12-21 16:42:48 -05:00
Eric Huang
601038142f
drm/amd/powerplay: Add thermal protection support for Fiji.
...
Reviewed-by: Alex Deucher <alexander.deucher@amd.com >
Signed-off-by: Eric Huang <JinHuiEric.Huang@amd.com >
2015-12-21 16:42:47 -05:00
Eric Huang
ea617bc9f9
drm/amd/powerplay: add display configeration changed function in hwmgr for Fiji.
...
Reviewed-by: Alex Deucher <alexander.deucher@amd.com >
Signed-off-by: Eric Huang <JinHuiEric.Huang@amd.com >
2015-12-21 16:42:47 -05:00
Eric Huang
91c4c98155
drm/amd/powerplay: add multimedia power gating support for Fiji.
...
Acked-by: Jammy Zhou <Jammy.Zhou@amd.com >
Acked-by: Christian König <christian.koenig@amd.com >
Reviewed-by: Alex Deucher <alexander.deucher@amd.com >
Signed-off-by: Eric Huang <JinHuiEric.Huang@amd.com >
2015-12-21 16:42:44 -05:00
David Rokhvarg
6bd48d2404
drm/amd/powerplay: Add PPLib debug print macro.
...
- The macro is silent by default.
- Use the macro to print Display Configuration - related changes.
Signed-off-by: David Rokhvarg <David.Rokhvarg@amd.com >
2015-12-21 16:42:42 -05:00
Rex Zhu
0f8b106e11
drm/amd/powerplay: enable/disable NB pstate feature for Carrizo.
...
Signed-off-by: Rex Zhu <Rex.Zhu@amd.com >
Signed-off-by: David Rokhvarg <David.Rokhvarg@amd.com >
Reviewed-by: Alex Deucher <alexander.deucher@amd.com >
Reviewed-by: Jammy Zhou <Jammy.Zhou@amd.com >
2015-12-21 16:42:42 -05:00
Rex Zhu
73afe62101
drm/amd/powerplay: enable set_cpu_power_state task. (v2)
...
v2: integrate Jammy's crash fix
Signed-off-by: Rex Zhu <Rex.Zhu@amd.com >
Reviewed-by: Alex Deucher <alexander.deucher@amd.com >
Reviewed-by: Jammy Zhou <Jammy.Zhou@amd.com >
2015-12-21 16:42:41 -05:00
Rex Zhu
7fb72a1fc0
drm/amd/powerplay: export interface to DAL to init/change display configuration.
...
Signed-off-by: Rex Zhu <Rex.Zhu@amd.com >
Signed-off-by: David Rokhvarg <David.Rokhvarg@amd.com >
Reviewed-by: Alex Deucher <alexander.deucher@amd.com >
Reviewed-by: Jammy Zhou <Jammy.Zhou@amd.com >
2015-12-21 16:42:41 -05:00
Rex Zhu
aceae1bfd9
drm/amd/powerplay: add smc msg for NB P-State switch
...
Signed-off-by: Rex Zhu <Rex.Zhu@amd.com >
Signed-off-by: David Rokhvarg <David.Rokhvarg@amd.com >
Reviewed-by: Alex Deucher <alexander.deucher@amd.com >
Reviewed-by: Jammy Zhou <Jammy.Zhou@amd.com >
2015-12-21 16:42:40 -05:00
Rex Zhu
73c9f22288
drm/amd/powerplay: add new function point in hwmgr.
...
1. for set_cpu_power_state
2. restore display configuration
Signed-off-by: Rex Zhu <Rex.Zhu@amd.com >
Reviewed-by: Alex Deucher <alexander.deucher@amd.com >
Reviewed-by: Jammy Zhou <Jammy.Zhou@amd.com >
2015-12-21 16:42:40 -05:00
Rex Zhu
c9fe74e68b
drm/amd/powerplay: fix warning of cast to pointer from integer of different size.
...
Signed-off-by: Rex Zhu <Rex.Zhu@amd.com >
Reviewed-by: Alex Deucher <alexander.deucher@amd.com >
2015-12-21 16:42:39 -05:00
rezhu
09b7a98622
drm/amd/powerplay: fix warning of cast to pointer from integer of different size.
...
Signed-off-by: Rex Zhu <Rex.Zhu@amd.com >
Reviewed-by: Alex Deucher <alexander.deucher@amd.com >
2015-12-21 16:42:38 -05:00
Alex Deucher
9c0bad9074
drm/amd/powerplay: implement smc state upload for CZ
...
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2015-12-21 16:42:38 -05:00
Alex Deucher
d39d5c2c9d
drm/amd/powerplay: add atomctrl function to calculate CZ sclk dividers
...
Use atombios to calculate the values.
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2015-12-21 16:42:37 -05:00
Eric Huang
92b05d827d
drm/amd/powerplay: enable clock gating for Fiji.
...
Reviewed-by: Alex Deucher <alexander.deucher@amd.com >
Reviewed-by: Jammy Zhou <Jammy.Zhou@amd.com >
Signed-off-by: Eric Huang <JinHuiEric.Huang@amd.com >
2015-12-21 16:42:37 -05:00
Alex Deucher
0104aa21a9
drm/amd/powerplay/tonga: Add UVD DPM init
...
Load the UVD DPM state into the SMC.
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2015-12-21 16:42:34 -05:00
Alex Deucher
464cea3e35
drm/amdgpu/powerplay/fiji: query supported pcie info from cgs (v2)
...
Rather than hardcode it.
v2: integrate spc fix from Rex
Reviewed-by: Jammy Zhou <Jammy.Zhou@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2015-12-21 16:42:33 -05:00
Alex Deucher
834b694cc3
drm/amdgpu/powerplay/tonga: query supported pcie info from cgs (v2)
...
Rather than hardcode it.
v2: integrate spc fix from Rex
Reviewed-by: Jammy Zhou <Jammy.Zhou@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2015-12-21 16:42:33 -05:00
Alex Deucher
16881da6c0
drm/amdgpu: extract pcie helpers to common header
...
These will be used by multiple powerplay drivers and
other IP modules.
Reviewed-by: Jammy Zhou <Jammy.Zhou@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2015-12-21 16:42:30 -05:00
Alex Deucher
74c577b031
drm/amd/powerplay/fiji: enable pcie and mclk forcing for low
...
When forcing the lowest state also force mclk and pcie.
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2015-12-21 16:42:30 -05:00
Alex Deucher
9fe1837d18
drm/amd/powerplay/tonga: enable pcie and mclk forcing for low
...
When forcing the lowest state also force mclk and pcie.
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2015-12-21 16:42:29 -05:00
Rex Zhu
f4caf3e584
drm/amd/powerplay: refine the logic of whether need to update power state.
...
Better handle power state changes.
Signed-off-by: Rex Zhu <Rex.Zhu@amd.com >
Reviewed-by: Alex Deucher <alexander.deucher@amd.com >
Reviewed-by: Jammy Zhou <Jammy.Zhou@amd.com >
2015-12-21 16:42:29 -05:00
Rex Zhu
e829ecdb15
drm/amd/powerplay: implement new funcs to check current states for tonga.
...
Implement the new callbacks for tonga.
Signed-off-by: Rex Zhu <Rex.Zhu@amd.com >
Reviewed-by: Alex Deucher <alexander.deucher@amd.com >
Reviewed-by: Jammy Zhou <Jammy.Zhou@amd.com >
2015-12-21 16:42:28 -05:00
Rex Zhu
09b4c872fe
drm/amd/powerplay: add and export hwmgr interface to eventmgr to check hw states.
...
Interface between hwmgr and eventmgr.
Signed-off-by: Rex Zhu <Rex.Zhu@amd.com >
Reviewed-by: Alex Deucher <alexander.deucher@amd.com >
Reviewed-by: Jammy Zhou <Jammy.Zhou@amd.com >
2015-12-21 16:42:28 -05:00
Rex Zhu
cac9a19919
drm/amdgpu/powerplay: implement fan control interface in amd_powerplay_funcs
...
This adds the interface needed to expose powerplay fan control to sysfs
via hwmon.
Signed-off-by: Rex Zhu <Rex.Zhu@amd.com >
Reviewed-by: Jammy Zhou <Jammy.Zhou@amd.com >
Reviewed-by: Alex Deucher <alexander.deucher@amd.com >
2015-12-21 16:42:26 -05:00
Rex Zhu
1e4854e96c
drm/amdgpu/powerplay: implement thermal control for tonga.
...
Implement thermal and fan control for tonga.
Signed-off-by: Rex Zhu <Rex.Zhu@amd.com >
Reviewed-by: Jammy Zhou <Jammy.Zhou@amd.com >
Reviewed-by: Alex Deucher <alexander.deucher@amd.com >
2015-12-21 16:42:25 -05:00
Rex Zhu
2dfea9cd1f
drm/amdgpu/powerplay: enable thermal interrupt task in eventmgr.
...
Add thermal handling to the event manager.
Signed-off-by: Rex Zhu <Rex.Zhu@amd.com >
Reviewed-by: Jammy Zhou <Jammy.Zhou@amd.com >
Reviewed-by: Alex Deucher <alexander.deucher@amd.com >
2015-12-21 16:42:25 -05:00
Rex Zhu
fba4eef584
drm/amdgpu/powerplay: add thermal control interface in hwmgr.
...
Thermal controller interface.
Signed-off-by: Rex Zhu <Rex.Zhu@amd.com >
Reviewed-by: Jammy Zhou <Jammy.Zhou@amd.com >
Reviewed-by: Alex Deucher <alexander.deucher@amd.com >
2015-12-21 16:42:24 -05:00
Rex Zhu
251bb34fa4
drm/amdgpu/powerplay: mv ppinterrupt.h to inc folder to share with other submodule.
...
Redefine interrupt callback function in accordance with cgs.
Signed-off-by: Rex Zhu <Rex.Zhu@amd.com >
Reviewed-by: Jammy Zhou <Jammy.Zhou@amd.com >
Reviewed-by: Alex Deucher <alexander.deucher@amd.com >
2015-12-21 16:42:24 -05:00
Rex Zhu
c28eae26b5
drm/amdgpu/powerplay: add new function point in hwmgr_funcs for thermal control
...
Add the interface for fan and thermal control.
Signed-off-by: Rex Zhu <Rex.Zhu@amd.com >
Reviewed-by: Jammy Zhou <Jammy.Zhou@amd.com >
Reviewed-by: Alex Deucher <alexander.deucher@amd.com >
2015-12-21 16:42:23 -05:00
Rex Zhu
0859ed3db9
drm/amd/powerplay: Add CG and PG support for tonga
...
Implement clock and power gating support for tonga. On Tonga
this is handles by the SMU rather than direct register settings
in the driver.
Signed-off-by: Rex Zhu <Rex.Zhu@amd.com >
Reviewed-by: Jammy Zhou <Jammy.Zhou@amd.com >
Reviewed-by: Alex Deucher <alexander.deucher@amd.com >
2015-12-21 16:42:23 -05:00
Rex Zhu
b1132013ce
drm/amd/powerplay: add new function point in hwmgr_func for CG/PG.
...
Add callbacks interface for clock and powergating.
Signed-off-by: Rex Zhu <Rex.Zhu@amd.com >
Reviewed-by: Jammy Zhou <Jammy.Zhou@amd.com >
Reviewed-by: Alex Deucher <alexander.deucher@amd.com >
2015-12-21 16:42:22 -05:00
Rex Zhu
3cec76f973
drm/amdgpu/powerplay: add some definition for other ip block to update cg pg.
...
Interface for clock and power gating handling.
Signed-off-by: Rex Zhu <Rex.Zhu@amd.com >
Reviewed-by: Jammy Zhou <Jammy.Zhou@amd.com >
Reviewed-by: Alex Deucher <alexander.deucher@amd.com >
2015-12-21 16:42:22 -05:00
Rex Zhu
bbb207f3da
drm/amdgpu/powerplay: program display gap for tonga.
...
Implement displaygap programming for tonga. This is
required for properly mclk switching.
Signed-off-by: Rex Zhu <Rex.Zhu@amd.com >
Reviewed-by: Jammy Zhou <Jammy.Zhou@amd.com >
Reviewed-by: Alex Deucher <alexander.deucher@amd.com >
2015-12-21 16:42:20 -05:00
Rex Zhu
2f4afc5733
drm/amdgpu/powerplay: implement pem_task for display_configuration_change
...
Add support for display configuration changes to the event manager.
Signed-off-by: Rex Zhu <Rex.Zhu@amd.com >
Reviewed-by: Jammy Zhou <Jammy.Zhou@amd.com >
Reviewed-by: Alex Deucher <alexander.deucher@amd.com >
2015-12-21 16:42:19 -05:00
Rex Zhu
6f3bf7474c
drm/amdgpu/poweprlay: export program display gap function to eventmgr
...
This allows the eventmgr to properly update the displaygap on
certain power events.
Signed-off-by: Rex Zhu <Rex.Zhu@amd.com >
Reviewed-by: Jammy Zhou <Jammy.Zhou@amd.com >
Reviewed-by: Alex Deucher <alexander.deucher@amd.com >
2015-12-21 16:42:19 -05:00
Rex Zhu
e8c7de5bf6
drm/amdgpu/powerplay: add function point in hwmgr_funcs for program display gap
...
Displaygap support is required for proper mclk switching.
Signed-off-by: Rex Zhu <Rex.Zhu@amd.com >
Reviewed-by: Jammy Zhou <Jammy.Zhou@amd.com >
Reviewed-by: Alex Deucher <alexander.deucher@amd.com >
2015-12-21 16:42:18 -05:00
Eric Huang
aabcb7c11e
drm/amd/powerplay: add Fiji DPM support.
...
This enabled DPM support for Fiji. DPM is dynamic
clock and voltage scaling.
v2: rename fiji_hwmgr_early_init to fiji_hwmgr_init
v3: (agd) fold in endian fix, additional function addition
Reviewed-by: Alex Deucher <alexander.deucher@amd.com >
Signed-off-by: Eric Huang <JinHuiEric.Huang@amd.com >
2015-12-21 16:42:17 -05:00
Eric Huang
74785623db
drm/amd/powerplay: add Fiji SMU support.
...
Add support for the SMU manager for Fiji. This handles the
firmware loading for other IP blocks (GFX, SDMA, etc.).
Reviewed-by: Alex Deucher <alexander.deucher@amd.com >
Signed-off-by: Eric Huang <JinHuiEric.Huang@amd.com >
2015-12-21 16:42:16 -05:00