From 0adb0b5e1ebcf3ddfeddae99d96912ec4c090832 Mon Sep 17 00:00:00 2001 From: Chris Wilson Date: Wed, 6 Feb 2013 16:02:30 +0000 Subject: [PATCH] sna: Handle mapped buffer allocation failure for LLC The presumption was that if we had LLC we would have allocated the buffer by that point - however, it was remotely possible to have fallen through and so we need to handle those cases. Signed-off-by: Chris Wilson --- src/sna/kgem.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/sna/kgem.c b/src/sna/kgem.c index 1ed007ce..4fbabbaa 100644 --- a/src/sna/kgem.c +++ b/src/sna/kgem.c @@ -4909,8 +4909,6 @@ create_snoopable_buffer(struct kgem *kgem, unsigned alloc) struct kgem_buffer *bo; uint32_t handle; - assert(!kgem->has_llc); - if (kgem->has_cacheing) { struct kgem_bo *old; @@ -5228,7 +5226,7 @@ struct kgem_bo *kgem_create_buffer(struct kgem *kgem, if ((flags & KGEM_BUFFER_WRITE_INPLACE) != KGEM_BUFFER_WRITE_INPLACE) { bo = create_snoopable_buffer(kgem, alloc); if (bo) { - flags &= ~KGEM_BUFFER_INPLACE; + assert((flags & KGEM_BUFFER_INPLACE) == 0); goto init; } }