xf86-video-ati: Branch 'master' - 3 commits

Michel Dänzer daenzer at kemper.freedesktop.org
Wed Feb 22 09:33:37 UTC 2017


 src/drmmode_display.c |    9 ++-------
 src/radeon_present.c  |    6 +++++-
 2 files changed, 7 insertions(+), 8 deletions(-)

New commits:
commit 244d4bc7f8c8f6bc90f49556c0b9344c8aa40295
Author: Michel Dänzer <michel.daenzer at amd.com>
Date:   Thu Feb 9 18:55:04 2017 +0900

    present: Wait for screen pixmap BO idle before setting modes for unflip
    
    To make sure the screen pixmap contents are up to date when it starts
    being scanned out.
    
    Reviewed-by: Alex Deucher <alexander.deucher at amd.com>

diff --git a/src/radeon_present.c b/src/radeon_present.c
index b36e29b..1b0ddcb 100644
--- a/src/radeon_present.c
+++ b/src/radeon_present.c
@@ -404,6 +404,8 @@ modeset:
     old_fb_id = info->drmmode.fb_id;
     info->drmmode.fb_id = 0;
 
+    radeon_cs_flush_indirect(scrn);
+    radeon_bo_wait(info->front_bo);
     for (i = 0; i < config->num_crtc; i++) {
 	xf86CrtcPtr crtc = config->crtc[i];
 	drmmode_crtc_private_ptr drmmode_crtc = crtc->driver_private;
commit 3ff29e5a14451916bc66b4e0028e9a317f0723f8
Author: Michel Dänzer <michel.daenzer at amd.com>
Date:   Thu Feb 9 18:50:40 2017 +0900

    present: Only call drmModeRmFB after setting modes for unflip
    
    Fixes display intermittently blanking when a modeset is used for unflip.
    
    Reviewed-by: Alex Deucher <alexander.deucher at amd.com>

diff --git a/src/radeon_present.c b/src/radeon_present.c
index 29800fe..b36e29b 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;
commit 0c29deb5a97d9a57e994cc0053c49ddf7aca6ecb
Author: Michel Dänzer <michel.daenzer at amd.com>
Date:   Tue Feb 21 16:56:27 2017 +0900

    Use drmmode_crtc_scanout_free in drmmode_fini
    
    We were leaking drmmode_crtc->scanout_damage, which caused trouble on
    server reset. Fixes server reset with active separate scanout pixmaps.
    
    Reviewed-by: Alex Deucher <alexander.deucher at amd.com>

diff --git a/src/drmmode_display.c b/src/drmmode_display.c
index 5b0236d..fd22a19 100644
--- a/src/drmmode_display.c
+++ b/src/drmmode_display.c
@@ -2618,13 +2618,8 @@ void drmmode_fini(ScrnInfoPtr pScrn, drmmode_ptr drmmode)
 #endif
 	}
 
-	for (c = 0; c < config->num_crtc; c++) {
-		xf86CrtcPtr crtc = config->crtc[c];
-		drmmode_crtc_private_ptr drmmode_crtc = crtc->driver_private;
-
-		drmmode_crtc_scanout_destroy(&info->drmmode, &drmmode_crtc->scanout[0]);
-		drmmode_crtc_scanout_destroy(&info->drmmode, &drmmode_crtc->scanout[1]);
-	}
+	for (c = 0; c < config->num_crtc; c++)
+		drmmode_crtc_scanout_free(config->crtc[c]->driver_private);
 }
 
 


More information about the xorg-commit mailing list