xf86-video-intel: src/sna/sna_display.c

Chris Wilson ickle at kemper.freedesktop.org
Fri Oct 7 22:34:40 UTC 2016


 src/sna/sna_display.c |    9 +++++++++
 1 file changed, 9 insertions(+)

New commits:
commit 696f58f69f2bac5717d19f7a1a2278fee50a083e
Author: Chris Wilson <chris at chris-wilson.co.uk>
Date:   Fri Oct 7 23:32:12 2016 +0100

    sna: Add an assertion that the flip succeeds
    
    Upon completion of the flip-event, check that the current scanout
    matches our expectations.
    
    Signed-off-by: Chris Wilson <chris at chris-wilson.co.uk>

diff --git a/src/sna/sna_display.c b/src/sna/sna_display.c
index 43fe4db..39c07b3 100644
--- a/src/sna/sna_display.c
+++ b/src/sna/sna_display.c
@@ -9186,6 +9186,15 @@ again:
 					     crtc->flip_bo->handle, crtc->flip_bo->active_scanout));
 					assert(crtc->bo->active_scanout);
 					assert(crtc->bo->refcnt >= crtc->bo->active_scanout);
+
+#ifndef NDEBUG
+					{
+						struct drm_mode_crtc mode = { .crtc_id = __sna_crtc_id(crtc) };
+						drmIoctl(sna->kgem.fd, DRM_IOCTL_MODE_GETCRTC, &mode);
+						assert(mode.fb_id == fb_id(crtc->flip_bo));
+					}
+#endif
+
 					crtc->bo->active_scanout--;
 					kgem_bo_destroy(&sna->kgem, crtc->bo);
 


More information about the xorg-commit mailing list