From 06db69c2c7023f702f9773be90144fdf7a1159e4 Mon Sep 17 00:00:00 2001 From: Chris Wilson Date: Sat, 21 Jul 2012 15:28:10 +0100 Subject: [PATCH] sna: Update assertion for cached io buffers As kgem_buffers may be reused and repurposed through the snoop cache it is no longer true that only proxies will have the io flag set. Signed-off-by: Chris Wilson --- src/sna/kgem.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/sna/kgem.h b/src/sna/kgem.h index 7b388fbb..d7c3812a 100644 --- a/src/sna/kgem.h +++ b/src/sna/kgem.h @@ -417,7 +417,7 @@ void kgem_get_tile_size(struct kgem *kgem, int tiling, static inline int __kgem_buffer_size(struct kgem_bo *bo) { - assert(bo->proxy && bo->io); + assert(bo->proxy != NULL); return bo->size.bytes; } @@ -429,7 +429,7 @@ static inline int __kgem_bo_size(struct kgem_bo *bo) static inline int kgem_bo_size(struct kgem_bo *bo) { - if (bo->io) + if (bo->proxy) return __kgem_buffer_size(bo); else return __kgem_bo_size(bo);