xserver-multidpi/hw/xfree86
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
..
common dga: #if XFreeXDGA → #ifdef XFreeXDGA 2018-02-19 13:14:43 -05:00
ddc Add a Meson build system alongside autotools. 2017-04-26 15:25:27 -07:00
dixmods miinitext: Load GLX on the mi path 2018-02-14 17:04:48 -05:00
doc docs: correct LoadExtensionList() documentation 2018-02-21 11:07:18 -05:00
dri hw/xfree86: unvalidated lengths 2017-10-10 23:33:44 +02:00
dri2 Use ARRAY_SIZE all over the tree 2017-10-30 13:45:20 -04:00
drivers Add RandR leases with modesetting driver support [v6] 2018-02-27 12:39:50 -05:00
exa meson: Fix linkage of loadable modules for PE/COFF 2017-10-12 15:22:04 -04:00
fbdevhw fbdevhw: Fix inconsistent #if DEBUG usage 2017-10-20 13:15:25 -04:00
glamor_egl glamor: Make Xv extension initialize at depth 30. 2018-02-27 10:18:06 -05:00
i2c Add a Meson build system alongside autotools. 2017-04-26 15:25:27 -07:00
int10 meson: Silence -Wformat-nonliteral for x86emu 2017-10-20 13:15:35 -04:00
loader Use ARRAY_SIZE all over the tree 2017-10-30 13:45:20 -04:00
man xfree86: link to libinput(4) from the xorg.conf man page 2017-07-04 17:44:32 +10:00
modes Add RandR leases with modesetting driver support [v6] 2018-02-27 12:39:50 -05:00
os-support xfree86: Remove xf86InterceptSignals 2017-12-13 11:11:38 -05:00
parser os, xfree86: Stop being so weird about <limits.h> 2017-05-12 09:49:07 -04:00
ramdac ramdac: Check ScreenPriv != NULL in xf86ScreenSetCursor() 2017-10-25 09:52:44 -04:00
shadowfb meson: Fix linkage of loadable modules for PE/COFF 2017-10-12 15:22:04 -04:00
utils xfree86: small memory leaks fixes 2016-09-28 14:53:39 -04:00
vbe meson: Build libvbe.so 2017-04-27 15:19:45 -04:00
vgahw meson: Build libvgahw.so 2017-04-27 15:19:41 -04:00
x86emu x86emu: Teach the debug code about varargs 2018-01-16 16:08:38 -05:00
xkb Move statically linked xorgxkb files from dixmods to a separate directory 2017-06-27 12:42:06 -04:00
.gitignore Xorg: Add Xorg.wrap to hw/xfree86/.gitignore 2014-04-18 11:39:16 +02:00
Makefile.am glx: Use vnd layer for dispatch (v4) 2018-02-14 17:04:44 -05:00
meson.build glx: Use vnd layer for dispatch (v4) 2018-02-14 17:04:44 -05:00
sdksyms.sh Use #ifdef instead of #if for features to make Meson easier. 2017-04-26 17:30:12 -04:00
xorg-wrapper.c suid: Include sysmacros.h to fix build after glibc-2.25 2017-09-25 13:04:25 -04:00
Xorg.sh.in xfree86: rename Xorg.bin to Xorg 2015-01-05 09:53:58 +10:00
xorgconf.cpp xfree86: fix wrong DontZap documentation (#71113) 2014-05-24 20:02:56 +10:00