summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAdam Jackson <ajax@redhat.com>2008-11-24 15:54:09 -0500
committerAdam Jackson <ajax@redhat.com>2008-11-24 15:54:09 -0500
commit2c0635eed5ae418ca278d99e044f583d54273097 (patch)
treea8de95293239cfecc29101e0e9c72b9390e51183
parent4a960ba3db3c3f8bdf3d519d263f910b6107b9ff (diff)
downloadxorg-proto-randrproto-2c0635eed5ae418ca278d99e044f583d54273097.tar.gz
Add GetScreenResourcesCurrent
-rw-r--r--randr.h4
-rw-r--r--randrproto.h29
-rw-r--r--randrproto.txt74
3 files changed, 102 insertions, 5 deletions
diff --git a/randr.h b/randr.h
index 17e6ef9..c7794fc 100644
--- a/randr.h
+++ b/randr.h
@@ -2,6 +2,7 @@
* Copyright © 2000 Compaq Computer Corporation
* Copyright © 2002 Hewlett Packard Company
* Copyright © 2006 Intel Corporation
+ * Copyright © 2008 Red Hat, Inc.
*
* Permission to use, copy, modify, distribute, and sell this software and its
* documentation for any purpose is hereby granted without fee, provided that
@@ -77,6 +78,9 @@ typedef unsigned long XRandrModeFlags;
#define X_RRGetCrtcGamma 23
#define X_RRSetCrtcGamma 24
+/* V1.3 additions */
+#define X_RRGetScreenResourcesCurrent 25
+
/* Event selection bits */
#define RRScreenChangeNotifyMask (1L << 0)
/* V1.2 additions */
diff --git a/randrproto.h b/randrproto.h
index 3fb2e45..6d3303a 100644
--- a/randrproto.h
+++ b/randrproto.h
@@ -2,6 +2,7 @@
* Copyright © 2000 Compaq Computer Corporation
* Copyright © 2002 Hewlett-Packard Company
* Copyright © 2006 Intel Corporation
+ * Copyright © 2008 Red Hat, Inc.
*
* Permission to use, copy, modify, distribute, and sell this software and its
* documentation for any purpose is hereby granted without fee, provided that
@@ -562,6 +563,34 @@ typedef struct {
#define sz_xRRSetCrtcGammaReq 12
/*
+ * Additions for V1.3
+ */
+
+typedef struct {
+ CARD8 reqType;
+ CARD8 randrReqType;
+ CARD16 length B16;
+ Window window B32;
+} xRRGetScreenResourcesCurrentReq;
+#define sz_xRRGetScreenResourcesCurrentReq 8
+
+typedef struct {
+ BYTE type;
+ CARD8 pad;
+ CARD16 sequenceNumber B16;
+ CARD32 length B32;
+ Time timestamp B32;
+ Time configTimestamp B32;
+ CARD16 nCrtcs B16;
+ CARD16 nOutputs B16;
+ CARD16 nModes B16;
+ CARD16 nbytesNames B16;
+ CARD32 pad1 B32;
+ CARD32 pad2 B32;
+} xRRGetScreenResourcesCurrentReply;
+#define sz_xRRGetScreenResourcesCurrentReply 32
+
+/*
* event
*/
typedef struct {
diff --git a/randrproto.txt b/randrproto.txt
index 626da56..fa3b1e2 100644
--- a/randrproto.txt
+++ b/randrproto.txt
@@ -528,10 +528,10 @@ dynamic changes in the display environment.
This request explicitly asks the server to ensure that the
configuration data is up-to-date wrt the hardware. If that requires
- polling, this is when such polling would take place. Requests for
- further information should not poll, but rather return the data
- collected at this point.
-
+ polling, this is when such polling would take place. If the
+ current configuration is all that's required, use
+ RRGetScreenResourcesCurrent instead.
+
┌───
RRGetOutputInfo
output: OUTPUT
@@ -968,6 +968,40 @@ dynamic changes in the display environment.
must be the size returned by RRGetCrtcGammaSize else a Value error
results.
+7.2. Extension Requests added in version 1.3 of the extension
+
+┌───
+ RRGetScreenResourcesCurrent
+ window: WINDOW
+ ▶
+ timestamp: TIMESTAMP
+ config-timestamp: TIMESTAMP
+ crtcs: LISTofCRTC
+ outputs: LISTofOUTPUT
+ modes: LISTofMODEINFO
+└───
+ Errors: Window
+
+ RRGetScreenResourcesCurrent returns the list of outputs and crtcs
+ connected to the screen associated with 'window'.
+
+ 'timestamp' indicates when the configuration was last set.
+
+ 'config-timestamp' indicates when the configuration information last
+ changed. Requests to configure the output will fail unless the
+ timestamp indicates that the information the client is using is up
+ to date, to ensure clients can be well behaved in the face of race
+ conditions.
+
+ 'crtcs' contains the list of CRTCs associated with the screen.
+
+ 'outputs' contains the list of outputs associated with the screen.
+
+ 'modes' contains the list of modes associated with the screen
+
+ Unlike RRGetScreenResources, this merely returns the current
+ configuration, and does not poll for hardware changes.
+
❧❧❧❧❧❧❧❧❧❧❧
8. Extension Events
@@ -1128,6 +1162,8 @@ list of what each version provided:
1.2: Separate screens from CRTCs and outputs, switch to full VESA
modes
+ 1.3: Added cheap version of RRGetScreenResources.
+
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
@@ -1135,7 +1171,8 @@ graceful way. Version 1.1 servers and clients are cross compatible with
1.0. Version 1.1 is considered to be stable and we intend upward
compatibility from this point. Version 1.2 offers an extended model of the
system with multiple output support. It offers backward compatibility with
-version 1.1.
+version 1.1. Version 1.3 adds a cheap version of GetScreenResources to
+avoid expensive DDC operations.
❧❧❧❧❧❧❧❧❧❧❧
@@ -1681,6 +1718,33 @@ A.2.1 Protocol Requests added with version 1.2
p unused, p=pad(6n)
└───
+A.2.2 Protocol Requests added with version 1.2
+
+┌───
+ RRGetScreenResourcesCurrent
+ 1 CARD8 major opcode
+ 1 8 RandR opcode
+ 2 2 length
+ 4 WINDOW window
+ ▶
+ 1 1 Reply
+ 1 unused
+ 2 CARD16 sequence number
+ 4 c+o+8m+(b+p)/4 reply length
+ 4 TIMESTAMP timestamp
+ 4 TIMESTAMP config-timestamp
+ 2 c number of CRTCs
+ 2 o number of outputs
+ 2 m number of modeinfos
+ 2 b total bytes in mode names
+ 8 unused
+ 4c LISTofCRTC crtcs
+ 4o LISTofOUTPUT outputs
+ 32m LISTofMODEINFO modeinfos
+ b STRING8 mode names
+ p unused, p=pad(b)
+└───
+
A.3 Protocol Events
┌───