From a12ced260116d5a99233a1b9840b4bc0e3633467 Mon Sep 17 00:00:00 2001 From: matthieu Date: Sun, 3 Jan 2016 10:34:28 +0000 Subject: [PATCH] Update to randrproto 1.5.0 --- proto/randrproto/ChangeLog | 51 ++++++++ proto/randrproto/configure.ac | 2 +- proto/randrproto/randr.h | 10 +- proto/randrproto/randrproto.h | 59 +++++++++ proto/randrproto/randrproto.txt | 223 +++++++++++++++++++++++++++++++- 5 files changed, 338 insertions(+), 7 deletions(-) diff --git a/proto/randrproto/ChangeLog b/proto/randrproto/ChangeLog index 1e3c9af96..8a35c61db 100644 --- a/proto/randrproto/ChangeLog +++ b/proto/randrproto/ChangeLog @@ -1,3 +1,54 @@ +commit 79b63f0e57cd5baf06ff24252d3f1675dcb64467 +Author: Dave Airlie +Date: Sun May 17 14:29:29 2015 +1000 + + randrproto 1.5.0 + +commit 895ee5264524c7c239ee4ef5e39c4e295323fb51 +Author: Dave Airlie +Date: Wed Apr 22 10:58:18 2015 +1000 + + randrproto: clarify output XID lifetimes. + + This just makes a note that randr won't make outputs disappear + dynamically. + + Reviewed-by: Aaron Plattner + Signed-off-by: Dave Airlie + +commit 98da0d6e48b7d124d6788ea568e9f9e3dc204322 +Author: Dave Airlie +Date: Mon Feb 2 16:17:56 2015 +1000 + + randrproto: add tile property info for randr 1.5 + + expose this as an array of 8 32-bit values. + + Reviewed-by: Keith Packard + Signed-off-by: Dave Airlie + +commit 4109f29861a7066970a2afd079d0fc2c12828bcb +Author: Keith Packard +Date: Fri Dec 12 15:57:57 2014 -0800 + + Add Monitors, update version to 1.5 (v2) + + v2: [airlied] add get_active to monitor get + interface, to allow normal vs configuration + clients to see active vs all monitors. (r-b by keithp) + + Reviewed-by: Dave Airlie + Signed-off-by: Keith Packard + +commit d501a4f08ee3c5435841aa70c0d5cd4b7398bd12 +Author: Keith Packard +Date: Fri Dec 12 15:57:40 2014 -0800 + + Fix spelling errors in randrproto.txt + + Reviewed-by: Dave Airlie + Signed-off-by: Keith Packard + commit b1ba68df8a5fc113a387123ec2f312195e28e47f Author: Alan Coopersmith Date: Sat Mar 14 09:35:04 2015 -0700 diff --git a/proto/randrproto/configure.ac b/proto/randrproto/configure.ac index 38dabfc0f..18197e32b 100644 --- a/proto/randrproto/configure.ac +++ b/proto/randrproto/configure.ac @@ -22,7 +22,7 @@ dnl dnl Process this file with autoconf to create configure. AC_PREREQ([2.60]) -AC_INIT([RandrProto], [1.4.1], +AC_INIT([RandrProto], [1.5.0], [https://bugs.freedesktop.org/enter_bug.cgi?product=xorg]) AM_INIT_AUTOMAKE([foreign dist-bzip2]) diff --git a/proto/randrproto/randr.h b/proto/randrproto/randr.h index 3c6721bc5..6fcda8748 100644 --- a/proto/randrproto/randr.h +++ b/proto/randrproto/randr.h @@ -40,11 +40,11 @@ typedef unsigned long XRandrModeFlags; #define RANDR_NAME "RANDR" #define RANDR_MAJOR 1 -#define RANDR_MINOR 4 +#define RANDR_MINOR 5 #define RRNumberErrors 4 #define RRNumberEvents 2 -#define RRNumberRequests 42 +#define RRNumberRequests 45 #define X_RRQueryVersion 0 /* we skip 1 to make old clients fail pretty immediately */ @@ -104,6 +104,11 @@ typedef unsigned long XRandrModeFlags; #define X_RRDeleteProviderProperty 40 #define X_RRGetProviderProperty 41 +/* v1.5 */ +#define X_RRGetMonitors 42 +#define X_RRSetMonitor 43 +#define X_RRDeleteMonitor 44 + /* Event selection bits */ #define RRScreenChangeNotifyMask (1L << 0) /* V1.2 additions */ @@ -181,6 +186,7 @@ typedef unsigned long XRandrModeFlags; #define RR_PROPERTY_BORDER "Border" #define RR_PROPERTY_BORDER_DIMENSIONS "BorderDimensions" #define RR_PROPERTY_GUID "GUID" +#define RR_PROPERTY_RANDR_TILE "TILE" /* roles this device can carry out */ #define RR_Capability_None 0 diff --git a/proto/randrproto/randrproto.h b/proto/randrproto/randrproto.h index 30691e7ea..114a6248e 100644 --- a/proto/randrproto/randrproto.h +++ b/proto/randrproto/randrproto.h @@ -50,6 +50,7 @@ #define RRCrtc CARD32 #define RRProvider CARD32 #define RRModeFlags CARD32 +#define Atom CARD32 #define Rotation CARD16 #define SizeID CARD16 @@ -1012,6 +1013,63 @@ typedef struct { } xRRSetPanningReply; #define sz_xRRSetPanningReply 32 +typedef struct { + Atom name B32; + BOOL primary; + BOOL automatic; + CARD16 noutput B16; + INT16 x B16; + INT16 y B16; + CARD16 width B16; + CARD16 height B16; + CARD32 widthInMillimeters B32; + CARD32 heightInMillimeters B32; +} xRRMonitorInfo; +#define sz_xRRMonitorInfo 24 + +typedef struct { + CARD8 reqType; + CARD8 randrReqType; + CARD16 length B16; + Window window B32; + BOOL get_active; + CARD8 pad; + CARD16 pad2; +} xRRGetMonitorsReq; +#define sz_xRRGetMonitorsReq 12 + +typedef struct { + BYTE type; + CARD8 status; + CARD16 sequenceNumber B16; + CARD32 length B32; + Time timestamp B32; + CARD32 nmonitors B32; + CARD32 noutputs B32; + CARD32 pad1 B32; + CARD32 pad2 B32; + CARD32 pad3 B32; +} xRRGetMonitorsReply; +#define sz_xRRGetMonitorsReply 32 + +typedef struct { + CARD8 reqType; + CARD8 randrReqType; + CARD16 length B16; + Window window B32; + xRRMonitorInfo monitor; +} xRRSetMonitorReq; +#define sz_xRRSetMonitorReq 32 + +typedef struct { + CARD8 reqType; + CARD8 randrReqType; + CARD16 length B16; + Window window B32; + Atom name B32; +} xRRDeleteMonitorReq; +#define sz_xRRDeleteMonitorReq 12 + #undef RRModeFlags #undef RRCrtc #undef RRMode @@ -1033,5 +1091,6 @@ typedef struct { #undef Rotation #undef SizeID #undef SubpixelOrder +#undef Atom #endif /* _XRANDRP_H_ */ diff --git a/proto/randrproto/randrproto.txt b/proto/randrproto/randrproto.txt index 190048299..416f0017e 100644 --- a/proto/randrproto/randrproto.txt +++ b/proto/randrproto/randrproto.txt @@ -1,5 +1,5 @@ The X Resize, Rotate and Reflect Extension - Version 1.4.1 + Version 1.5.0 2015-03-14 Jim Gettys @@ -149,7 +149,52 @@ be dynamically configured to provide support for: 4) multiple GPU rendering - This replaces Xinerama. -1.99 Acknowledgements +1.5. Introduction to version 1.5 of the extension + +Version 1.5 adds an optional TILE property to outputs. + + • An optional TILE property. + This property is used to denote individual tiles in a tiled monitor + configuration, as exposed via DisplayID v1.3. + +Version 1.5 adds monitors + + • A 'Monitor' is a rectangular subset of the screen which represents + a coherent collection of pixels presented to the user. + + • Each Monitor is be associated with a list of outputs (which may be + empty). + + • When clients define monitors, the associated outputs are removed from + existing Monitors. If removing the output causes the list for that + monitor to become empty, that monitor will be deleted. + + • For active CRTCs that have no output associated with any + client-defined Monitor, one server-defined monitor will + automatically be defined of the first Output associated with them. + + • When defining a monitor, setting the geometry to all zeros will + cause that monitor to dynamically track the bounding box of the + active outputs associated with them + +This new object separates the physical configuration of the hardware +from the logical subsets the screen that applications should +consider as single viewable areas. + +1.5.1. Relationship between Monitors and Xinerama + +Xinerama's information now comes from the Monitors instead of directly +from the CRTCs. The Monitor marked as Primary will be listed first. + +1.5.2. Clarification of Output lifetimes + +With dynamic connectors being a possibility with the introduction of +DisplayPort multistream (MST), a lot of RandR clients can't handle the +XID BadMatch when a RandR output disappears. This is to clarify that +going forward the X server will not remove outputs dynamically, +just mark them as disconnected. + +1.99 Acknowledgments Our thanks to the contributors to the design found on the xpert mailing list, in particular: @@ -162,7 +207,9 @@ David Dawes for XFree86 DDX integration work Thomas Winischhofer for the hardware-accelerated SiS rotation implementation Matthew Tippett and Kevin Martin for splitting outputs and CRTCs to more fully expose what video hardware can do -Dave Airlie for the 1.4.0 protocol changes. +Dave Airlie for the 1.4.0 protocol changes and for working through the +implications of MST monitors and encouraging the introduction of the +'Monitor' concept. ❧❧❧❧❧❧❧❧❧❧❧ @@ -262,7 +309,7 @@ RRCONFIGSTATUS { Success configuration is unsupported by the hardware. The goal is to make these limitations expressed by the protocol, but when that isn't possible it is correct to return this error value. If, as a - implementor, you find this error code required, please submit the + implementer, you find this error code required, please submit the hardware constraints that exist so that a future version of the extension can correctly capture the configuration constraints in your system. @@ -365,6 +412,21 @@ PROVIDER_CAPS { SourceOutput, SinkOutput, SourceOffload, SinkOffload } ❧❧❧❧❧❧❧❧❧❧❧ +5.6. Protocol Types added in version 1.5 of the extension + +MONITORINFO { name: ATOM + primary: BOOL + automatic: BOOL + x: INT16 + y: INT16 + width: CARD16 + height: CARD16 + width-in-millimeters: CARD32 + height-in-millimeters: CARD32 + outputs: LISTofOUTPUT } + + ❧❧❧❧❧❧❧❧❧❧❧ + 6. Extension Initialization The name of this extension is "RANDR". @@ -1538,6 +1600,79 @@ dynamic changes in the display environment. from the provider, and a RRProviderPropertyNotify event is generated. + ❧❧❧❧❧❧❧❧❧❧❧ + +7.5. Extension Requests added in version 1.5 of the extension. + +┌─── + RRGetMonitors + window : WINDOW + get_active : BOOL + ▶ + timestamp: TIMESTAMP + monitors: LISTofMONITORINFO +└─── + Errors: Window + + Returns the list of Monitors for the screen containing + 'window'. If 'get_active' is set it returns only active + monitors (non-0x0 monitors). 'get_active' should always + be set by toolkits, and not by configuration clients. + + 'timestamp' indicates the server time when the list of + monitors last changed. + +┌─── + RRSetMonitor + window : WINDOW + info: MONITORINFO +└─── + Errors: Window, Output, Atom, Value + + Create a new monitor. Any existing Monitor of the same name is deleted. + + 'name' must be a valid atom or an Atom error results. + + 'name' must not match the name of any Output on the screen, or + a Value error results. + + If 'info.outputs' is non-empty, and if x, y, width, height are all + zero, then the Monitor geometry will be dynamically defined to + be the bounding box of the geometry of the active CRTCs + associated with them. + + If 'name' matches an existing Monitor on the screen, the + existing one will be deleted as if RRDeleteMonitor were called. + + For each output in 'info.outputs, each one is removed from all + pre-existing Monitors. If removing the output causes the list of + outputs for that Monitor to become empty, then that Monitor will + be deleted as if RRDeleteMonitor were called. + + Only one monitor per screen may be primary. If 'info.primary' + is true, then the primary value will be set to false on all + other monitors on the screen. + + RRSetMonitor generates a ConfigureNotify event on the root + window of the screen. + +┌─── + RRDeleteMonitor + window : WINDOW + name: ATOM +└─── + Errors: Window, Atom, Value + + Deletes the named Monitor. + + 'name' must be a valid atom or an Atom error results. + + 'name' must match the name of a Monitor on the screen, or a + Value error results. + + RRDeleteMonitor generates a ConfigureNotify event on the root + window of the screen. + ❧❧❧❧❧❧❧❧❧❧❧ 8. Extension Events @@ -1968,6 +2103,26 @@ doesn't handle a mandatory property correctly. unique identifiers. When such an identifier is available, this property contains its raw bytes. + "TILE" aka RR_PROPERTY_RANDR_TILE + Type: INTEGER + Format: 32 + Num items: 8 + Flags: Immutable + Range/List: - + + Tile monitors have an array of values describing the tiling, + based on DisplayID v1.3 + + The 8 elements are: + 0: group id - The tile group identifier + 1: flags - flags for tile group + 0x1 = single monitor enclosure + 2: number of horizontal tiles in tile group + 3: number of vertical tiles in tile group + 4: horizontal tile location for this tile + 5: vertical tile location for this tile + 6: horizontal tile size for this tile + 7: vertical tile size for this tile 9.2 Properties introduced with version 1.2 of the RandR extension @@ -2008,6 +2163,11 @@ Property Immutable Mandatory since ──────── ───────── ─────────────── GUID yes not mandatory +9.7 Properties introduced with version 1.5 of the RandR extension + +Property Immutable Mandatory since +──────── ───────── ─────────────── +TILE yes not mandatory ❧❧❧❧❧❧❧❧❧❧❧ 10. Extension Versioning @@ -2044,6 +2204,8 @@ list of what each version provided: 1.4: Added provider objects for handling multi-GPU systems. + 1.5: Added Monitors + Compatibility between 0.0 and 1.0 was *NOT* preserved, and 0.0 clients will fail against 1.0 servers. The wire encoding op-codes were changed for GetScreenInfo to ensure this failure in a relatively @@ -2194,6 +2356,23 @@ A.1 Common Types 0x00000008 SinkOffload └─── +A.1.1 Common Types added in version 1.5 of the protocol + +┌─── + MONITORINFO (16 + 4*n) + 4 ATOM name + 1 BOOL primary + 1 BOOL automatic + 2 CARD16 ncrtcs + 2 INT16 x + 2 INT16 y + 2 CARD16 width in pixels + 2 CARD16 height in pixels + 4 CARD32 width in millimeters + 4 CARD32 height in millimeters + 4*n CRTC crtcs +└─── + A.2 Protocol Requests Opcodes 1 and 3 were used in the 0.0 protocols, and will return @@ -2932,6 +3111,42 @@ A.2.3 Protocol Requests added with version 1.4 p unused, p=pad(n) └─── +A.2.4 Protocol Requests added with version 1.5 + +┌─── + RRGetMonitors + 1 CARD8 major opcode + 1 42 RandR opcode + 2 2 request length + 4 WINDOW window + ▶ + 1 1 Reply + 1 unused + 2 CARD16 sequence number + 4 6*n + o reply length + 4 TIMESTAMP timestamp + 4 n nmonitors + 4 o noutputs + 12 unused + n*24+o*4 LISTofMONITORINFO monitors +└─── +┌─── + RRSetMonitor + 1 CARD8 major opcode + 1 43 RandR opcode + 2 6 + o request length + 4 WINDOW window + 24+o MONITORINFO monitorinfo +└─── +┌─── + RRDeleteMonitor + 1 CARD8 major opcode + 1 44 RandR opcode + 2 3 request length + 4 WINDOW window + 4 ATOM name +└─── + A.3 Protocol Events ┌───