This adds support for the KHR_display extension to the anv Vulkan driver. The driver now attempts to open the master DRM node when the KHR_display extension is requested so that the common winsys code can perform the necessary operations.
v2: Make sure primary fd is usable
When KHR_display is selected, we try to open the primary node instead of the render node in case the user wants to use KHR_display for presentation. However, if we're actually going to end up using RandR leases, then we don't care if the resulting fd can't be used for display, but the kernel also prevents us from using it for drawing when someone else has master.
v3: Simplify addition of VK_USE_PLATFORM_DISPLAY_KHR to vulkan_wsi_args
54d0daa481 anv: Add KHR_display extension to anv [v7]
src/intel/Makefile.sources | 3 +
src/intel/Makefile.vulkan.am | 7 ++
src/intel/vulkan/anv_device.c | 21 ++++-
src/intel/vulkan/anv_extensions.py | 1 +
src/intel/vulkan/anv_extensions_gen.py | 5 +-
src/intel/vulkan/anv_wsi_display.c | 135 +++++++++++++++++++++++++++++++++
src/intel/vulkan/meson.build | 5 ++
7 files changed, 174 insertions(+), 3 deletions(-)