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 <chris@chris-wilson.co.uk>
This commit is contained in:
Chris Wilson 2014-09-07 13:32:12 +01:00
parent 57bf3d5f0f
commit aca0bf6387
1 changed files with 9 additions and 0 deletions

View File

@ -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,