From a62ad4e80722db187766c83a16fa84ec236cc5eb Mon Sep 17 00:00:00 2001 From: Chris Wilson Date: Thu, 7 Jun 2012 23:37:59 +0100 Subject: [PATCH] sna: Skip flushing the active queue if there is not a suitable bo pending Signed-off-by: Chris Wilson --- src/sna/kgem.c | 5 +++++ 1 file changed, 5 insertions(+) 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;