提交 801caaf6 编写于 作者: R Rex Zhu 提交者: Alex Deucher

drm/amdgpu: use mask bit for deep sleep feature on dpm.

Signed-off-by: NRex Zhu <Rex.Zhu@amd.com>
Reviewed-by: NAlex Deucher <alexander.deucher@amd.com>
Signed-off-by: NAlex Deucher <alexander.deucher@amd.com>
上级 55ff5483
...@@ -52,6 +52,8 @@ enum amdgpu_dpm_event_src { ...@@ -52,6 +52,8 @@ enum amdgpu_dpm_event_src {
AMDGPU_DPM_EVENT_SRC_DIGIAL_OR_EXTERNAL = 4 AMDGPU_DPM_EVENT_SRC_DIGIAL_OR_EXTERNAL = 4
}; };
#define SCLK_DEEP_SLEEP_MASK 0x8
struct amdgpu_ps { struct amdgpu_ps {
u32 caps; /* vbios flags */ u32 caps; /* vbios flags */
u32 class; /* vbios flags */ u32 class; /* vbios flags */
......
...@@ -5896,7 +5896,7 @@ static int ci_dpm_init(struct amdgpu_device *adev) ...@@ -5896,7 +5896,7 @@ static int ci_dpm_init(struct amdgpu_device *adev)
pi->pcie_dpm_key_disabled = 0; pi->pcie_dpm_key_disabled = 0;
pi->thermal_sclk_dpm_enabled = 0; pi->thermal_sclk_dpm_enabled = 0;
if (amdgpu_sclk_deep_sleep_en) if (amdgpu_pp_feature_mask & SCLK_DEEP_SLEEP_MASK)
pi->caps_sclk_ds = true; pi->caps_sclk_ds = true;
else else
pi->caps_sclk_ds = false; pi->caps_sclk_ds = false;
......
...@@ -438,7 +438,7 @@ static int cz_dpm_init(struct amdgpu_device *adev) ...@@ -438,7 +438,7 @@ static int cz_dpm_init(struct amdgpu_device *adev)
pi->caps_td_ramping = true; pi->caps_td_ramping = true;
pi->caps_tcp_ramping = true; pi->caps_tcp_ramping = true;
} }
if (amdgpu_sclk_deep_sleep_en) if (amdgpu_pp_feature_mask & SCLK_DEEP_SLEEP_MASK)
pi->caps_sclk_ds = true; pi->caps_sclk_ds = true;
else else
pi->caps_sclk_ds = false; pi->caps_sclk_ds = false;
......
...@@ -2845,7 +2845,7 @@ static int kv_dpm_init(struct amdgpu_device *adev) ...@@ -2845,7 +2845,7 @@ static int kv_dpm_init(struct amdgpu_device *adev)
pi->caps_tcp_ramping = true; pi->caps_tcp_ramping = true;
} }
if (amdgpu_sclk_deep_sleep_en) if (amdgpu_pp_feature_mask & SCLK_DEEP_SLEEP_MASK)
pi->caps_sclk_ds = true; pi->caps_sclk_ds = true;
else else
pi->caps_sclk_ds = false; pi->caps_sclk_ds = false;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册