summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMichel Dänzer <michel.daenzer@amd.com>2018-07-10 18:13:39 +0200
committerMichel Dänzer <michel@daenzer.net>2018-07-11 18:28:02 +0200
commit9dfbae76b179285d142b97852211b900ebfae51d (patch)
tree68181013d5ddd8cf5ab314197fd0b837e9df050d /src
parentace6ea016ce0013a34e1d4637aeacbf4d0e83c79 (diff)
Move flush from radeon_scanout_do_update to its callers
No functional change intended. (Ported from radeon commit 90b94d40449f665f2d12874598062a5e5e5b64cd) Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'src')
-rw-r--r--src/amdgpu_kms.c8
-rw-r--r--src/drmmode_display.c1
2 files changed, 6 insertions, 3 deletions
diff --git a/src/amdgpu_kms.c b/src/amdgpu_kms.c
index c357ab6..39e047e 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 fee6fed..f6cafcc 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,