[PATCH xf86-video-ati 1/2] present: Clear drmmode->fb_id before calling set_mode_major for unflip
Michel Dänzer
michel at daenzer.net
Wed Mar 9 09:45:59 UTC 2016
From: Michel Dänzer <michel.daenzer at amd.com>
Without this, drmmode_set_mode_major may just re-set the FB for the
last flipped BO, in which case the display will probably freeze.
Reproduction recipe: Enable rotation while a fullscreen client is
flipping.
Signed-off-by: Michel Dänzer <michel.daenzer at amd.com>
---
src/radeon_present.c | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/src/radeon_present.c b/src/radeon_present.c
index 68be1c7..286b3f4 100644
--- a/src/radeon_present.c
+++ b/src/radeon_present.c
@@ -382,6 +382,12 @@ radeon_present_unflip(ScreenPtr screen, uint64_t event_id)
return;
modeset:
+ /* info->drmmode.fb_id still points to the FB for the last flipped BO.
+ * Clear it, drmmode_set_mode_major will re-create it
+ */
+ drmModeRmFB(info->drmmode.fd, info->drmmode.fb_id);
+ info->drmmode.fb_id = 0;
+
for (i = 0; i < config->num_crtc; i++) {
xf86CrtcPtr crtc = config->crtc[i];
drmmode_crtc_private_ptr drmmode_crtc = crtc->driver_private;
--
2.7.0
More information about the xorg-driver-ati
mailing list