[PATCH xf86-video-ati 1/3] present: Also flush before using a flip to unflip

Michel Dänzer michel at daenzer.net
Tue Feb 28 09:20:12 UTC 2017


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

Not doing so might result in intermittently scanning out stale contents
of the screen pixmap.

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

diff --git a/src/radeon_present.c b/src/radeon_present.c
index 1b0ddcb82..6409fe36d 100644
--- a/src/radeon_present.c
+++ b/src/radeon_present.c
@@ -374,6 +374,8 @@ radeon_present_unflip(ScreenPtr screen, uint64_t event_id)
     int old_fb_id;
     int i;
 
+    radeon_cs_flush_indirect(scrn);
+
     if (!radeon_present_check_unflip(scrn))
 	goto modeset;
 
@@ -404,7 +406,6 @@ 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];
-- 
2.11.0



More information about the amd-gfx mailing list