summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris Wilson <chris@chris-wilson.co.uk>2012-06-07 23:37:59 +0100
committerChris Wilson <chris@chris-wilson.co.uk>2012-06-07 23:37:59 +0100
commita62ad4e80722db187766c83a16fa84ec236cc5eb (patch)
tree819e273cbecbb95ab1deb10b269a02fae79acac5
parent318982566bbc7145847bd03601087150eef7a8d8 (diff)
sna: Skip flushing the active queue if there is not a suitable bo pending
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
-rw-r--r--src/sna/kgem.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/sna/kgem.c b/src/sna/kgem.c
index 3078f49a..d2ca995c 100644
--- a/src/sna/kgem.c
+++ b/src/sna/kgem.c
@@ -2136,6 +2136,11 @@ search_linear_cache(struct kgem *kgem, unsigned int num_pages, unsigned flags)
return NULL;
}
+ if (list_is_empty(active(kgem, num_pages, I915_TILING_NONE))) {
+ DBG(("%s: active cache bucket empty\n", __FUNCTION__));
+ return NULL;
+ }
+
if (!__kgem_throttle_retire(kgem, 0)) {
DBG(("%s: nothing retired\n", __FUNCTION__));
return NULL;