summaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/amd/amdgpu/ci_dpm.c
diff options
context:
space:
mode:
authorDave Airlie <airlied@redhat.com>2017-05-30 15:54:15 +1000
committerDave Airlie <airlied@redhat.com>2017-05-30 15:54:15 +1000
commit2a1720376adda5ecf8e636fbfb05339c7dad1c55 (patch)
treecdb76abac82306516aa556d9e9ddb15571f07517 /drivers/gpu/drm/amd/amdgpu/ci_dpm.c
parenta82256bc026722800d1fdeca5521f1ba487bc2ef (diff)
parent5ed02dbb497422bf225783f46e6eadd237d23d6b (diff)
Backmerge tag 'v4.12-rc3' into drm-next
Linux 4.12-rc3 Daniel has requested this for some drm-intel-next work.
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/ci_dpm.c')
-rw-r--r--drivers/gpu/drm/amd/amdgpu/ci_dpm.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/ci_dpm.c b/drivers/gpu/drm/amd/amdgpu/ci_dpm.c
index 00e56a28b593..cb508a211b2f 100644
--- a/drivers/gpu/drm/amd/amdgpu/ci_dpm.c
+++ b/drivers/gpu/drm/amd/amdgpu/ci_dpm.c
@@ -906,6 +906,12 @@ static bool ci_dpm_vblank_too_short(struct amdgpu_device *adev)
u32 vblank_time = amdgpu_dpm_get_vblank_time(adev);
u32 switch_limit = adev->mc.vram_type == AMDGPU_VRAM_TYPE_GDDR5 ? 450 : 300;
+ /* disable mclk switching if the refresh is >120Hz, even if the
+ * blanking period would allow it
+ */
+ if (amdgpu_dpm_get_vrefresh(adev) > 120)
+ return true;
+
if (vblank_time < switch_limit)
return true;
else