diff options
author | Chris Wilson <chris@chris-wilson.co.uk> | 2013-07-31 11:00:21 +0100 |
---|---|---|
committer | Chris Wilson <chris@chris-wilson.co.uk> | 2013-07-31 11:01:37 +0100 |
commit | bfe25b8110fc4d4761b57e3ec07b8467890b90a1 (patch) | |
tree | fbfc71c9018edc8b9c3393994f85a01f20f94d6e /src/sna/kgem.h | |
parent | 493763301e995d02cb838d14348da46dd26444af (diff) |
sna: Fix interaction between WT mapping of scanouts and allocating from stolen
If we allocate the scanout from stolen, we cannot then access it via the
CPU - so prevent the mapping in those cases.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Diffstat (limited to 'src/sna/kgem.h')
-rw-r--r-- | src/sna/kgem.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/sna/kgem.h b/src/sna/kgem.h index fede4d40..a6e48b62 100644 --- a/src/sna/kgem.h +++ b/src/sna/kgem.h @@ -578,7 +578,7 @@ static inline bool kgem_bo_can_map__cpu(struct kgem *kgem, struct kgem_bo *bo, bool write) { - if (bo->scanout && (!kgem->has_wt || write)) + if (bo->scanout && (write || bo->purged || !kgem->has_wt)) return false; if (kgem->has_llc) |