xserver-multidpi/include
Keith Packard e4e3447603 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-27 12:39:50 -05:00
..
.gitignore .gitignore: use common defaults with custom section #24239 2009-11-11 21:40:20 -08:00
Makefile.am glx: Import glxvnd server module (v2) 2018-02-14 17:04:35 -05:00
XIstubs.h Introduce a consistent coding style 2012-03-21 13:54:42 -07:00
Xprintf.h os/xprintf: add Xvscnprintf and Xscnprintf 2012-05-03 14:59:23 +10:00
busfault.h Trap SIGBUS to handle truncated shared memory segments 2013-11-11 15:16:07 -08:00
callback.h Avoid starting a comment with */* 2014-07-17 10:19:52 -07:00
client.h Introduce a consistent coding style 2012-03-21 13:54:42 -07:00
closestr.h Replace 'pointer' type with 'void *' 2014-01-12 10:24:11 -08:00
closure.h Drop trailing whitespaces 2014-11-12 10:25:00 +10:00
colormap.h dix: Unexport various implementation details 2015-07-08 16:40:57 -04:00
colormapst.h Drop trailing whitespaces 2014-11-12 10:25:00 +10:00
cursor.h Drop trailing whitespaces 2014-11-12 10:25:00 +10:00
cursorstr.h cursor: drop ARGB_CURSOR 2015-06-30 12:17:51 +10:00
dbus-core.h xfree86: drop double-typedef of DBusConnection 2014-11-12 10:25:00 +10:00
displaymode.h vidmode: move display mode definitions 2016-02-29 16:28:57 -05:00
dix-config-apple-verbatim.h Move the apple fat binary hacks back to a header file, and make it apple-only. 2009-01-30 16:36:45 -08:00
dix-config.h.in shm, xwayland: prefer atomic close-on-exec without O_TMPFILE 2018-02-02 15:28:46 -05:00
dix.h dix: Remove ffs.c 2017-11-06 17:22:46 -05:00
dixaccess.h Introduce a consistent coding style 2012-03-21 13:54:42 -07:00
dixevents.h dix: Remove redundant declarations. 2012-05-14 13:31:00 +01:00
dixfont.h dix: Switch to the libXfont2 API (v2) 2016-07-18 15:25:59 -04:00
dixfontstr.h dix: Switch to the libXfont2 API (v2) 2016-07-18 15:25:59 -04:00
dixgrabs.h Avoid starting a comment with */* 2014-07-17 10:19:52 -07:00
dixstruct.h dix: Don't track the XKB client versions in the ClientRec 2017-10-24 15:53:28 -04:00
eventconvert.h input: drop FP1616 macro 2012-11-19 12:12:23 +10:00
events.h dga: #if XFreeXDGA → #ifdef XFreeXDGA 2018-02-19 13:14:43 -05:00
eventstr.h dga: #if XFreeXDGA → #ifdef XFreeXDGA 2018-02-19 13:14:43 -05:00
exevents.h dix: Move DeviceFocusEvent from Xi into enterleave.c 2012-05-17 08:50:44 +10:00
extension.h Drop trailing whitespaces 2014-11-12 10:25:00 +10:00
extinit.h miinitext: Load GLX on the mi path 2018-02-14 17:04:48 -05:00
extnsionst.h dix: Remove extension aliases 2017-06-20 16:37:24 -04:00
gc.h Drop trailing whitespaces 2014-11-12 10:25:00 +10:00
gcstruct.h fb: Remove 24bpp support (v3) 2017-03-17 15:14:42 -04:00
globals.h miinitext: General cleanup (v2) 2018-01-22 17:28:12 -05:00
glx_extinit.h miinitext: Load GLX on the mi path 2018-02-14 17:04:48 -05:00
glxvndabi.h glx: Import glxvnd server module (v2) 2018-02-14 17:04:35 -05:00
hotplug.h config: Replace OdevAttributes linked list with struct 2014-07-17 17:10:48 -07:00
input.h os: log a bug whenever WriteToClient is called from the input thread 2017-02-27 09:25:08 +10:00
inputstr.h miinitext: General cleanup (v2) 2018-01-22 17:28:12 -05:00
inpututils.h Input: Add DeviceEventSource enum 2015-11-24 11:36:32 +10:00
list.h Correct xorg_list_is_empty return value description 2018-02-12 08:09:53 +10:00
meson.build meson: Make DGA extension optional 2018-02-19 13:14:43 -05:00
misc.h modesetting: Fix potential buffer overflow 2017-10-30 13:44:34 -04:00
miscstruct.h Drop trailing whitespaces 2014-11-12 10:25:00 +10:00
nonsdk_extinit.h Make PseudoramiXExtensionInit() prototype more generally available 2015-03-16 16:56:17 +00:00
opaque.h configurable maximum number of clients 2015-08-24 00:00:18 -07:00
optionstr.h Introduce a consistent coding style 2012-03-21 13:54:42 -07:00
os.h meson: Detect strlcat/strlcpy/reallocarray in libbsd 2017-05-10 15:08:27 -04:00
pixmap.h Make PixmapDirtyUpdateRec::src a DrawablePtr 2017-08-15 17:01:39 +09:00
pixmapstr.h Make PixmapDirtyUpdateRec::src a DrawablePtr 2017-08-15 17:01:39 +09:00
privates.h dix: Remove PRIVATE_DAMAGE 2017-03-21 11:20:26 -04:00
probes.h Get rid of const warnings in XSERVER_INPUT_EVENT dtrace probe calls 2015-02-10 18:14:44 -08:00
property.h dix: Add a callback chain for window property state change 2017-02-23 13:30:11 -05:00
propertyst.h Drop trailing whitespaces 2014-11-12 10:25:00 +10:00
protocol-versions.h Add RandR leases with modesetting driver support [v6] 2018-02-27 12:39:50 -05:00
ptrveloc.h dix: indentation fixes for pointer acceleration 2012-05-16 10:59:35 +10:00
region.h Drop trailing whitespaces 2014-11-12 10:25:00 +10:00
regionstr.h dix: make RegionInit legal C++ 2015-01-23 10:35:49 -08:00
registry.h XSERVER_DTRACE needs request names from registry too 2014-09-22 12:00:46 -07:00
resource.h dix: export ResourceClientBits() 2015-09-01 20:11:26 -07:00
rgb.h Drop trailing whitespaces 2014-11-12 10:25:00 +10:00
screenint.h Drop trailing whitespaces 2014-11-12 10:25:00 +10:00
scrnintstr.h Make PixmapDirtyUpdateRec::src a DrawablePtr 2017-08-15 17:01:39 +09:00
selection.h Drop trailing whitespaces 2014-11-12 10:25:00 +10:00
servermd.h dix: Fix image byte order on big endian hardware 2015-05-07 14:03:50 -04:00
site.h Drop trailing whitespaces 2014-11-12 10:25:00 +10:00
swaprep.h dix: Unexport various implementation details 2015-07-08 16:40:57 -04:00
swapreq.h dix: Unexport various implementation details 2015-07-08 16:40:57 -04:00
systemd-logind.h systemd-logind: let the logind code decided whether to close an fd 2014-05-05 07:26:33 +10:00
validate.h Introduce a consistent coding style 2012-03-21 13:54:42 -07:00
version-config.h.in Move VENDOR_* defines from AC_SUBST to a header to avoid angering shave. 2009-04-14 10:35:44 -04:00
vidmodestr.h vidmode: build without xf86vidmodeproto 2016-03-01 11:25:59 -05:00
window.h dix: Add hybrid full-size/empty-clip mode to SetRootClip 2016-02-22 13:26:31 -05:00
windowstr.h dix: unifdef pWin->rootlessUnhittable 2015-07-08 16:41:28 -04:00
xkb-config.h.in Move to autoconf standard function name checks & defines 2011-12-05 14:32:45 -08:00
xkbfile.h Drop trailing whitespaces 2014-11-12 10:25:00 +10:00
xkbrules.h xkb: add a call to init an XkbRMLVOSet from const chars 2014-02-04 10:53:59 +10:00
xkbsrv.h dix: Don't track the XKB client versions in the ClientRec 2017-10-24 15:53:28 -04:00
xkbstr.h Drop trailing whitespaces 2014-11-12 10:25:00 +10:00
xorg-config.h.in xfree86: Silence a new glibc warning 2017-05-03 15:44:06 -04:00
xorg-config.h.meson.in Add a Meson build system alongside autotools. 2017-04-26 15:25:27 -07:00
xorg-server.h.in dix: Remove ffs.c 2017-11-06 17:22:46 -05:00
xserver-properties.h Add missing labels for multitouch valuators 2012-10-30 15:11:10 +10:00
xserver_poll.h Use #ifdef instead of #if for features to make Meson easier. 2017-04-26 17:30:12 -04:00
xsha1.h Drop trailing whitespaces 2014-11-12 10:25:00 +10:00
xwin-config.h.in configure: Restore DEFAULT_LOGDIR to xwin-config.h, it is used 2014-06-02 13:07:46 +01:00
xwin-config.h.meson.in Add meson.build for XWin server (v2) 2017-06-02 09:32:35 -07:00