sna: Skip flushing the active queue if there is not a suitable bo pending

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
This commit is contained in:
Chris Wilson 2012-06-07 23:37:59 +01:00
parent 318982566b
commit a62ad4e807
1 changed files with 5 additions and 0 deletions

View File

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