mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-02-15 06:40:27 +01:00
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: 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/38987>
This commit is contained in:
parent
7dbabc6acc
commit
e0fbf9a908
1 changed files with 2 additions and 0 deletions
|
|
@ -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;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue