DRI3: provide stub implementation of DRI3SetDRMDeviceInUse
DRI3 version 1.3 introduced a new request which allows clients to provide a hint to the server about which DRM device they are using, so that the server might return DRM format modifiers specific to that device. However, implementing such functionality, for Xwayland in particular, will require fairly significant architectural changes. To avoid blocking future versions of the DRI3 extension, we provide here a stub implementation for the request in question. The spec explicitly states that it is only a hint that the server is free to ignore, so strictly speaking this implementation is still correct. Signed-off-by: Erik Kurzinger <ekurzinger@nvidia.com> Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/967>
This commit is contained in:
parent
e00e7205c9
commit
f051a2449d
|
@ -555,6 +555,27 @@ proc_dri3_buffers_from_pixmap(ClientPtr client)
|
|||
return Success;
|
||||
}
|
||||
|
||||
static int
|
||||
proc_dri3_set_drm_device_in_use(ClientPtr client)
|
||||
{
|
||||
REQUEST(xDRI3SetDRMDeviceInUseReq);
|
||||
WindowPtr window;
|
||||
int status;
|
||||
|
||||
REQUEST_SIZE_MATCH(xDRI3SetDRMDeviceInUseReq);
|
||||
status = dixLookupWindow(&window, stuff->window, client,
|
||||
DixGetAttrAccess);
|
||||
if (status != Success)
|
||||
return status;
|
||||
|
||||
/* TODO Eventually we should use this information to have
|
||||
* DRI3GetSupportedModifiers return device-specific modifiers, but for now
|
||||
* we will ignore it until multi-device support is more complete.
|
||||
* Otherwise we can't advertise support for DRI3 1.4.
|
||||
*/
|
||||
return Success;
|
||||
}
|
||||
|
||||
int (*proc_dri3_vector[DRI3NumberRequests]) (ClientPtr) = {
|
||||
proc_dri3_query_version, /* 0 */
|
||||
proc_dri3_open, /* 1 */
|
||||
|
@ -565,6 +586,7 @@ int (*proc_dri3_vector[DRI3NumberRequests]) (ClientPtr) = {
|
|||
proc_dri3_get_supported_modifiers, /* 6 */
|
||||
proc_dri3_pixmap_from_buffers, /* 7 */
|
||||
proc_dri3_buffers_from_pixmap, /* 8 */
|
||||
proc_dri3_set_drm_device_in_use, /* 9 */
|
||||
};
|
||||
|
||||
int
|
||||
|
@ -698,6 +720,17 @@ sproc_dri3_buffers_from_pixmap(ClientPtr client)
|
|||
return (*proc_dri3_vector[stuff->dri3ReqType]) (client);
|
||||
}
|
||||
|
||||
static int _X_COLD
|
||||
sproc_dri3_set_drm_device_in_use(ClientPtr client)
|
||||
{
|
||||
REQUEST(xDRI3SetDRMDeviceInUseReq);
|
||||
REQUEST_SIZE_MATCH(xDRI3SetDRMDeviceInUseReq);
|
||||
swapl(&stuff->window);
|
||||
swapl(&stuff->drmMajor);
|
||||
swapl(&stuff->drmMinor);
|
||||
return (*proc_dri3_vector[stuff->dri3ReqType]) (client);
|
||||
}
|
||||
|
||||
int (*sproc_dri3_vector[DRI3NumberRequests]) (ClientPtr) = {
|
||||
sproc_dri3_query_version, /* 0 */
|
||||
sproc_dri3_open, /* 1 */
|
||||
|
@ -708,6 +741,7 @@ int (*sproc_dri3_vector[DRI3NumberRequests]) (ClientPtr) = {
|
|||
sproc_dri3_get_supported_modifiers, /* 6 */
|
||||
sproc_dri3_pixmap_from_buffers, /* 7 */
|
||||
sproc_dri3_buffers_from_pixmap, /* 8 */
|
||||
sproc_dri3_set_drm_device_in_use, /* 9 */
|
||||
};
|
||||
|
||||
int _X_COLD
|
||||
|
|
|
@ -52,7 +52,7 @@
|
|||
|
||||
/* DRI3 */
|
||||
#define SERVER_DRI3_MAJOR_VERSION 1
|
||||
#define SERVER_DRI3_MINOR_VERSION 2
|
||||
#define SERVER_DRI3_MINOR_VERSION 3
|
||||
|
||||
/* Generic event extension */
|
||||
#define SERVER_GE_MAJOR_VERSION 1
|
||||
|
|
|
@ -91,7 +91,7 @@ scrnsaverproto_dep = dependency('scrnsaverproto', version: '>= 1.1', fallback: [
|
|||
resourceproto_dep = dependency('resourceproto', version: '>= 1.2.0', fallback: ['xorgproto', 'ext_xorgproto'])
|
||||
xf86driproto_dep = dependency('xf86driproto', version: '>= 2.1.0', fallback: ['xorgproto', 'ext_xorgproto'], required: get_option('dri1') == 'true')
|
||||
dri2proto_dep = dependency('dri2proto', version: '>= 2.8', fallback: ['xorgproto', 'ext_xorgproto'], required: get_option('dri2') == 'true')
|
||||
dri3proto_dep = dependency('dri3proto', version: '>= 1.2', fallback: ['xorgproto', 'ext_xorgproto'], required: get_option('dri3') == 'true')
|
||||
dri3proto_dep = dependency('dri3proto', version: '>= 1.3', fallback: ['xorgproto', 'ext_xorgproto'], required: get_option('dri3') == 'true')
|
||||
xineramaproto_dep = dependency('xineramaproto', fallback: ['xorgproto', 'ext_xorgproto'])
|
||||
xf86bigfontproto_dep = dependency('xf86bigfontproto', version: '>= 1.2.0', fallback: ['xorgproto', 'ext_xorgproto'], required: get_option('xf86bigfont'))
|
||||
xf86vidmodeproto_dep = dependency('xf86vidmodeproto', version: '>= 2.2.99.1', fallback: ['xorgproto', 'ext_xorgproto'])
|
||||
|
|
Loading…
Reference in New Issue