summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichel Dänzer <michel.daenzer@amd.com>2017-02-28 18:06:55 +0900
committerMichel Dänzer <michel@daenzer.net>2017-03-01 16:57:29 +0900
commit9a951a3e551db58ba50e7a594521ceac54d90615 (patch)
treec9a904a196927c22bb98c10a0d70b4e3acefd109
parentf2bc882f1c1082bed9f496cfab6c8f07a76bc122 (diff)
present: Also flush before using a flip to unflip
Not doing so might result in intermittently scanning out stale contents of the screen pixmap. Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
-rw-r--r--src/radeon_present.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/radeon_present.c b/src/radeon_present.c
index 1b0ddcb8..6409fe36 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];