summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/sna/sna_display.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/sna/sna_display.c b/src/sna/sna_display.c
index 43fe4db4..39c07b30 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);