[PATCH] present: Flush before using a flip to unflip

oushixiong oushixiong1025 at 163.com
Tue May 23 01:35:46 UTC 2023


From: oushixiong <oushixiong at kylinos.cn>

Not flushing when unflip may result in scanning out
stale contents of the screen pixmap sometimes.

Signed-off-by: Ou Shixiong <oushixiong at kylinos.cn>
---
 src/radeon_present.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/src/radeon_present.c b/src/radeon_present.c
index d010aa19..3bb46fcc 100644
--- a/src/radeon_present.c
+++ b/src/radeon_present.c
@@ -417,6 +417,8 @@ radeon_present_unflip(ScreenPtr screen, uint64_t event_id)
     event->event_id = event_id;
     event->unflip = TRUE;
 
+    radeon_cs_flush_indirect(scrn);
+
     if (radeon_do_pageflip(scrn, RADEON_DRM_QUEUE_CLIENT_DEFAULT, pixmap,
 			   event_id, event, NULL, radeon_present_flip_event,
 			   radeon_present_flip_abort, flip_sync, 0))
-- 
2.25.1


No virus found
		Checked by Hillstone Network AntiVirus



More information about the xorg-driver-ati mailing list