iris: drop cache coherent cpu mapping for external BO
authorLionel Landwerlin <lionel.g.landwerlin@intel.com>
Mon, 13 Apr 2020 15:14:24 +0000 (18:14 +0300)
committerMarge Bot <eric+marge@anholt.net>
Wed, 15 Apr 2020 09:01:52 +0000 (09:01 +0000)
commit8ce46f352e9e2ad103a5058895f3ab4ee164ea33
tree869a66e0c8f73ee21615e8cd46acf568a69f177e
parent08a396033be1d7ceddf48da0563a7e4d2cb64429
iris: drop cache coherent cpu mapping for external BO

We have to assume any external buffer could be used by the display HW.
In the case that buffer is also CPU mapped, we want to assume no cache
coherency as it is only available between GT & CPU, not display.

Many thanks to Michel Dänzer for the hint!

v2: Move cache coherent drop to bufmgr (Chris)

v3: Also make BO external if created with PIPE_BIND_SHARED (Eric)

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Cc: <mesa-stable@lists.freedesktop.org>
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/2552
Reviewed-by: Eric Anholt <eric@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4533>
src/gallium/drivers/iris/iris_bufmgr.c
src/gallium/drivers/iris/iris_bufmgr.h
src/gallium/drivers/iris/iris_resource.c