iris: Track imported vs. exported status separately
authorKenneth Graunke <kenneth@whitecape.org>
Thu, 20 May 2021 17:55:53 +0000 (10:55 -0700)
committerMarge Bot <eric+marge@anholt.net>
Wed, 2 Jun 2021 21:18:00 +0000 (21:18 +0000)
commit49070038f432a7266ce99898732e0a878438774f
tree46a1e6716c0d81ce51a880322a95a2ede933544f
parent1a395e1058f53d79c183d36704bbd3ca8a04ec06
iris: Track imported vs. exported status separately

Not all external objects are the same.  Imported buffers may be from
other devices (say a dmabuf from an AMD or NVIDIA discrete card) which
are backed by memory that we can't use with I915_GEM_MMAP.  However,
exported buffers are ones that we know we allocated ourselves from our
own device.  We may not know what other clients are doing with them,
but we can assume a bit more about where they came from.

Acked-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10941>
src/gallium/drivers/iris/iris_bufmgr.c
src/gallium/drivers/iris/iris_bufmgr.h
src/gallium/drivers/iris/iris_resource.c