diff options
author | Michel Dänzer <michel.daenzer@amd.com> | 2018-10-24 18:19:42 +0200 |
---|---|---|
committer | Michel Dänzer <michel.daenzer@amd.com> | 2018-10-24 18:19:42 +0200 |
commit | c480fd066fe129fa6561fca8c09f037613b753e8 (patch) | |
tree | 29ac99520ce93153dfd6bd18a93ab58d36ca810e /src | |
parent | 86fe8d27b9a3f043e5288ce50eaf1f5fffd24516 (diff) |
Make wait_pending_flip / handle_deferred symmetric in set_mode_major
We were always calling the latter, but not always the former, which
could result in handling deferred DRM events prematurely.
(Ported from amdgpu commit 955373a3e69baa241a1f267e96d04ddb902f689f)
Diffstat (limited to 'src')
-rw-r--r-- | src/drmmode_display.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/drmmode_display.c b/src/drmmode_display.c index 7493d636..32ffe84e 100644 --- a/src/drmmode_display.c +++ b/src/drmmode_display.c @@ -857,6 +857,7 @@ drmmode_set_mode_major(xf86CrtcPtr crtc, DisplayModePtr mode, RADEONEntPtr pRADEONEnt = RADEONEntPriv(pScrn); xf86CrtcConfigPtr xf86_config = XF86_CRTC_CONFIG_PTR(crtc->scrn); drmmode_crtc_private_ptr drmmode_crtc = crtc->driver_private; + Bool handle_deferred = FALSE; unsigned scanout_id = 0; drmmode_ptr drmmode = drmmode_crtc->drmmode; int saved_x, saved_y; @@ -924,6 +925,7 @@ drmmode_set_mode_major(xf86CrtcPtr crtc, DisplayModePtr mode, } radeon_drm_wait_pending_flip(crtc); + handle_deferred = TRUE; if (!drmmode_set_mode(crtc, fb, mode, x, y)) goto done; @@ -983,7 +985,9 @@ done: } } - radeon_drm_queue_handle_deferred(crtc); + if (handle_deferred) + radeon_drm_queue_handle_deferred(crtc); + return ret; } |