summaryrefslogtreecommitdiff
path: root/sys/dev/pci/drm
diff options
context:
space:
mode:
authorJonathan Gray <jsg@cvs.openbsd.org>2019-10-06 01:04:52 +0000
committerJonathan Gray <jsg@cvs.openbsd.org>2019-10-06 01:04:52 +0000
commit63312edf8d99a85bf06161710e045ec7fe4ba805 (patch)
treea1e814b41946f322a57b6a39a487d02d3b5055f3 /sys/dev/pci/drm
parentf8ca2cbba6a7b376c213071b506e44f692cefbdc (diff)
drm/amd/powerplay/smu7: enforce minimal VBITimeout (v2)
From Ahzo d47636913bda8255652805eb29b9638e6d9311c1 in linux 4.19.y/4.19.77 f659bb6dae58c113805f92822e4c16ddd3156b79 in mainline linux
Diffstat (limited to 'sys/dev/pci/drm')
-rw-r--r--sys/dev/pci/drm/amd/powerplay/hwmgr/smu7_hwmgr.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/sys/dev/pci/drm/amd/powerplay/hwmgr/smu7_hwmgr.c b/sys/dev/pci/drm/amd/powerplay/hwmgr/smu7_hwmgr.c
index 2fc14e83397..9251357a923 100644
--- a/sys/dev/pci/drm/amd/powerplay/hwmgr/smu7_hwmgr.c
+++ b/sys/dev/pci/drm/amd/powerplay/hwmgr/smu7_hwmgr.c
@@ -4052,6 +4052,11 @@ static int smu7_program_display_gap(struct pp_hwmgr *hwmgr)
data->frame_time_x2 = frame_time_in_us * 2 / 100;
+ if (data->frame_time_x2 < 280) {
+ pr_debug("%s: enforce minimal VBITimeout: %d -> 280\n", __func__, data->frame_time_x2);
+ data->frame_time_x2 = 280;
+ }
+
display_gap2 = pre_vbi_time_in_us * (ref_clock / 100);
cgs_write_ind_register(hwmgr->device, CGS_IND_REG__SMC, ixCG_DISPLAY_GAP_CNTL2, display_gap2);