diff options
author | Rex Zhu <Rex.Zhu@amd.com> | 2015-12-29 06:22:34 +0300 |
---|---|---|
committer | Alex Deucher <alexander.deucher@amd.com> | 2016-01-08 23:39:27 +0300 |
commit | e1d32e607b5ce25a7852bef4ab4de2a80f30c546 (patch) | |
tree | f40273d902b5237b924228e235206fc46868f67f /drivers/gpu/drm/amd/powerplay/hwmgr | |
parent | 018462d015c5672de0be8045b1acff19f5df6010 (diff) | |
download | linux-e1d32e607b5ce25a7852bef4ab4de2a80f30c546.tar.xz |
drm/amd/powerplay: enable power down asic task. (v2)
v2: AGD: rebase on upstream
Signed-off-by: Rex Zhu <Rex.Zhu@amd.com>
Reviewed-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')
-rw-r--r-- | drivers/gpu/drm/amd/powerplay/hwmgr/hardwaremanager.c | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/drivers/gpu/drm/amd/powerplay/hwmgr/hardwaremanager.c b/drivers/gpu/drm/amd/powerplay/hwmgr/hardwaremanager.c index f9bf4fccbc79..0f2d5e4bc241 100644 --- a/drivers/gpu/drm/amd/powerplay/hwmgr/hardwaremanager.c +++ b/drivers/gpu/drm/amd/powerplay/hwmgr/hardwaremanager.c @@ -90,6 +90,22 @@ int phm_setup_asic(struct pp_hwmgr *hwmgr) return 0; } +int phm_power_down_asic(struct pp_hwmgr *hwmgr) +{ + PHM_FUNC_CHECK(hwmgr); + + if (phm_cap_enabled(hwmgr->platform_descriptor.platformCaps, + PHM_PlatformCaps_TablelessHardwareInterface)) { + if (NULL != hwmgr->hwmgr_func->power_off_asic) + return hwmgr->hwmgr_func->power_off_asic(hwmgr); + } else { + return phm_dispatch_table(hwmgr, &(hwmgr->power_down_asic), + NULL, NULL); + } + + return 0; +} + int phm_set_power_state(struct pp_hwmgr *hwmgr, const struct pp_hw_power_state *pcurrent_state, const struct pp_hw_power_state *pnew_power_state) @@ -247,7 +263,6 @@ int phm_register_thermal_interrupt(struct pp_hwmgr *hwmgr, const void *info) */ int phm_start_thermal_controller(struct pp_hwmgr *hwmgr, struct PP_TemperatureRange *temperature_range) { - return phm_dispatch_table(hwmgr, &(hwmgr->start_thermal_controller), temperature_range, NULL); } |