[PATCH xf86-video-amdgpu 3/3] Wait for scanout BO initialization to finish before setting mode

Michel Dänzer michel at daenzer.net
Thu Aug 6 20:44:50 PDT 2015


From: Michel Dänzer <michel.daenzer at amd.com>

This should avoid intermittent artifacts which could sometimes be visible
when setting a new scanout pixmap, e.g. on server startup or when
changing resolutions.

(Ported from radeon commit 3791fceabf2cb037467dc41c15364e9f9ec1e47e)

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

diff --git a/src/drmmode_display.c b/src/drmmode_display.c
index 98dd3b1..88987d0 100644
--- a/src/drmmode_display.c
+++ b/src/drmmode_display.c
@@ -416,7 +416,7 @@ void drmmode_copy_fb(ScrnInfoPtr pScrn, drmmode_ptr drmmode)
 
 	FreeScratchGC(gc);
 
-	amdgpu_glamor_flush(pScrn);
+	amdgpu_glamor_finish(pScrn);
 
 	pScreen->canDoBGNoneRoot = TRUE;
 
@@ -697,6 +697,7 @@ drmmode_set_mode_major(xf86CrtcPtr crtc, DisplayModePtr mode,
 				x = y = 0;
 
 				amdgpu_scanout_update_handler(pScrn, 0, 0, crtc);
+				amdgpu_glamor_finish(pScrn);
 			}
 		}
 		ret =
@@ -1630,7 +1631,7 @@ static Bool drmmode_xf86crtc_resize(ScrnInfoPtr scrn, int width, int height)
 	(*gc->ops->PolyFillRect)(&ppix->drawable, gc, 1, &rect);
 	info->force_accel = FALSE;
 	FreeScratchGC(gc);
-	amdgpu_glamor_flush(scrn);
+	amdgpu_glamor_finish(scrn);
 
 	for (i = 0; i < xf86_config->num_crtc; i++) {
 		xf86CrtcPtr crtc = xf86_config->crtc[i];
-- 
2.5.0



More information about the xorg-driver-ati mailing list