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 <chris@chris-wilson.co.uk>
This commit is contained in:
Chris Wilson 2013-02-06 16:02:30 +00:00
parent f4cff22afa
commit 0adb0b5e1e
1 changed files with 1 additions and 3 deletions

View File

@ -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;
}
}