diff options
author | Rex Zhu <Rex.Zhu@amd.com> | 2016-03-29 14:24:33 +0800 |
---|---|---|
committer | Alex Deucher <alexander.deucher@amd.com> | 2016-04-01 10:08:29 -0400 |
commit | 4cd05a74cc604ef1cc6ac37a25629e185bcd2cc5 (patch) | |
tree | 1851e07f07d8368ecd0d179b0424d98386274c17 /drivers | |
parent | 1587f6e40b94527fa38811a9a49c8b6656597e9d (diff) | |
download | linux-4cd05a74cc604ef1cc6ac37a25629e185bcd2cc5.tar.gz linux-4cd05a74cc604ef1cc6ac37a25629e185bcd2cc5.tar.bz2 linux-4cd05a74cc604ef1cc6ac37a25629e185bcd2cc5.zip |
drm/amd/powerplay: notify amdgpu whether dpm is enabled or not.
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')
-rw-r--r-- | drivers/gpu/drm/amd/powerplay/hwmgr/hardwaremanager.c | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/drivers/gpu/drm/amd/powerplay/hwmgr/hardwaremanager.c b/drivers/gpu/drm/amd/powerplay/hwmgr/hardwaremanager.c index be31bed2538a..f8b1c4499296 100644 --- a/drivers/gpu/drm/amd/powerplay/hwmgr/hardwaremanager.c +++ b/drivers/gpu/drm/amd/powerplay/hwmgr/hardwaremanager.c @@ -130,18 +130,25 @@ int phm_set_power_state(struct pp_hwmgr *hwmgr, int phm_enable_dynamic_state_management(struct pp_hwmgr *hwmgr) { + int ret = 1; + bool enabled; PHM_FUNC_CHECK(hwmgr); if (phm_cap_enabled(hwmgr->platform_descriptor.platformCaps, PHM_PlatformCaps_TablelessHardwareInterface)) { if (NULL != hwmgr->hwmgr_func->dynamic_state_management_enable) - return hwmgr->hwmgr_func->dynamic_state_management_enable(hwmgr); + ret = hwmgr->hwmgr_func->dynamic_state_management_enable(hwmgr); } else { - return phm_dispatch_table(hwmgr, + ret = phm_dispatch_table(hwmgr, &(hwmgr->enable_dynamic_state_management), NULL, NULL); } - return 0; + + enabled = ret == 0 ? true : false; + + cgs_notify_dpm_enabled(hwmgr->device, enabled); + + return ret; } int phm_force_dpm_levels(struct pp_hwmgr *hwmgr, enum amd_dpm_forced_level level) |