summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris Wilson <chris@chris-wilson.co.uk>2011-12-18 23:42:07 +0000
committerChris Wilson <chris@chris-wilson.co.uk>2011-12-18 23:42:07 +0000
commite32ad646762ccc7f22f938454e222d43abfb38ed (patch)
treea2e6f0cdbc2f34e10c7b51ca30a8a21b69648146
parent15a769a66fa1afbcffc642ef980387cffefc6bef (diff)
sna: Continue searching the linear lists for CPU mappings
Prefer to reuse an available CPU mapping which are considered precious and reaped if we keep too many unused entries availabled. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
-rw-r--r--src/sna/kgem.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/sna/kgem.c b/src/sna/kgem.c
index c0034d5f..41aded66 100644
--- a/src/sna/kgem.c
+++ b/src/sna/kgem.c
@@ -1483,6 +1483,12 @@ search_linear_cache(struct kgem *kgem, unsigned int size, unsigned flags)
first = bo;
continue;
}
+ } else {
+ if (flags & (CREATE_CPU_MAP | CREATE_GTT_MAP)) {
+ if (first == NULL)
+ first = bo;
+ continue;
+ }
}
if (I915_TILING_NONE != bo->tiling) {