summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/amd/powerplay/navi10_ppt.c
diff options
context:
space:
mode:
authorKevin Wang <kevin1.wang@amd.com>2019-06-21 11:26:18 -0500
committerAlex Deucher <alexander.deucher@amd.com>2019-06-21 18:59:30 -0500
commit564c4c7f00266a92fd3521983164b1014e6bc7e9 (patch)
tree515e5b2a12f9da76ce95c8d5750f3fa7c61884ad /drivers/gpu/drm/amd/powerplay/navi10_ppt.c
parentd573bb214dd2578f7a09c116c3ea9bf99cb4d4fd (diff)
downloadlinux-564c4c7f00266a92fd3521983164b1014e6bc7e9.tar.bz2
drm/amd/powerplay: simplify the interface of get_gpu_power
this callback function is only call in read_sensor in smu_v11_0.c, so move this code to {asic}_ppt.c to implement as asic related function. Signed-off-by: Kevin Wang <kevin1.wang@amd.com> Reviewed-by: Huang Rui <ray.huang@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'drivers/gpu/drm/amd/powerplay/navi10_ppt.c')
-rw-r--r--drivers/gpu/drm/amd/powerplay/navi10_ppt.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/drivers/gpu/drm/amd/powerplay/navi10_ppt.c b/drivers/gpu/drm/amd/powerplay/navi10_ppt.c
index 376ea5289646..f9bfcaa73f7e 100644
--- a/drivers/gpu/drm/amd/powerplay/navi10_ppt.c
+++ b/drivers/gpu/drm/amd/powerplay/navi10_ppt.c
@@ -1195,6 +1195,10 @@ static int navi10_read_sensor(struct smu_context *smu,
ret = navi10_get_current_activity_percent(smu, (uint32_t *)data);
*size = 4;
break;
+ case AMDGPU_PP_SENSOR_GPU_POWER:
+ ret = navi10_get_gpu_power(smu, (uint32_t *)data);
+ *size = 4;
+ break;
default:
return -EINVAL;
}
@@ -1227,7 +1231,6 @@ static const struct pptable_funcs navi10_ppt_funcs = {
.notify_smc_dispaly_config = navi10_notify_smc_dispaly_config,
.force_dpm_limit_value = navi10_force_dpm_limit_value,
.unforce_dpm_levels = navi10_unforce_dpm_levels,
- .get_gpu_power = navi10_get_gpu_power,
.is_dpm_running = navi10_is_dpm_running,
.set_thermal_fan_table = navi10_set_thermal_fan_table,
.get_fan_speed_percent = navi10_get_fan_speed_percent,