diff options
author | Rex Zhu <Rex.Zhu@amd.com> | 2017-09-04 16:25:48 +0800 |
---|---|---|
committer | Alex Deucher <alexander.deucher@amd.com> | 2017-09-18 23:30:31 -0400 |
commit | 1ab4720441ed6a918c06c4ddf882ef8bc50c8ef0 (patch) | |
tree | afd4fa643988471ef0e4b3a63ad2797b64a98a36 /drivers/gpu/drm/amd/powerplay/hwmgr/hardwaremanager.c | |
parent | 97bae49c44454549e7e22ef02020decafa099f04 (diff) | |
download | linux-1ab4720441ed6a918c06c4ddf882ef8bc50c8ef0.tar.gz linux-1ab4720441ed6a918c06c4ddf882ef8bc50c8ef0.tar.bz2 linux-1ab4720441ed6a918c06c4ddf882ef8bc50c8ef0.zip |
drm/amd/powerplay: refine code for thermal control in powerplay
add function point start_thermal_controller in hwmgr,
delete thermal function table and related functions
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Rex Zhu <Rex.Zhu@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'drivers/gpu/drm/amd/powerplay/hwmgr/hardwaremanager.c')
-rw-r--r-- | drivers/gpu/drm/amd/powerplay/hwmgr/hardwaremanager.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/drivers/gpu/drm/amd/powerplay/hwmgr/hardwaremanager.c b/drivers/gpu/drm/amd/powerplay/hwmgr/hardwaremanager.c index ce378bd21661..a3991c0dff2e 100644 --- a/drivers/gpu/drm/amd/powerplay/hwmgr/hardwaremanager.c +++ b/drivers/gpu/drm/amd/powerplay/hwmgr/hardwaremanager.c @@ -306,8 +306,10 @@ int phm_start_thermal_controller(struct pp_hwmgr *hwmgr, struct PP_TemperatureRa range.min = temperature_range->min; } if (phm_cap_enabled(hwmgr->platform_descriptor.platformCaps, - PHM_PlatformCaps_ThermalController)) - return phm_dispatch_table(hwmgr, &(hwmgr->start_thermal_controller), &range, NULL); + PHM_PlatformCaps_ThermalController) + && hwmgr->hwmgr_func->start_thermal_controller != NULL) + return hwmgr->hwmgr_func->start_thermal_controller(hwmgr, &range); + return 0; } |