sna: Don't retire when searching for a snoopable buffer without hw support

If the hw/kernel doesn't support snoopable buffers, then it makes little
sense to search for one, and force a retire in the certainty of not
finding any.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
This commit is contained in:
Chris Wilson 2012-09-02 12:23:59 +01:00
parent d933f3a796
commit 4b558281e0
1 changed files with 3 additions and 0 deletions

View File

@ -1375,6 +1375,9 @@ search_snoop_cache(struct kgem *kgem, unsigned int num_pages, unsigned flags)
DBG(("%s: num_pages=%d, flags=%x\n", __FUNCTION__, num_pages, flags));
if ((kgem->has_cacheing | kgem->has_userptr) == 0)
return NULL;
if (list_is_empty(&kgem->snoop)) {
DBG(("%s: inactive and cache empty\n", __FUNCTION__));
if (!__kgem_throttle_retire(kgem, flags)) {