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>
This commit is contained in:
parent
12db28ab3d
commit
4953aa13b9
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Reference in New Issue