From: Michel Dänzer <[email protected]>

No functional change intended.

Reviewed-by: Alex Deucher <[email protected]>
(Ported from radeon commit 90b94d40449f665f2d12874598062a5e5e5b64cd)

Signed-off-by: Michel Dänzer <[email protected]>
---
 src/amdgpu_kms.c      | 8 +++++---
 src/drmmode_display.c | 1 +
 2 files changed, 6 insertions(+), 3 deletions(-)

diff --git a/src/amdgpu_kms.c b/src/amdgpu_kms.c
index c357ab6b7..39e047e29 100644
--- a/src/amdgpu_kms.c
+++ b/src/amdgpu_kms.c
@@ -882,8 +882,6 @@ amdgpu_scanout_do_update(xf86CrtcPtr xf86_crtc, int 
scanout_id,
                FreeScratchGC(gc);
        }
 
-       amdgpu_glamor_flush(xf86_crtc->scrn);
-
        return TRUE;
 }
 
@@ -908,8 +906,10 @@ amdgpu_scanout_update_handler(xf86CrtcPtr crtc, uint32_t 
frame, uint64_t usec,
            drmmode_crtc->dpms_mode == DPMSModeOn) {
                if (amdgpu_scanout_do_update(crtc, drmmode_crtc->scanout_id,
                                             
screen->GetWindowPixmap(screen->root),
-                                            region->extents))
+                                            region->extents)) {
+                       amdgpu_glamor_flush(crtc->scrn);
                        RegionEmpty(region);
+               }
        }
 
        amdgpu_scanout_update_abort(crtc, event_data);
@@ -991,6 +991,8 @@ amdgpu_scanout_flip(ScreenPtr pScreen, AMDGPUInfoPtr info,
                                      pScreen->GetWindowPixmap(pScreen->root),
                                      region->extents))
                return;
+
+       amdgpu_glamor_flush(scrn);
        RegionEmpty(region);
 
        drm_queue_seq = amdgpu_drm_queue_alloc(xf86_crtc,
diff --git a/src/drmmode_display.c b/src/drmmode_display.c
index fee6fedfb..f6cafccdc 100644
--- a/src/drmmode_display.c
+++ b/src/drmmode_display.c
@@ -3978,6 +3978,7 @@ Bool amdgpu_do_pageflip(ScrnInfoPtr scrn, ClientPtr 
client,
 
                        amdgpu_scanout_do_update(crtc, scanout_id, new_front,
                                                 extents);
+                       amdgpu_glamor_flush(crtc->scrn);
 
                        if (drmmode_crtc->scanout_update_pending) {
                                drmmode_crtc_wait_pending_event(drmmode_crtc, 
pAMDGPUEnt->fd,
-- 
2.18.0

_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

Reply via email to