summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMichel Dänzer <michel.daenzer@amd.com>2018-04-24 11:56:03 +0200
committerMichel Dänzer <michel@daenzer.net>2018-04-25 12:19:50 +0200
commit7db0c8e9d7586cff4312d4b93684d35de3e6376f (patch)
treee022826efac664b91c99352ab30333c134d66e2f /src
parent8e544b4a0de6717feb4abf00052d57c5b726b5ce (diff)
Set drmmode_crtc->scanout_id = 0 when TearFree is disabled
When disabling TearFree, drmmode_crtc->scanout_id could remain as 1, but drmmode_set_mode_major would destroy drmmode_crtc->scanout[1], so scanout_do_update() would keep bailing, and the scanout buffer would stop being updated. Fixes freeze after disabling TearFree on a CRTC with active RandR rotation or other transform. Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'src')
-rw-r--r--src/drmmode_display.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/drmmode_display.c b/src/drmmode_display.c
index 536890d..793027d 100644
--- a/src/drmmode_display.c
+++ b/src/drmmode_display.c
@@ -846,6 +846,8 @@ drmmode_set_mode_major(xf86CrtcPtr crtc, DisplayModePtr mode,
drmmode_crtc_update_tear_free(crtc);
if (drmmode_crtc->tear_free)
scanout_id = drmmode_crtc->scanout_id;
+ else
+ drmmode_crtc->scanout_id = 0;
/* gamma is disabled in kernel driver for deep color */
if (pScrn->depth != 30)