From e0fbf9a90834ed842e09df29a436a197d0cc15db Mon Sep 17 00:00:00 2001 From: Yuxuan Shui Date: Wed, 17 Dec 2025 08:14:24 +0000 Subject: [PATCH] wsi/display: Set atomic client cap in Acquire{Drm,Xlib}DisplayEXT as well. Since we use atomic mode setting now, the wsi->fd we use needs to have the atomic client cap. There are several different code paths where wsi can acquire a file descriptor. For drm masters, the atomic client cap is set in wsi_display_init_wsi. For leased drm fds, there are AcquireDrmDisplayEXT and AcquireXlibDisplayEXT. According to a comment we previously assumed wsi_display_get_connector is common among all code paths, and that's why the atomic client cap was set there. But that assumption can be broken based on the particular order which the application invokes vulkan APIs in. This commit simply push the drmSetClientCap to all entrypoints where a drm fd comes through. Fixes: 513ffea1d366 ("wsi/display: use atomic mode setting") Signed-off-by: Yuxuan Shui Part-of: --- src/vulkan/wsi/wsi_common_display.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/vulkan/wsi/wsi_common_display.c b/src/vulkan/wsi/wsi_common_display.c index 4c9451a6d00..630c3baadd1 100644 --- a/src/vulkan/wsi/wsi_common_display.c +++ b/src/vulkan/wsi/wsi_common_display.c @@ -3784,6 +3784,7 @@ wsi_AcquireXlibDisplayEXT(VkPhysicalDevice physicalDevice, if (fd < 0) return VK_ERROR_INITIALIZATION_FAILED; + drmSetClientCap(fd, DRM_CLIENT_CAP_ATOMIC, 1); wsi->fd = fd; #endif @@ -4074,6 +4075,7 @@ wsi_AcquireDrmDisplayEXT(VkPhysicalDevice physicalDevice, drmModeFreeConnector(drm_connector); + drmSetClientCap(drmFd, DRM_CLIENT_CAP_ATOMIC, 1); wsi->fd = drmFd; return VK_SUCCESS; }