diff options
author | Chris Wilson <chris@chris-wilson.co.uk> | 2012-09-02 12:23:59 +0100 |
---|---|---|
committer | Chris Wilson <chris@chris-wilson.co.uk> | 2012-09-02 12:23:59 +0100 |
commit | 4b558281e04e4d4febfc361632a90f8a45080c49 (patch) | |
tree | 160301c501f44b1dcd0a6cddd899afe282fce97a /src/sna/kgem.c | |
parent | d933f3a7965c9aa70f70477be3bfe94d5ded948b (diff) |
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>
Diffstat (limited to 'src/sna/kgem.c')
-rw-r--r-- | src/sna/kgem.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/sna/kgem.c b/src/sna/kgem.c index 6df5a2e5..cb0c82a7 100644 --- a/src/sna/kgem.c +++ b/src/sna/kgem.c @@ -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)) { |