mesa/src/vulkan/wsi
Yuxuan Shui 37a1986691 wsi/display: initialize Xlib display connector property IDs in all cases
Usually connector property IDs are acquired in
wsi_display_get_connector, which is called by wsi_get_connectors, and in
turn by vkGetPhysicalDeviceDisplayProperties2KHR and
vkGetPhysicalDeviceDisplayPlanePropertiesKHR. Except if the drm fd is
not available when these functions are called. Which will be the case if
vkAcquireXlibDisplayEXT is not called first.

So it goes like this. First, the display is created in
vkGetRandROutputDisplayEXT. Then it's used in
vkGetPhysicalDeviceDisplayPlanePropertiesKHR, but since the drm fd is
not available at this point, connector property IDs are not initialized.
Later, this display is used in vkAcquireXlibDisplayEXT, which also
doesn't touch the property IDs. Finally in drm_atomic_commit, the
atomic commit fails with EINVAL, specifically because of the
uninitialized ID of the "CRTC_ID" property. Since it's one of the
properties drm_atomic_commit tries to set.

This commit makes sure that find_connector_properties is called in
vkAcquireXlibDisplayEXT to initialize the property IDs.

Fixes: 513ffea1d3 ("wsi/display: use atomic mode setting")
Signed-off-by: Yuxuan Shui <yshui@codeweavers.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39166>
2026-04-10 20:29:05 +00:00
..
meson.build x11: Add an x11_xlib_display_is_thread_safe() helper 2025-07-16 01:32:56 +00:00
wsi_common.c vulkan/wsi/wayland: Correctly map 24bpp format types 2026-02-17 19:25:19 +00:00
wsi_common.h vulkan/wsi/wayland: Correctly map 24bpp format types 2026-02-17 19:25:19 +00:00
wsi_common_display.c wsi/display: initialize Xlib display connector property IDs in all cases 2026-04-10 20:29:05 +00:00
wsi_common_display.h
wsi_common_drm.c vulkan/wsi/drm: force prime buffer blit for WSI_DEBUG_BUFFER 2026-02-20 05:26:57 +00:00
wsi_common_drm.h vk/wsi: C++-proof wsi_common_drm.h 2023-03-24 15:49:25 +00:00
wsi_common_headless.c vulkan/wsi/headless: implement wait_for_present for swapchain 2026-03-27 19:55:11 +00:00
wsi_common_metal.c wsi/metal: Expose additional color spaces if instance extension enabled 2026-02-12 19:24:45 +00:00
wsi_common_metal_layer.h wsi/metal: Disable reference counting 2025-10-13 20:17:16 +00:00
wsi_common_metal_layer.m docs: update/fix vk spec urls 2025-10-22 09:23:34 +02:00
wsi_common_private.h wsi/common: Allow timestampValidBits < 64 for present timing. 2026-01-27 11:09:53 +00:00
wsi_common_queue.h vulkan/wsi/x11: Make sure error is returned if create_swapchain fails 2026-02-05 19:15:19 +00:00
wsi_common_wayland.c wsi/wayland: Use wl_fixes to destroy wl_registry 2026-03-12 16:24:33 +00:00
wsi_common_win32.cpp vulkan/wsi/win32: respect acquire timeout for sw wsi 2026-03-30 16:10:01 +00:00
wsi_common_x11.c vulkan/wsi: Check that xshm can be attached 2026-03-06 01:18:53 +00:00