summaryrefslogtreecommitdiff
path: root/src/sna/kgem.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/sna/kgem.c')
-rw-r--r--src/sna/kgem.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/sna/kgem.c b/src/sna/kgem.c
index 88f1b911..bf07dbf8 100644
--- a/src/sna/kgem.c
+++ b/src/sna/kgem.c
@@ -4437,6 +4437,7 @@ struct kgem_bo *kgem_create_2d(struct kgem *kgem,
list_for_each_entry_reverse(bo, &kgem->scanout, list) {
assert(bo->scanout);
assert(!bo->flush);
+ assert(!bo->refcnt);
assert_tiling(kgem, bo);
if (size > num_pages(bo) || num_pages(bo) > 2*size)
@@ -4484,6 +4485,7 @@ struct kgem_bo *kgem_create_2d(struct kgem *kgem,
struct drm_mode_fb_cmd arg;
assert(bo->scanout);
+ assert(!bo->refcnt);
if (size > num_pages(bo) || num_pages(bo) > 2*size)
continue;