proto/randrproto: Branch 'multi-monitor' - 3 commits

Keith Packard keithp at kemper.freedesktop.org
Thu Oct 5 01:44:11 EEST 2006


 randr.h        |   10 +++++
 randrproto.h   |   20 ++++++++--
 randrproto.txt |  110 +++++++++++++++++++++++++++++++++++++++++++++++++--------
 3 files changed, 121 insertions(+), 19 deletions(-)

New commits:
diff-tree 3c354e7245dd7830b5600716185017831aff1316 (from ee843ac7077f5dcae677ad1b7c794abb0b89e111)
Author: Keith Packard <keithp at guitar.keithp.com>
Date:   Wed Oct 4 14:51:48 2006 -0700

    Get rid of mode origins.

diff --git a/randr.h b/randr.h
index f0f81e1..202eb23 100644
--- a/randr.h
+++ b/randr.h
@@ -132,12 +132,11 @@ typedef unsigned long	XRandrModeFlags;
 #define BadRRCrtc		1
 #define BadRRMode		2
 
-#define RRModeOriginPreferred	0
-#define RRModeOriginDetailed	1
-#define RRModeOriginVESA	2
-#define RRModeOriginConfig	3
-#define RRModeOriginUser	4
-#define RRModeOriginOther	5
+#define RRModeOriginMonitor	0
+#define RRModeOriginVESA	1
+#define RRModeOriginConfig	2
+#define RRModeOriginUser	3
+#define RRModeOriginOther	4
 
 #define RROutputOptionScaleNone		1
 #define RROutputOptionScaleMaxAspect	2
diff --git a/randrproto.txt b/randrproto.txt
index 15ab34f..6e64557 100644
--- a/randrproto.txt
+++ b/randrproto.txt
@@ -242,34 +242,12 @@ SIZEID { CARD16 }
 
 MODE { XID or None }
 
-RRMODEORIGIN { RRModeOriginPreferred,
-	       RRModeOriginDetailed,
-	       RRModeOriginVESA,
-	       RRModeOriginConfig,
-	       RRModeOriginUser,
-	       RRModeOriginOther }
-
-	These values are used to indicate to the application the origin
-	of each mode.
-
-	Preferred modes come from the monitor as the preferred mode for
-	this monitor; generally these are used for fixed-pixel flat panels
-	to indicate the native resolution of the panel.
-
-	Detailed modes also come from the monitor as additional modes that
-	may not follow the VESA specification.
-
-	VESA modes are either standard modes from the VESA spec or modes
-	generated from the GTF using the monitor specifications.
-
-	Config modes are those provided as a part of the X server
-	configuration.
-
-	User modes are those defined through the RandR protocol during X
-	server operation.
-
-	Other modes covers modes that come from any other source; space
-	aliens, tarot cards, whatever.
+OUTPUTPREFERENCE { RROutputPreferencePreferred,
+		   RROutputPreferenceMonitor,
+		   RROutputPreference
+		   
+OUTPUTMODE { mode: MODE,
+	     preference: OUTPUTPREFERENCE }
 
 CRTC { XID }
 
@@ -592,7 +570,7 @@ dynamic changes in the display environme
 	possible-options: SETofOUTPUTOPTION
 	crtcs: LISTofCRTC
 	clones: LISTofOUTPUT
-	modes: LISTofMODE
+	modes: LISTofOUTPUTMODE
 └───
 	Errors: Output
 
diff-tree ee843ac7077f5dcae677ad1b7c794abb0b89e111 (from d6c9bdd0e6713a8c4dff53e88bd820ff1140758c)
Author: Keith Packard <keithp at guitar.keithp.com>
Date:   Tue Oct 3 21:02:39 2006 -0700

    Add mode origins and output options.
    
    Mode origins indicate the source of the mode information, from VESA timings,
    user config or whatever.
    
    Output options currently include only panel fitting options; more may be
    added later (this field is 32 bits wide)

diff --git a/randr.h b/randr.h
index 43a616d..f0f81e1 100644
--- a/randr.h
+++ b/randr.h
@@ -132,4 +132,15 @@ typedef unsigned long	XRandrModeFlags;
 #define BadRRCrtc		1
 #define BadRRMode		2
 
+#define RRModeOriginPreferred	0
+#define RRModeOriginDetailed	1
+#define RRModeOriginVESA	2
+#define RRModeOriginConfig	3
+#define RRModeOriginUser	4
+#define RRModeOriginOther	5
+
+#define RROutputOptionScaleNone		1
+#define RROutputOptionScaleMaxAspect	2
+#define RROutputOptionScaleMax		4
+
 #endif	/* _RANDR_H_ */
diff --git a/randrproto.h b/randrproto.h
index cc78e6d..d55e547 100644
--- a/randrproto.h
+++ b/randrproto.h
@@ -47,6 +47,8 @@
 #define RRMode CARD32
 #define RRCrtc CARD32
 #define RRModeFlags CARD32
+#define RROutputOptions CARD32
+#define RRModeOrigin CARD8
 
 #define Rotation CARD16
 #define SizeID CARD16
@@ -194,8 +196,17 @@ typedef struct _xRRModeInfo {
     CARD16		vTotal B16;
     CARD16		nameLength B16;
     RRModeFlags		modeFlags B32;
+    RRModeOrigin	origin;
+    CARD8		pad1;
+    CARD16		pad2 B16;
 } xRRModeInfo;
-#define sz_xRRModeInfo		    40
+#define sz_xRRModeInfo		    44
+
+typedef struct {
+    RROutput		output B32;
+    RROutputOptions	options B32;
+} xRROutputConfig;
+#define sz_xRROutputConfig	    8
 
 typedef struct {
     CARD8   reqType;
@@ -273,6 +284,7 @@ typedef struct {
     CARD32	length B32;
     Time	timestamp B32;
     RRCrtc	crtc B32;
+    RROutputOptions currentOptions B32;
     CARD8	connection;
     CARD8	subpixelOrder;
     CARD16	nCrtcs B16;
@@ -280,9 +292,9 @@ typedef struct {
     CARD16	nClones B16;
     CARD16	nameLength B16;
     CARD16	pad1 B16;
-    CARD32	pad2 B32;
+    RROutputOptions possibleOptions B32;
 } xRRGetOutputInfoReply;
-#define sz_xRRGetOutputInfoReply	32
+#define sz_xRRGetOutputInfoReply	36
 
 typedef struct {
     CARD8	reqType;
@@ -366,7 +378,7 @@ typedef struct {
     Window	window B32;
     xRRModeInfo	modeInfo;
 } xRRCreateModeReq; 
-#define sz_xRRCreateModeReq		48
+#define sz_xRRCreateModeReq		52
 
 typedef struct {
     BYTE	type;
diff --git a/randrproto.txt b/randrproto.txt
index 42c50d2..15ab34f 100644
--- a/randrproto.txt
+++ b/randrproto.txt
@@ -1211,7 +1211,7 @@ A.1 Common Types
 	Origin of mode information.
 
 ┌───
-    MODEINFO (40)				Added in version 1.2
+    MODEINFO (44)				Added in version 1.2
 	4	CARD32		id
 	2	CARD16		width in pixels
 	2	CARD16		height in pixels
@@ -1227,6 +1227,8 @@ A.1 Common Types
 	2	CARD16		v total
 	2	CARD16		name length
 	4	SETofMODEFLAG	mode flags
+	1	MODEORIGIN	mode origin
+	3			unused
 └───
 	
 	An output mode specifies the complete CRTC timings for
@@ -1403,7 +1405,7 @@ A.2.1 Protocol Requests added with versi
 	1	1			Reply
 	1				unused
 	2	CARD16			sequence number
-	4	c+o+10m+(b+p)/4		reply length
+	4	c+o+11m+(b+p)/4		reply length
 	4	TIMESTAMP		timestamp
 	4	TIMESTAMP		config-timestamp
 	2	c			number of CRTCs
@@ -1413,7 +1415,7 @@ A.2.1 Protocol Requests added with versi
 	8				unused
 	4c	LISTofCRTC		crtcs
 	4o	LISTofOUTPUT		outputs
-	40m	LISTofMODEINFO		modeinfos
+	44m	LISTofMODEINFO		modeinfos
 	b	STRING8			mode names
 	p				unused, p=pad(b)
 └───
@@ -1528,9 +1530,9 @@ A.2.1 Protocol Requests added with versi
     RRCreateMode
 	1	CARD8			major opcode
 	1	14			RandR opcode
-	2	12+(n+p)/4		length
+	2	13+(n+p)/4		length
 	4	WINDOW			window
-	40	MODEINFO		mode
+	44	MODEINFO		mode
 	n	STRING8			mode name
 	p				unused, p=pad(n)
       â–¶
diff-tree d6c9bdd0e6713a8c4dff53e88bd820ff1140758c (from 61d60a93dc0c827ef970f21f6b80099cc6c958f1)
Author: Keith Packard <keithp at guitar.keithp.com>
Date:   Tue Oct 3 11:01:56 2006 -0700

    Add mode origins and output options.
    
    Also document non-obvious defined types. Eliminate mode options.

diff --git a/randrproto.txt b/randrproto.txt
index f0ec5e1..42c50d2 100644
--- a/randrproto.txt
+++ b/randrproto.txt
@@ -198,6 +198,30 @@ RRCONFIGSTATUS { Success
 		 InvalidTime
 		 Failed }
 
+	A value of type RRCONFIGSTATUS returned when manipulating the output
+	configuration or querying information from the server that has some
+	time-dependency.
+	
+	InvalidConfigTime indicates that the supplied configuration
+	timestamp does not match the current X server configuration
+	timestamp. Usually this means that the output configuration has
+	changed since the timestamp was received by the application.
+
+	InvalidTime indicates that the supplied output reconfiguration time
+	is earlier than the most recent output reconfiguration request.
+	Generally this indicates that another application has reconfigured
+	the output using a later timestamp.
+
+	Failed is returned whenever the operation is unsuccessful for some
+	other reason. This generally indicates that the requested output
+	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
+	implentor, 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.
+
 ROTATION { Rotate_0
 	   Rotate_90
 	   Rotate_180
@@ -205,6 +229,10 @@ ROTATION { Rotate_0
 	   Reflect_X
 	   Reflect_Y }
 
+	These values are used both to indicate a set of allowed rotations
+	and reflections as well as to indicate a specific rotation and
+	reflection combination.
+
 RRSELECTMASK { RRScreenChangeNotifyMask
 	       RRCrtcChangeNotifyMask (New in version 1.2)
 	       RROutputChangeNotifyMask (New in version 1.2) 
@@ -214,12 +242,44 @@ SIZEID { CARD16 }
 
 MODE { XID or None }
 
+RRMODEORIGIN { RRModeOriginPreferred,
+	       RRModeOriginDetailed,
+	       RRModeOriginVESA,
+	       RRModeOriginConfig,
+	       RRModeOriginUser,
+	       RRModeOriginOther }
+
+	These values are used to indicate to the application the origin
+	of each mode.
+
+	Preferred modes come from the monitor as the preferred mode for
+	this monitor; generally these are used for fixed-pixel flat panels
+	to indicate the native resolution of the panel.
+
+	Detailed modes also come from the monitor as additional modes that
+	may not follow the VESA specification.
+
+	VESA modes are either standard modes from the VESA spec or modes
+	generated from the GTF using the monitor specifications.
+
+	Config modes are those provided as a part of the X server
+	configuration.
+
+	User modes are those defined through the RandR protocol during X
+	server operation.
+
+	Other modes covers modes that come from any other source; space
+	aliens, tarot cards, whatever.
+
 CRTC { XID }
 
 OUTPUT { XID }
 
 CONNECTION { Connected, Disconnected, UnknownConnection }
 
+	This value provides an indication of whether an output is actually
+	connected to a monitor or other presentation device.
+
 SUBPIXELORDER { SubPixelUnknown		The subpixel order uses the Render
 	        SubPixelHorizontalRGB	extensions definitions; they are here
 	        SubPixelHorizontalBGR	only for convenience.
@@ -245,10 +305,16 @@ MODEFLAG { HSyncPositive
 	   DoubleClock
 	   ClockDivideBy2 }
 
-MODEOPTION { ScalingNone,
-	     ScalingMaxAspect,
-	     ScalingMax }
+OUTPUTOPTION { RROutputOptionScaleNone,
+	       RROutputOptionScaleMaxAspect,
+	       RROutputOptionScaleMax }
 
+	These options select paramaters of the output which are independent
+	of the output mode.
+	
+	The scale options are used for fixed panels and select between
+	different scaling options for non-native resolutions.
+	
 MODEINFO { id: MODE
 	   name: STRING
            widthInPixels, heightInPixels: CARD16
@@ -257,7 +323,10 @@ MODEINFO { id: MODE
            hSyncStart, hSyncEnd, hTotal, hSkew: CARD16
            vSyncStart, vSyncEnd, vTotal: CARD16
            modeFlags: SETofMODEFLAG
-	   modeOptions: SETofMODEOPTION }
+	   modeOrigin: MODEORIGIN }
+
+OUTPUTCONFIG { output: OUTPUT
+	       options: SETofOUTPUTOPTION }
 
 REFRESH { rates: LISTofCARD16 }
 
@@ -515,10 +584,12 @@ dynamic changes in the display environme
 	status: RRCONFIGSTATUS
 	timestamp: TIMESTAMP
 	crtc: CRTC
+	options: SETofOUTPUTOPTION
 	
 	name: STRING
 	connection: CONNECTION
 	subpixel-order: SUBPIXELORDER
+	possible-options: SETofOUTPUTOPTION
 	crtcs: LISTofCRTC
 	clones: LISTofOUTPUT
 	modes: LISTofMODE
@@ -538,6 +609,8 @@ dynamic changes in the display environme
 	'crtc' is the current source CRTC for video data, or Disabled if the
 	output is not connected to any CRTC.
 
+	'options' is the currently enabled set of options.
+	
 	'name' is a UTF-8 encoded string designed to be presented to the
 	user to indicate which output this is. E.g. "S-Video" or "DVI".
 
@@ -549,6 +622,9 @@ dynamic changes in the display environme
 	'subpixel-order' contains the resulting subpixel order of the
 	connected device to allow correct subpixel rendering.
 
+	'possible-options' indicate which options are supported by this
+	output device.
+	
 	'crtcs' is the list of CRTCs that this output may be connected to.
 	Attempting to connect this output to a different CRTC results in a
 	Match error.
@@ -779,7 +855,6 @@ dynamic changes in the display environme
 	config-timestamp: TIMESTAMP
 	x, y: INT16
 	mode: MODE
-	options: SETofMODEOPTION
 	rotation: ROTATION
 	outputs: LISTofOUTPUT
       â–¶
@@ -1125,6 +1200,17 @@ A.1 Common Types
 	Return status for requests which depend on time.
 	
 ┌───
+    RRMODEORIGIN
+	0	RRModeOriginPreferred
+	1	RRModeOriginDetailed
+	2	RRModeOriginVESA
+	3	RRModeOriginConfig
+	4	RRModeOriginUser
+	5	RRModeOriginOther
+└───
+	Origin of mode information.
+
+┌───
     MODEINFO (40)				Added in version 1.2
 	4	CARD32		id
 	2	CARD16		width in pixels
@@ -1174,6 +1260,18 @@ A.1 Common Types
 	1		Disconnected
 	2		UnknownConnection
 └───
+┌───
+    OUTPUTOPTION
+	1		RROutputOptionScaleNone
+	2		RROutputOptionScaleMaxAspect
+	4		RROutputOptionScaleMax
+└───
+┌───
+    OUTPUTCONFIG
+    	4	CARD32		output
+	4	CARD32		set of output options
+└───
+
 
 A.2 Protocol Requests
 
@@ -1330,16 +1428,18 @@ A.2.1 Protocol Requests added with versi
 	1	1			Reply
 	1	RRCONFIGSTATUS		status
 	2	CARD16			sequence number
-	4	c+m+(n+p)/4		reply length
+	4	1+c+m+(n+p)/4		reply length
 	4	TIMESTAMP		timestamp
 	4	CRTC			current connected crtc
+	4	SETofOUTPUTOPTION	current output options
 	1	CONNECTION		connection
 	1	SUBPIXELORDER		subpixel-order
 	2	c			number of CRTCs
 	2	m			number of modes
 	2	o			number of clones
 	2	n			length of name
-	6				unused
+	2				unused
+	4	SETofOUTPUTOPTION	supported output options
 	4c	LISTofCRTC		crtcs
 	4m	LISTofMODE		modes
 	n	STRING8			name
@@ -1493,7 +1593,7 @@ A.2.1 Protocol Requests added with versi
     RRSetCrtcConfig
 	1	CARD8			major opcode
 	1	19			RandR opcode
-	2	7+n			length
+	2	7+2n			length
 	4	CRTC			crtc
 	4	TIMESTAMP		timestamp
 	4	TIMESTAMP		config timestamp
@@ -1502,7 +1602,7 @@ A.2.1 Protocol Requests added with versi
 	4	MODE			mode
 	2	ROTATION		rotation/reflection
 	2				unused
-	4n	LISTofOUTPUT		outputs
+	8n	LISTofOUTPUTCONFIG	outputs
       â–¶
 	1	1			Reply
 	1	RRCONFIGSTATUS		status



More information about the xorg-commit mailing list