All of lore.kernel.org
 help / color / mirror / Atom feed
* Proposal for RandR version 1.6, Leases and EDID-based output grabs
@ 2017-04-01 22:58 "Keith Packard"
  2017-04-02 15:43 ` Daniel Vetter
                   ` (2 more replies)
  0 siblings, 3 replies; 39+ messages in thread
From: "Keith Packard" @ 2017-04-01 22:58 UTC (permalink / raw)
  To: dri-devel-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW,
	xorg-devel-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW


[-- Attachment #1.1: Type: text/plain, Size: 6235 bytes --]


As a part of the DRM leasing work, we need a way to have the X server
create a lease and pass it back to an X client. Here's a proposal for
the RandR specification changes necessary for that. The basic plan is
pretty simple:

 1. Expose the ability to create a lease for a set of CRTCs and
    OUTPUTs. The X server will have to pick a suitable encoder as that's
    not visible via RandR.

 2. Provide a way to hide some monitors from other clients using EDID
    manufacturer ids and product codes. Outputs with EDID properties
    matching the grab will report 'disconnected' to all clients other
    than the grabbing client. This way, the desktop environment never
    knows that an HMD has been plugged in, so there's no transient
    flicker of desktop being presented to it.

I wanted to make it possible for the X server to set the mode on the
leased outputs, but I'm not sure how -- I don't want to display the X
screen on them, and there's no other frame buffer I can name over the
wire. For now, that means the leasing client will need to set a mode
itself. If that fails, it can go whack the X configuration over RandR
and try again, which is all the X server would do anyways.

Comments are welcome; I'll go try to write the code in the next few
days; it all looks pretty easy at this point.

diff --git a/randrproto.txt b/randrproto.txt
index 74b7c36..8dded63 100644
--- a/randrproto.txt
+++ b/randrproto.txt
@@ -1,6 +1,6 @@
 	       The X Resize, Rotate and Reflect Extension
-			     Version 1.5.0
-			       2015-03-14
+			     Version 1.6.0
+			       2017-04-01
 
 			      Jim Gettys
 			   Jim.Gettys-VXdhtT5mjnY@public.gmane.org
@@ -9,9 +9,7 @@
 			Hewlett Packard Company
 
 			     Keith Packard
-			keith.packard-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org
-		     Open Source Technology Center
-			   Intel Corporation
+			  keithp-aN4HjG94KOLQT0dZR+AlfA@public.gmane.org
 
 1. Introduction
 
@@ -186,6 +184,24 @@ consider as single viewable areas.
 Xinerama's information now comes from the Monitors instead of directly
 from the CRTCs. The Monitor marked as Primary will be listed first.
 
+1.6. Introduction to version 1.6 of the extension
+
+Version 1.6 adds resource leasing.
+
+ • A 'Lease' is a collection of crtcs and outputs which are made
+   available to a client for direct access via kernel KMS and DRM
+   APIs. This is done by passing a suitable file descriptor back to
+   the client which has access to those resources. While leased, those
+   resources aren't used by the X server.
+
+Version 1.6 adds EDID-based output 'grabbing'.
+
+ • An 'Output Grab' matches a set of EDID Manufacturer ID and product
+   codes. For outputs with matching EDID values, the connected status
+   of the output is only visible to the grabbing client. Other clients
+   will see the output as disconnected. Attempts to configure the
+   grabbed output by other clients will fail.
+
 1.99 Acknowledgments
 
 Our thanks to the contributors to the design found on the xpert mailing
@@ -273,6 +289,10 @@ Mode
 Provider
 	A value for a PROVIDER argument does not name a defined PROVIDER.
 
+OutputGrab
+	A value for an OUTPUTGRAB argument does not name a defined
+	OUTPUTGRAB
+
 			      ❧❧❧❧❧❧❧❧❧❧❧
 
 5. Protocol Types
@@ -419,6 +439,23 @@ MONITORINFO { name: ATOM
 
 			      ❧❧❧❧❧❧❧❧❧❧❧
 
+5.7. Protocol Types added in version 1.6 of the extension
+
+OUTPUTGRAB { XID }
+
+EDIDMATCH { id: CARD16
+	     code-min: CARD16
+	     code-max: CARD16 }
+
+	These values come from the EDID specification. 'id' is the
+	Manufacturer ID value which is bytes 8 and 9 in the EDID
+	packet, stored in big endian order (MSB first). 'code-min' and
+	'code-max' define a closed-interval of Manufacturer product
+	codes, which is byte 10 and 11 of the EDID packet, stored in
+	little endian order (LSB first).
+
+			      ❧❧❧❧❧❧❧❧❧❧❧
+
 6. Extension Initialization
 
 The name of this extension is "RANDR".
@@ -1666,6 +1703,67 @@ dynamic changes in the display environment.
 	window of the screen.
 
 			      ❧❧❧❧❧❧❧❧❧❧❧
+
+7.6. Extension Requests added in version 1.6 of the extension.
+
+┌───
+    RRCreateLease
+	window : WINDOW
+	crtcs: LISTofCRTC
+	outputs: LISTofOUTPUT
+     ▶
+	nfd: CARD8
+	lease: FD
+└───
+	Errors: Window, Access, Value, CRTC, Output
+
+	Creates a new Lease for the specified crtcs and outputs from
+	the screen defined by 'window'. Returns a KMS/DRM file
+	descriptor which can control the leased objects directly
+	through the kernel. While leased, all resources will appear to
+	be 'useless' to clients other than the leasing client as
+	follows:
+
+	• Crtcs are reported as having no 'possible-outputs' and all
+	  other values reported as if the crtc were disabled.
+
+	• Outputs are reported as having no crtcs they can be
+	  connected to, no clones they can share a crtc with, will
+	  report a connection status of Disconnected, and will show
+	  the current crtc as Disabled.
+
+	The lease remains in effect until the file descriptor is
+	closed, even if the client holding the lease disconnects from
+	the X server.
+
+	Returns an Access error if any of the named resources are in
+	use or already leased to another client.
+
+	Returns a Match error if any of the named resources are in use
+	by the X server.
+
+┌───
+    RRCreateOutputGrab
+	window : WINDOW
+	outputgrab: OUTPUTGRAB
+	matches: LISTofEDIDMATCH
+└───
+	Errors: Window, Access, Value, CRTC, Output
+
+	Creates an Output Grab with the specified ID on the screen
+	associated with 'window'. Any output containing an EDID
+	property matching the grab will appear to be disconnected to
+	all clients other than the grabbing client.
+
+┌───
+    RRDestroyOutputGrab
+	outputgrab: OUTPUTGRAB
+└───
+	Errors: OutputGrab
+
+	Destroys the named OUTPUTGRAB.
+
+			      ❧❧❧❧❧❧❧❧❧❧❧
 8. Extension Events
 
 Clients MAY select for ConfigureNotify on the root window to be


-- 
-keith

[-- Attachment #1.2: signature.asc --]
[-- Type: application/pgp-signature, Size: 832 bytes --]

[-- Attachment #2: Type: text/plain, Size: 192 bytes --]

_______________________________________________
xorg-devel@lists.x.org: X.Org development
Archives: http://lists.x.org/archives/xorg-devel
Info: https://lists.x.org/mailman/listinfo/xorg-devel

^ permalink raw reply related	[flat|nested] 39+ messages in thread

end of thread, other threads:[~2017-05-10  0:29 UTC | newest]

Thread overview: 39+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-04-01 22:58 Proposal for RandR version 1.6, Leases and EDID-based output grabs "Keith Packard"
2017-04-02 15:43 ` Daniel Vetter
     [not found]   ` <20170402154302.zd7nmqf7vtcvgssu-dv86pmgwkMBes7Z6vYuT8azUEOm+Xw19@public.gmane.org>
2017-04-02 19:58     ` Keith Packard
2017-04-03  7:45       ` Daniel Vetter
     [not found]         ` <20170403074528.c7vwoi3mg7yeojdr-dv86pmgwkMBes7Z6vYuT8azUEOm+Xw19@public.gmane.org>
2017-04-03 16:41           ` Keith Packard
2017-04-03 22:07             ` Daniel Vetter
     [not found]               ` <20170403220749.5ujhdzuy6dnikwry-dv86pmgwkMBes7Z6vYuT8azUEOm+Xw19@public.gmane.org>
2017-04-03 22:50                 ` Keith Packard
2017-04-04  7:02                   ` Daniel Vetter
     [not found]                     ` <20170404070242.rphtgg4yopek2sf7-dv86pmgwkMBes7Z6vYuT8azUEOm+Xw19@public.gmane.org>
2017-04-04 15:53                       ` Keith Packard
2017-04-04 15:59                         ` Daniel Vetter
     [not found]                           ` <20170404155923.wllkgop2fyj7wydt-dv86pmgwkMBes7Z6vYuT8azUEOm+Xw19@public.gmane.org>
2017-04-04 16:48                             ` Keith Packard
     [not found]                               ` <864ly4glvd.fsf-6d7jPg3SX/+z9DMzp4kqnw@public.gmane.org>
2017-04-10 17:47                                 ` Mario Kleiner
2017-04-10 18:11                                   ` Keith Packard
2017-04-10 20:05                                     ` Mario Kleiner
     [not found]                                       ` <d6040e25-326c-90dd-bc47-d88e6823e9a3-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2017-04-10 21:16                                         ` Keith Packard
2017-04-10 18:45                       ` Alex Deucher
2017-04-10 19:39                         ` Keith Packard
2017-04-07  0:17 ` Michel Dänzer
     [not found]   ` <4caa78af-7dc8-fbcf-d2ca-285d4554f5c9-otUistvHUpPR7s880joybQ@public.gmane.org>
2017-04-07  3:02     ` Keith Packard
     [not found]       ` <86zifsyl6o.fsf-6d7jPg3SX/+z9DMzp4kqnw@public.gmane.org>
2017-04-07  7:56         ` Pekka Paalanen
2017-04-09 17:27           ` Keith Packard
2017-04-10 11:35             ` Pekka Paalanen
2017-04-28 22:03               ` Keith Packard
     [not found]                 ` <86lgqkw5p6.fsf-6d7jPg3SX/+z9DMzp4kqnw@public.gmane.org>
2017-05-02  7:39                   ` Pekka Paalanen
2017-05-02 14:45                     ` Keith Packard
     [not found]                       ` <868tmfl3lm.fsf-6d7jPg3SX/+z9DMzp4kqnw@public.gmane.org>
2017-05-03  7:08                         ` Pekka Paalanen
2017-05-04  2:04                           ` Keith Packard
     [not found]                             ` <86tw5174y1.fsf-6d7jPg3SX/+z9DMzp4kqnw@public.gmane.org>
2017-05-04  8:13                               ` Pekka Paalanen
2017-05-04 18:02                                 ` Keith Packard
     [not found]                                   ` <86inlg7b5n.fsf-6d7jPg3SX/+z9DMzp4kqnw@public.gmane.org>
2017-05-05  8:20                                     ` Pekka Paalanen
2017-05-05 14:25                                       ` Keith Packard
2017-05-06 11:34                                         ` Mario Kleiner
     [not found]                                           ` <7f68d9fe-a40f-cfb2-3efd-1149d93bb5cb-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2017-05-06 15:19                                             ` Keith Packard
2017-05-08  7:33                                             ` Pekka Paalanen
2017-05-10  0:29                                             ` Dave Airlie
     [not found]                                         ` <867f1v1iut.fsf-6d7jPg3SX/+z9DMzp4kqnw@public.gmane.org>
2017-05-08 10:47                                           ` Pekka Paalanen
2017-05-08 15:29                                             ` Keith Packard
     [not found]                                               ` <86fugfxt7p.fsf-6d7jPg3SX/+z9DMzp4kqnw@public.gmane.org>
2017-05-09  7:08                                                 ` Pekka Paalanen
2017-04-29  5:52 ` Proposal for RandR version 1.6, Leases [v2] Keith Packard

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.