2009-09-18 08:27:54 +02:00
|
|
|
/*
|
|
|
|
* Copyright © 2009 Red Hat, Inc.
|
|
|
|
*
|
|
|
|
* Permission is hereby granted, free of charge, to any person obtaining a
|
|
|
|
* copy of this software and associated documentation files (the "Software"),
|
|
|
|
* to deal in the Software without restriction, including without limitation
|
|
|
|
* the rights to use, copy, modify, merge, publish, distribute, sublicense,
|
|
|
|
* and/or sell copies of the Software, and to permit persons to whom the
|
|
|
|
* Software is furnished to do so, subject to the following conditions:
|
|
|
|
*
|
|
|
|
* The above copyright notice and this permission notice (including the next
|
|
|
|
* paragraph) shall be included in all copies or substantial portions of the
|
|
|
|
* Software.
|
|
|
|
*
|
|
|
|
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
|
|
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
|
|
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
|
|
|
|
* THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
|
|
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
|
|
|
* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
|
|
|
* DEALINGS IN THE SOFTWARE.
|
|
|
|
*
|
|
|
|
*/
|
|
|
|
|
|
|
|
/**
|
|
|
|
* This file specifies the server-supported protocol versions.
|
|
|
|
*/
|
|
|
|
#ifndef _PROTOCOL_VERSIONS_
|
|
|
|
#define _PROTOCOL_VERSIONS_
|
|
|
|
|
|
|
|
/* Apple DRI */
|
|
|
|
#define SERVER_APPLEDRI_MAJOR_VERSION 1
|
|
|
|
#define SERVER_APPLEDRI_MINOR_VERSION 0
|
|
|
|
#define SERVER_APPLEDRI_PATCH_VERSION 0
|
|
|
|
|
|
|
|
/* AppleWM */
|
|
|
|
#define SERVER_APPLEWM_MAJOR_VERSION 1
|
|
|
|
#define SERVER_APPLEWM_MINOR_VERSION 3
|
|
|
|
#define SERVER_APPLEWM_PATCH_VERSION 0
|
|
|
|
|
|
|
|
/* Composite */
|
|
|
|
#define SERVER_COMPOSITE_MAJOR_VERSION 0
|
|
|
|
#define SERVER_COMPOSITE_MINOR_VERSION 4
|
|
|
|
|
|
|
|
/* Damage */
|
|
|
|
#define SERVER_DAMAGE_MAJOR_VERSION 1
|
|
|
|
#define SERVER_DAMAGE_MINOR_VERSION 1
|
|
|
|
|
2013-12-13 17:36:38 +01:00
|
|
|
/* DRI3 */
|
|
|
|
#define SERVER_DRI3_MAJOR_VERSION 1
|
2018-02-28 02:19:46 +01:00
|
|
|
#define SERVER_DRI3_MINOR_VERSION 2
|
2013-12-13 17:36:38 +01:00
|
|
|
|
2009-09-18 08:27:54 +02:00
|
|
|
/* DMX */
|
|
|
|
#define SERVER_DMX_MAJOR_VERSION 2
|
|
|
|
#define SERVER_DMX_MINOR_VERSION 2
|
|
|
|
#define SERVER_DMX_PATCH_VERSION 20040604
|
|
|
|
|
|
|
|
/* Generic event extension */
|
|
|
|
#define SERVER_GE_MAJOR_VERSION 1
|
|
|
|
#define SERVER_GE_MINOR_VERSION 0
|
|
|
|
|
|
|
|
/* GLX */
|
|
|
|
#define SERVER_GLX_MAJOR_VERSION 1
|
2009-10-01 19:39:19 +02:00
|
|
|
#define SERVER_GLX_MINOR_VERSION 4
|
2009-09-18 08:27:54 +02:00
|
|
|
|
|
|
|
/* Xinerama */
|
|
|
|
#define SERVER_PANORAMIX_MAJOR_VERSION 1
|
|
|
|
#define SERVER_PANORAMIX_MINOR_VERSION 1
|
|
|
|
|
2013-12-13 17:39:16 +01:00
|
|
|
/* Present */
|
|
|
|
#define SERVER_PRESENT_MAJOR_VERSION 1
|
2018-03-16 14:24:21 +01:00
|
|
|
#define SERVER_PRESENT_MINOR_VERSION 2
|
2013-12-13 17:39:16 +01:00
|
|
|
|
2009-09-18 08:27:54 +02:00
|
|
|
/* RandR */
|
|
|
|
#define SERVER_RANDR_MAJOR_VERSION 1
|
Add RandR leases with modesetting driver support [v6]
This adds support for RandR CRTC/Output leases through the modesetting
driver, creating a lease using new kernel infrastructure and returning
that to a client through an fd which will have access to only those
resources.
v2: Restore CRTC mode when leases terminate
When a lease terminates for a crtc we have saved data for, go
ahead and restore the saved mode.
v3: Report RR_Rotate_0 rotations for leased crtcs.
Ignore leased CRTCs when selecting screen size.
Stop leasing encoders, the kernel doesn't do that anymore.
Turn off crtc->enabled while leased so that modesetting
ignores them.
Check lease status before calling any driver mode functions
When starting a lease, mark leased CRTCs as disabled and hide
their cursors. Also, check to see if there are other
non-leased CRTCs which are driving leased Outputs and mark
them as disabled as well. Sometimes an application will lease
an idle crtc instead of the one already associated with the
leased output.
When terminating a lease, reset any CRTCs which are driving
outputs that are no longer leased so that they start working
again.
This required splitting the DIX level lease termination code
into two pieces, one to remove the lease from the system
(RRLeaseTerminated) and a new function that frees the lease
data structure (RRLeaseFree).
v4: Report RR_Rotate_0 rotation for leased crtcs.
v5: Terminate all leases on server reset.
Leases hang around after the associated client exits so that
the client doesn't need to occupy an X server client slot and
consume a file descriptor once it has gotten the output
resources necessary.
Any leases still hanging around when the X server resets or
shuts down need to be cleaned up by calling the kernel to
terminate the lease and freeing any DIX structures.
Note that we cannot simply use the existing
drmmode_terminate_lease function on each lease as that wants
to also reset the video mode, and during server shut down that
modesetting: Validate leases on VT enter
The kernel doesn't allow any master ioctls to run when another
VT is active, including simple things like listing the active
leases. To deal with that, we check the list of leases
whenever the X server VT is activated.
xfree86: hide disabled cursors when resetting after lease termination
The lessee may well have played with cursors and left one
active on our screen. Just tell the kernel to turn it off.
v6: Add meson build infrastructure
[Also bumped libdrm requirement - ajax]
Signed-off-by: Keith Packard <keithp@keithp.com>
Reviewed-by: Adam Jackson <ajax@redhat.com>
2018-02-12 22:51:56 +01:00
|
|
|
#define SERVER_RANDR_MINOR_VERSION 6
|
2009-09-18 08:27:54 +02:00
|
|
|
|
|
|
|
/* Record */
|
|
|
|
#define SERVER_RECORD_MAJOR_VERSION 1
|
|
|
|
#define SERVER_RECORD_MINOR_VERSION 13
|
|
|
|
|
|
|
|
/* Render */
|
|
|
|
#define SERVER_RENDER_MAJOR_VERSION 0
|
2010-06-13 02:23:09 +02:00
|
|
|
#define SERVER_RENDER_MINOR_VERSION 11
|
2009-09-18 08:27:54 +02:00
|
|
|
|
|
|
|
/* RandR Xinerama */
|
|
|
|
#define SERVER_RRXINERAMA_MAJOR_VERSION 1
|
|
|
|
#define SERVER_RRXINERAMA_MINOR_VERSION 1
|
|
|
|
|
|
|
|
/* Screensaver */
|
|
|
|
#define SERVER_SAVER_MAJOR_VERSION 1
|
|
|
|
#define SERVER_SAVER_MINOR_VERSION 1
|
|
|
|
|
|
|
|
/* Security */
|
|
|
|
#define SERVER_SECURITY_MAJOR_VERSION 1
|
|
|
|
#define SERVER_SECURITY_MINOR_VERSION 0
|
|
|
|
|
|
|
|
/* Shape */
|
|
|
|
#define SERVER_SHAPE_MAJOR_VERSION 1
|
|
|
|
#define SERVER_SHAPE_MINOR_VERSION 1
|
|
|
|
|
|
|
|
/* SHM */
|
|
|
|
#define SERVER_SHM_MAJOR_VERSION 1
|
2013-11-03 19:08:15 +01:00
|
|
|
#if XTRANS_SEND_FDS
|
|
|
|
#define SERVER_SHM_MINOR_VERSION 2
|
|
|
|
#else
|
2009-09-18 08:27:54 +02:00
|
|
|
#define SERVER_SHM_MINOR_VERSION 1
|
2013-11-03 19:08:15 +01:00
|
|
|
#endif
|
2009-09-18 08:27:54 +02:00
|
|
|
|
2010-12-06 22:36:14 +01:00
|
|
|
/* Sync */
|
|
|
|
#define SERVER_SYNC_MAJOR_VERSION 3
|
2010-12-06 21:14:01 +01:00
|
|
|
#define SERVER_SYNC_MINOR_VERSION 1
|
2010-12-06 22:36:14 +01:00
|
|
|
|
Add Windows-DRI extension
If windowsdriproto headers are available, build a Windows-DRI extension,
which supports requests to enable local clients to directly render GL to a
Windows drawable:
- a query to check if WGL is being used on a screen
- a query to map a fbconfigID to a native pixelformatindex
- a query to map a drawable to a native handle
Windows-DRI can only be useful if we are using WGL, so make an note if WGL
is active on a screen.
Make validGlxDrawable() public
Adjust glxWinSetPixelFormat() so it doesn't require a context, just a
screen and config.
That enables factoring out the deferred drawable creation code as
glxWinDeferredCreateDrawable()
Enhance glxWinDeferredCreateDrawable(), so that pixmaps are placed into a
file mapping, so they exist in memory which can be shared with the direct
rendering process.
Currently, this file mapping is accessed by a name generated from the XID.
This will not be unique across multiple server instances. It would perhaps
be better, although more complicated, to use an anonymous file mapping, and
then duplicate the handle for the direct rendering process.
Use glxWinDeferredCreateDrawable() to ensure the native handle exists for
the Windows-DRI query to map a drawable to native handle.
v2:
Various printf format warning fixes
v3:
Fix format warnings on x86
Move some uninteresting windows-dri output to debug log level
v4:
check for windowsdriproto when --enable-windowsdri
use windowsdriproto_CFLAGS
Signed-off-by: Jon Turney <jon.turney@dronecode.org.uk>
Reviewed-by: Colin Harrison <colin.harrison@virgin.net>
2014-07-24 13:29:41 +02:00
|
|
|
/* Windows DRI */
|
|
|
|
#define SERVER_WINDOWSDRI_MAJOR_VERSION 1
|
|
|
|
#define SERVER_WINDOWSDRI_MINOR_VERSION 0
|
|
|
|
#define SERVER_WINDOWSDRI_PATCH_VERSION 0
|
|
|
|
|
2009-09-18 08:27:54 +02:00
|
|
|
/* Windows WM */
|
|
|
|
#define SERVER_WINDOWSWM_MAJOR_VERSION 1
|
|
|
|
#define SERVER_WINDOWSWM_MINOR_VERSION 0
|
|
|
|
#define SERVER_WINDOWSWM_PATCH_VERSION 0
|
|
|
|
|
|
|
|
/* DGA */
|
|
|
|
#define SERVER_XDGA_MAJOR_VERSION 2
|
|
|
|
#define SERVER_XDGA_MINOR_VERSION 0
|
|
|
|
|
|
|
|
/* Big Font */
|
|
|
|
#define SERVER_XF86BIGFONT_MAJOR_VERSION 1
|
|
|
|
#define SERVER_XF86BIGFONT_MINOR_VERSION 1
|
|
|
|
|
|
|
|
/* DRI */
|
|
|
|
#define SERVER_XF86DRI_MAJOR_VERSION 4
|
|
|
|
#define SERVER_XF86DRI_MINOR_VERSION 1
|
|
|
|
#define SERVER_XF86DRI_PATCH_VERSION 20040604
|
|
|
|
|
|
|
|
/* Vidmode */
|
|
|
|
#define SERVER_XF86VIDMODE_MAJOR_VERSION 2
|
|
|
|
#define SERVER_XF86VIDMODE_MINOR_VERSION 2
|
|
|
|
|
|
|
|
/* Fixes */
|
2011-05-25 11:54:35 +02:00
|
|
|
#define SERVER_XFIXES_MAJOR_VERSION 5
|
2009-09-18 08:27:54 +02:00
|
|
|
#define SERVER_XFIXES_MINOR_VERSION 0
|
|
|
|
|
|
|
|
/* X Input */
|
|
|
|
#define SERVER_XI_MAJOR_VERSION 2
|
2013-01-23 19:11:55 +01:00
|
|
|
#define SERVER_XI_MINOR_VERSION 3
|
2009-09-18 08:27:54 +02:00
|
|
|
|
|
|
|
/* XKB */
|
|
|
|
#define SERVER_XKB_MAJOR_VERSION 1
|
|
|
|
#define SERVER_XKB_MINOR_VERSION 0
|
|
|
|
|
|
|
|
/* Resource */
|
|
|
|
#define SERVER_XRES_MAJOR_VERSION 1
|
2010-11-29 11:40:56 +01:00
|
|
|
#define SERVER_XRES_MINOR_VERSION 2
|
2009-09-18 08:27:54 +02:00
|
|
|
|
|
|
|
/* XvMC */
|
|
|
|
#define SERVER_XVMC_MAJOR_VERSION 1
|
|
|
|
#define SERVER_XVMC_MINOR_VERSION 1
|
|
|
|
|
|
|
|
#endif
|