Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

drm/amd/powerplay: use mask bit for deepsleep/power tune feature.

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>

authored by

Rex Zhu and committed by
Alex Deucher
55ff5483 ba5f884c

+2 -4
+2 -2
drivers/gpu/drm/amd/powerplay/hwmgr/hwmgr.c
··· 685 685 686 686 int hwmgr_set_user_specify_caps(struct pp_hwmgr *hwmgr) 687 687 { 688 - if (amdgpu_sclk_deep_sleep_en) 688 + if (amdgpu_pp_feature_mask & PP_SCLK_DEEP_SLEEP_MASK) 689 689 phm_cap_set(hwmgr->platform_descriptor.platformCaps, 690 690 PHM_PlatformCaps_SclkDeepSleep); 691 691 else 692 692 phm_cap_unset(hwmgr->platform_descriptor.platformCaps, 693 693 PHM_PlatformCaps_SclkDeepSleep); 694 694 695 - if (amdgpu_powercontainment) { 695 + if (amdgpu_pp_feature_mask & PP_POWER_CONTAINMENT_MASK) { 696 696 phm_cap_set(hwmgr->platform_descriptor.platformCaps, 697 697 PHM_PlatformCaps_PowerContainment); 698 698 phm_cap_set(hwmgr->platform_descriptor.platformCaps,
-2
drivers/gpu/drm/amd/powerplay/inc/hwmgr.h
··· 38 38 struct phm_fan_speed_info; 39 39 struct pp_atomctrl_voltage_table; 40 40 41 - extern int amdgpu_powercontainment; 42 - extern int amdgpu_sclk_deep_sleep_en; 43 41 extern unsigned amdgpu_pp_feature_mask; 44 42 45 43 #define VOLTAGE_SCALE 4