anv: Use DRM_IOCTL_I915_GEM_CREATE_EXT in all supported kernels
authorJosé Roberto de Souza <jose.souza@intel.com>
Mon, 6 Feb 2023 16:41:08 +0000 (08:41 -0800)
committerMarge Bot <emma+marge@anholt.net>
Thu, 9 Feb 2023 02:57:32 +0000 (02:57 +0000)
commiteaeda2107ef0c1ecf27b92c244da9f4ea244538a
tree64ae040ccf4bb24d8008c4c54a6af66e15bb1832
parent099b9e5058ce3a5ca597af1cce92708906149ee8
anv: Use DRM_IOCTL_I915_GEM_CREATE_EXT in all supported kernels

As we continue to refactor the code base to support Xe KMD here I'm
dropping anv_gem_create() and unifying all graphics memory allocation
calls to anv_gem_create_regions().

anv_gem_create_regions() will call DRM_IOCTL_I915_GEM_CREATE_EXT
for integrated platforms too only leaving DRM_IOCTL_I915_GEM_CREATE
calls to kernel versions that do not support
DRM_IOCTL_I915_GEM_CREATE_EXT.
This can be detected by devinfo->mem.use_class_instance as
DRM_I915_QUERY_MEMORY_REGIONS uAPI landed in the same kernel version
as DRM_IOCTL_I915_GEM_CREATE_EXT.

Signed-off-by: José Roberto de Souza <jose.souza@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20948>
src/intel/vulkan/anv_allocator.c
src/intel/vulkan/anv_gem.c
src/intel/vulkan/anv_gem_stubs.c
src/intel/vulkan/anv_private.h