drm/amdgpu/powerplay: check vrefresh when when changing displays
authorAlex Deucher <alexander.deucher@amd.com>
Thu, 9 Aug 2018 19:24:08 +0000 (14:24 -0500)
committerAlex Deucher <alexander.deucher@amd.com>
Mon, 27 Aug 2018 16:10:12 +0000 (11:10 -0500)
commitec2e082a79b5d46addf2e7b83a13fb015fca6149
tree874e6fb89a44907499bf2a0384938f7a0044bc46
parent7ea34ea3e889a539ecfe1073ac45f64e7eb3579b
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>
drivers/gpu/drm/amd/powerplay/hwmgr/smu7_hwmgr.c
drivers/gpu/drm/amd/powerplay/hwmgr/smu7_hwmgr.h
drivers/gpu/drm/amd/powerplay/smumgr/ci_smumgr.c
drivers/gpu/drm/amd/powerplay/smumgr/fiji_smumgr.c
drivers/gpu/drm/amd/powerplay/smumgr/iceland_smumgr.c
drivers/gpu/drm/amd/powerplay/smumgr/polaris10_smumgr.c
drivers/gpu/drm/amd/powerplay/smumgr/tonga_smumgr.c
drivers/gpu/drm/amd/powerplay/smumgr/vegam_smumgr.c