xf86-video-amdgpu: Branch 'master'

Michel Dänzer daenzer at kemper.freedesktop.org
Thu Jun 23 01:59:38 UTC 2016


 src/drmmode_display.c |   15 +++++++++------
 1 file changed, 9 insertions(+), 6 deletions(-)

New commits:
commit 0d42082108c264568e2aadd15ace70e72388bc65
Author: Michel Dänzer <michel.daenzer at amd.com>
Date:   Wed Jun 22 19:01:03 2016 +0900

    Call amdgpu_glamor_create_screen_resources after ModifyPixmapHeader
    
    Otherwise, glamor doesn't pick up the new screen pixmap size and
    continues using the old size, leaving garbage in some areas after
    enlarging the screen.
    
    Fixes regression from commit c315c00e44afc91a7c8e2eab5af836d9643ebb88
    ("Propagate failure from amdgpu_set_pixmap_bo").
    
    Reviewed-by: Alex Deucher <alexander.deucher at amd.com>

diff --git a/src/drmmode_display.c b/src/drmmode_display.c
index 7a41294..5d08b49 100644
--- a/src/drmmode_display.c
+++ b/src/drmmode_display.c
@@ -1952,14 +1952,8 @@ static Bool drmmode_xf86crtc_resize(ScrnInfoPtr scrn, int width, int height)
 		goto fail;
 	}
 
-	if (!amdgpu_glamor_create_screen_resources(scrn->pScreen))
-		goto fail;
-
 	if (info->use_glamor ||
 	    (info->front_buffer->flags & AMDGPU_BO_FLAGS_GBM)) {
-		if (!amdgpu_set_pixmap_bo(ppix, info->front_buffer))
-			goto fail;
-
 		screen->ModifyPixmapHeader(ppix,
 					   width, height, -1, -1, pitch, info->front_buffer->cpu_ptr);
 	} else {
@@ -1976,6 +1970,15 @@ static Bool drmmode_xf86crtc_resize(ScrnInfoPtr scrn, int width, int height)
 	scrn->pixmapPrivate.ptr = ppix->devPrivate.ptr;
 #endif
 
+	if (!amdgpu_glamor_create_screen_resources(scrn->pScreen))
+		goto fail;
+
+	if (info->use_glamor ||
+	    (info->front_buffer->flags & AMDGPU_BO_FLAGS_GBM)) {
+		if (!amdgpu_set_pixmap_bo(ppix, info->front_buffer))
+			goto fail;
+	}
+
 	/* Clear new buffer */
 	gc = GetScratchGC(ppix->drawable.depth, scrn->pScreen);
 	ValidateGC(&ppix->drawable, gc);


More information about the xorg-commit mailing list