summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/amd/powerplay/smumgr/tonga_smumgr.c
diff options
context:
space:
mode:
authorAlex Deucher <alexander.deucher@amd.com>2018-08-09 14:24:08 -0500
committerAlex Deucher <alexander.deucher@amd.com>2018-08-27 11:10:12 -0500
commitec2e082a79b5d46addf2e7b83a13fb015fca6149 (patch)
tree874e6fb89a44907499bf2a0384938f7a0044bc46 /drivers/gpu/drm/amd/powerplay/smumgr/tonga_smumgr.c
parent7ea34ea3e889a539ecfe1073ac45f64e7eb3579b (diff)
downloadlinux-ec2e082a79b5d46addf2e7b83a13fb015fca6149.tar.bz2
drm/amdgpu/powerplay: check vrefresh when when changing displays
Compare the current vrefresh in addition to the number of displays when determining whether or not the smu needs updates when changing modes. The SMU needs to be updated if the vbi timeout changes due to a different refresh rate. Fixes flickering around mode changes in some cases on polaris parts. Reviewed-by: Rex Zhu <Rex.Zhu@amd.com> Reviewed-by: Huang Rui <ray.huang@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'drivers/gpu/drm/amd/powerplay/smumgr/tonga_smumgr.c')
-rw-r--r--drivers/gpu/drm/amd/powerplay/smumgr/tonga_smumgr.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/gpu/drm/amd/powerplay/smumgr/tonga_smumgr.c b/drivers/gpu/drm/amd/powerplay/smumgr/tonga_smumgr.c
index 7dabc6c456e1..ae8378ed32ee 100644
--- a/drivers/gpu/drm/amd/powerplay/smumgr/tonga_smumgr.c
+++ b/drivers/gpu/drm/amd/powerplay/smumgr/tonga_smumgr.c
@@ -1004,6 +1004,7 @@ static int tonga_populate_single_memory_level(
memory_level->DisplayWatermark = PPSMC_DISPLAY_WATERMARK_LOW;
data->display_timing.num_existing_displays = hwmgr->display_config->num_display;
+ data->display_timing.vrefresh = hwmgr->display_config->vrefresh;
if ((mclk_stutter_mode_threshold != 0) &&
(memory_clock <= mclk_stutter_mode_threshold) &&