[PATCH xf86-video-ati 2/3] present: Only call drmModeRmFB after setting modes for unflip

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: Michel Dänzer <michel.daenzer@xxxxxxx>

Fixes display intermittently blanking when a modeset is used for unflip.

Signed-off-by: Michel Dänzer <michel.daenzer at amd.com>
---
 src/radeon_present.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/src/radeon_present.c b/src/radeon_present.c
index 29800fec0..b36e29b19 100644
--- a/src/radeon_present.c
+++ b/src/radeon_present.c
@@ -371,6 +371,7 @@ radeon_present_unflip(ScreenPtr screen, uint64_t event_id)
     struct radeon_present_vblank_event *event;
     PixmapPtr pixmap = screen->GetScreenPixmap(screen);
     uint32_t handle;
+    int old_fb_id;
     int i;
 
     if (!radeon_present_check_unflip(scrn))
@@ -400,7 +401,7 @@ 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);
+    old_fb_id = info->drmmode.fb_id;
     info->drmmode.fb_id = 0;
 
     for (i = 0; i < config->num_crtc; i++) {
@@ -417,6 +418,7 @@ modeset:
 	    drmmode_crtc->need_modeset = TRUE;
     }
 
+    drmModeRmFB(info->drmmode.fd, old_fb_id);
     present_event_notify(event_id, 0, 0);
 
     info->drmmode.present_flipping = FALSE;
-- 
2.11.0



[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux