From 3e0ba16cd8eb63f61106861a37bb7f5ea35ce788 Mon Sep 17 00:00:00 2001 From: Yuxuan Shui Date: Mon, 5 Jan 2026 19:13:14 +0000 Subject: [PATCH] wsi/display: move set atomic cap out of wsi_display_get_connector In all other cases, we immediately set atomic cap after acquiring a drm fd: - wsi_init - AcquireXlib - AcquireDrm wsi_GetDrmDisplayEXT is the only function left where the atomic cap is set by wsi_display_get_connector. This commit moves the set atomic cap into wsi_GetDrmDisplayEXT. Signed-off-by: Yuxuan Shui --- src/vulkan/wsi/wsi_common_display.c | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/src/vulkan/wsi/wsi_common_display.c b/src/vulkan/wsi/wsi_common_display.c index a2898a72c82..0a6b30cc4c0 100644 --- a/src/vulkan/wsi/wsi_common_display.c +++ b/src/vulkan/wsi/wsi_common_display.c @@ -694,14 +694,6 @@ wsi_display_get_connector(struct wsi_device *wsi_device, if (drm_fd < 0) return NULL; - /* We set this flag because this is the common entrypoint before we start - * using atomic capabilities -- it's a simple bool setting in the kernel to - * make the properties we start querying be available, and re-setting it is - * harmless. Otherwise, we'd need to push it up to all the entrypoints that - * a drm FD comes thorugh. - */ - drmSetClientCap(drm_fd, DRM_CLIENT_CAP_ATOMIC, 1); - drmModeConnectorPtr drm_connector = drmModeGetConnector(drm_fd, connector_id); @@ -4471,6 +4463,8 @@ wsi_GetDrmDisplayEXT(VkPhysicalDevice physicalDevice, return VK_ERROR_UNKNOWN; } + drmSetClientCap(drmFd, DRM_CLIENT_CAP_ATOMIC, 1); + struct wsi_display_connector *connector = wsi_display_get_connector(wsi_device, drmFd, connectorId);