summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/amd/powerplay/hwmgr/smu10_hwmgr.c
diff options
context:
space:
mode:
authorMikita Lipski2018-04-11 22:25:26 +0200
committerAlex Deucher2018-05-15 20:43:21 +0200
commit5c3517d0c2ead443f378173c698f3bd09cb89d72 (patch)
tree04f3c7e2af7153332c0ae8177a1a7244aa78f052 /drivers/gpu/drm/amd/powerplay/hwmgr/smu10_hwmgr.c
parentdrm/amd/pp: Adding set_watermarks_for_clocks_ranges for SMU10 (diff)
downloadkernel-qcow2-linux-5c3517d0c2ead443f378173c698f3bd09cb89d72.tar.gz
kernel-qcow2-linux-5c3517d0c2ead443f378173c698f3bd09cb89d72.tar.xz
kernel-qcow2-linux-5c3517d0c2ead443f378173c698f3bd09cb89d72.zip
drm/amd/pp: Adding a function to store cc6 data in SMU10
Filling the smu10_store_cc6_data based on the implementation of Windows Powerplay. There is an uncertainty with one of the parameters passed to the function pstate_switch_disable - is not a part of smu10 private data structure. So in the function its just ignored. Signed-off-by: Mikita Lipski <mikita.lipski@amd.com> Reviewed-by: Rex Zhu <Rex.Zhu@amd.com> Acked-by: Alex Deucher <alexander.deucher@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'drivers/gpu/drm/amd/powerplay/hwmgr/smu10_hwmgr.c')
-rw-r--r--drivers/gpu/drm/amd/powerplay/hwmgr/smu10_hwmgr.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/drivers/gpu/drm/amd/powerplay/hwmgr/smu10_hwmgr.c b/drivers/gpu/drm/amd/powerplay/hwmgr/smu10_hwmgr.c
index b712d16a9e6f..0f252265a753 100644
--- a/drivers/gpu/drm/amd/powerplay/hwmgr/smu10_hwmgr.c
+++ b/drivers/gpu/drm/amd/powerplay/hwmgr/smu10_hwmgr.c
@@ -699,6 +699,16 @@ static int smu10_set_cpu_power_state(struct pp_hwmgr *hwmgr)
static int smu10_store_cc6_data(struct pp_hwmgr *hwmgr, uint32_t separation_time,
bool cc6_disable, bool pstate_disable, bool pstate_switch_disable)
{
+ struct smu10_hwmgr *data = (struct smu10_hwmgr *)(hwmgr->backend);
+
+ if (separation_time != data->separation_time ||
+ cc6_disable != data->cc6_disable ||
+ pstate_disable != data->pstate_disable) {
+ data->separation_time = separation_time;
+ data->cc6_disable = cc6_disable;
+ data->pstate_disable = pstate_disable;
+ data->cc6_setting_changed = true;
+ }
return 0;
}