mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-03-11 17:50:32 +01:00
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 <yshui@codeweavers.com>
This commit is contained in:
parent
9854d522e2
commit
3e0ba16cd8
1 changed files with 2 additions and 8 deletions
|
|
@ -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);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue