[PATCH xf86-video-ati 2/3] Make wait_pending_flip / handle_deferred symmetric in set_mode_major
Michel Dänzer
michel at daenzer.net
Wed Oct 24 16:40:18 UTC 2018
From: Michel Dänzer <michel.daenzer at amd.com>
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)
Signed-off-by: Michel Dänzer <michel.daenzer at amd.com>
---
src/drmmode_display.c | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/src/drmmode_display.c b/src/drmmode_display.c
index 7493d636e..32ffe84ed 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;
}
--
2.19.1
More information about the amd-gfx
mailing list