summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichel Dänzer <michel.daenzer@amd.com>2018-11-21 17:54:18 +0100
committerMichel Dänzer <michel@daenzer.net>2018-12-13 12:17:02 +0100
commit4e7a24ac5a64e402146953ec5850d13c05742116 (patch)
tree1e5bb4c28cc5dff267c2f0fb5f7222bb95c278ef
parent500fadb16285146e91f62fce3a0ce1360ca684ba (diff)
Cancel pending scanout update in drmmode_crtc_scanout_update
drmmode_crtc_scanout_update does the equivalent of a scanout update, so no need to do it again. This might also avoid issues if there's a pending scanout update at this point. Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
-rw-r--r--src/drmmode_display.c16
1 files changed, 11 insertions, 5 deletions
diff --git a/src/drmmode_display.c b/src/drmmode_display.c
index bd5eb5e..2a22777 100644
--- a/src/drmmode_display.c
+++ b/src/drmmode_display.c
@@ -790,11 +790,17 @@ drmmode_crtc_scanout_update(xf86CrtcPtr crtc, DisplayModePtr mode,
*fb = amdgpu_pixmap_get_fb(drmmode_crtc->scanout[scanout_id].pixmap);
*x = *y = 0;
- amdgpu_scanout_do_update(crtc, scanout_id,
- screen->GetWindowPixmap(screen->root),
- extents);
- RegionEmpty(DamageRegion(drmmode_crtc->scanout_damage));
- amdgpu_glamor_finish(scrn);
+ if (amdgpu_scanout_do_update(crtc, scanout_id,
+ screen->GetWindowPixmap(screen->root),
+ extents)) {
+ RegionEmpty(DamageRegion(drmmode_crtc->scanout_damage));
+ amdgpu_glamor_finish(scrn);
+
+ if (!drmmode_crtc->flip_pending) {
+ amdgpu_drm_abort_entry(drmmode_crtc->
+ scanout_update_pending);
+ }
+ }
}
}