diff options
author | Chris Wilson <chris@chris-wilson.co.uk> | 2012-04-25 11:09:35 +0100 |
---|---|---|
committer | Chris Wilson <chris@chris-wilson.co.uk> | 2012-04-25 11:17:58 +0100 |
commit | a3371613c9bf577a69cdf811ca1bebaea46bbe95 (patch) | |
tree | c7f69ce87c684ec6b6043e636bd57efdfbed512f | |
parent | 1abd92cd012ee46d44ed4873a5e750d56ae6668f (diff) |
sna: Do not automagically convert GTT mappings on untiled scanout to CPU
The likelihood of an untiled mapping of the scanout is slim, except for
gen3 with large desktops, and there it should never be in the CPU
domain...
The issue is that we may perform an operation "inplace", yet incoherent
with the display engine, and never flush the CPU cache, resulting in
render corruption. In theory at least!
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
-rw-r--r-- | src/sna/kgem.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/sna/kgem.c b/src/sna/kgem.c index d97f5590..4c4aa7c3 100644 --- a/src/sna/kgem.c +++ b/src/sna/kgem.c @@ -3167,7 +3167,7 @@ void *kgem_bo_map(struct kgem *kgem, struct kgem_bo *bo) assert(bo->exec == NULL); assert(list_is_empty(&bo->list)); - if (bo->tiling == I915_TILING_NONE && + if (bo->tiling == I915_TILING_NONE && !bo->scanout && (kgem->has_llc || bo->domain == DOMAIN_CPU)) { DBG(("%s: converting request for GTT map into CPU map\n", __FUNCTION__)); @@ -3274,6 +3274,7 @@ void *kgem_bo_map__cpu(struct kgem *kgem, struct kgem_bo *bo) DBG(("%s(handle=%d, size=%d)\n", __FUNCTION__, bo->handle, bytes(bo))); assert(!bo->purged); assert(list_is_empty(&bo->list)); + assert(!bo->scanout); if (IS_CPU_MAP(bo->map)) return MAP(bo->map); |