From aca0bf6387c159a3d54dbbe52dd65fd92df98216 Mon Sep 17 00:00:00 2001 From: Chris Wilson Date: Sun, 7 Sep 2014 13:32:12 +0100 Subject: sna/gen2: Fallback to kernel batch w/a rather than incur a stall If we have no pinned batches available, use the kernel w/a if available rather than stall waiting for an active batch. Signed-off-by: Chris Wilson --- src/sna/kgem.c | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'src') diff --git a/src/sna/kgem.c b/src/sna/kgem.c index 6d4e074d..aff08931 100644 --- a/src/sna/kgem.c +++ b/src/sna/kgem.c @@ -3118,6 +3118,15 @@ out_16384: if (bo) return bo; + /* Nothing available for reuse, rely on the kernel wa */ + if (kgem->has_pinned_batches) { + bo = kgem_create_linear(kgem, size, CREATE_CACHED | CREATE_TEMPORARY); + if (bo) { + kgem->batch_flags &= ~LOCAL_I915_EXEC_IS_PINNED; + return bo; + } + } + if (size < 16384) { bo = list_first_entry(&kgem->pinned_batches[size > 4096], struct kgem_bo, -- cgit v1.2.3