summaryrefslogtreecommitdiff
path: root/src/sna/sna_render.c
diff options
context:
space:
mode:
authorChris Wilson <chris@chris-wilson.co.uk>2018-04-04 13:17:34 +0100
committerChris Wilson <chris@chris-wilson.co.uk>2018-04-04 13:21:04 +0100
commit4953aa13b93cb753f3ee8c6acf984e123cbf32ae (patch)
tree4f6bc6070583786a86fef2b288e90eb7e3b3a25b /src/sna/sna_render.c
parent12db28ab3d509dfada4f0514858b311f48ed8cc4 (diff)
sna: Always sync before using mmap pointers in memcpy_copy_boxes
kgem_bo_map__(cpu|gtt) leaves the sync up to the caller, in particular so that the obtaining the pointer and controlling the cache domains are not conflated and can be separated. However, it does mean that the caller can not assume that obtaining the pointer updates the cache domains, as it does not. memcpy_copy_boxes fell into this trap. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Diffstat (limited to 'src/sna/sna_render.c')
-rw-r--r--src/sna/sna_render.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/sna/sna_render.c b/src/sna/sna_render.c
index bba7c942..1787ffae 100644
--- a/src/sna/sna_render.c
+++ b/src/sna/sna_render.c
@@ -2370,6 +2370,9 @@ use_gtt:
if (dst == NULL || src == NULL)
return false;
+ kgem_bo_sync__gtt(&sna->kgem, dst_bo);
+ kgem_bo_sync__gtt(&sna->kgem, src_bo);
+
detile = NULL;
} else {
if (dst == dst_bo->map__wc)