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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
3ec2cdb85f
drm/amd/powerplay: update atomctrl for fiji
...
Add some new functions to support Fiji. Split out
from the previous patch.
Reviewed-by: Jammy Zhou <Jammy.Zhou@amd.com >
Signed-off-by: Eric Huang <JinHuiEric.Huang@amd.com >
2015-12-21 16:42:16 -05:00
770911a3cf
drm/amd/powerplay: add/update headers for Fiji SMU and DPM
...
New headers for Fiji.
Reviewed-by: Jammy Zhou <Jammy.Zhou@amd.com >
Signed-off-by: Eric Huang <JinHuiEric.Huang@amd.com >
2015-12-21 16:42:15 -05:00
c82baa2818
drm/amd/powerplay: add Tonga dpm support (v3)
...
This implements DPM for tonga. DPM handles dynamic
clock and voltage scaling.
v2: merge all the patches related with tonga dpm
v3: merge dpm force level fix, cgs display fix, spelling fix
Reviewed-by: Alex Deucher <alexander.deucher@amd.com >
Reviewed-by: Jammy Zhou <Jammy.Zhou@amd.com >
Signed-off-by: yanyang1 <young.yang@amd.com >
Signed-off-by: Rex Zhu <Rex.Zhu@amd.com >
Signed-off-by: Eric Huang <JinHuiEric.Huang@amd.com >
2015-12-21 16:42:15 -05:00
1060029fae
drm/amd/powerplay: Add Tonga SMU support
...
The SMU manager handles firmware loading for other IP
blocks (GFX, SDMA, etc.). This implements it for Tonga.
v3: delete peci sub-module
v2: use cgs interface directly
Signed-off-by: Young Yang <Young.Yang@amd.com >
Signed-off-by: Jammy Zhou <Jammy.Zhou@amd.com >
Reviewed-by: Alex Deucher <alexander.deucher@amd.com >
2015-12-21 16:42:14 -05:00
306d8db3e7
drm/amd/powerplay: add header file for tonga smu and dpm
...
These headers provide the SMU interface used by the driver.
Reviewed-by: Alex Deucher <alexander.deucher@amd.com >
Signed-off-by: yanyang1 <young.yang@amd.com >
2015-12-21 16:42:14 -05:00
7ff1d70a40
drm/amd/powerplay: Move smu7*.h from amdgpu to powerplay.
...
Move smu7.h, smu7_discrete.h and smu7_fusion.h from amdgpu to powerplay.
Reviewed-by: Alex Deucher <alexander.deucher@amd.com >
Signed-off-by: yanyang1 <young.yang@amd.com >
2015-12-21 16:42:13 -05:00