randrstr.h revision 05b261ec
1/*
2 * Copyright © 2000 Compaq Computer Corporation
3 * Copyright © 2002 Hewlett-Packard Company
4 * Copyright © 2006 Intel Corporation
5 *
6 * Permission to use, copy, modify, distribute, and sell this software and its
7 * documentation for any purpose is hereby granted without fee, provided that
8 * the above copyright notice appear in all copies and that both that copyright
9 * notice and this permission notice appear in supporting documentation, and
10 * that the name of the copyright holders not be used in advertising or
11 * publicity pertaining to distribution of the software without specific,
12 * written prior permission.  The copyright holders make no representations
13 * about the suitability of this software for any purpose.  It is provided "as
14 * is" without express or implied warranty.
15 *
16 * THE COPYRIGHT HOLDERS DISCLAIM ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
17 * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
18 * EVENT SHALL THE COPYRIGHT HOLDERS BE LIABLE FOR ANY SPECIAL, INDIRECT OR
19 * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
20 * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
21 * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE
22 * OF THIS SOFTWARE.
23 *
24 * Author:  Jim Gettys, Hewlett-Packard Company, Inc.
25 *	    Keith Packard, Intel Corporation
26 */
27
28#ifdef HAVE_DIX_CONFIG_H
29#include <dix-config.h>
30#endif
31
32#ifndef _RANDRSTR_H_
33#define _RANDRSTR_H_
34
35#include <X11/X.h>
36#include <X11/Xproto.h>
37#include "misc.h"
38#include "os.h"
39#include "dixstruct.h"
40#include "resource.h"
41#include "scrnintstr.h"
42#include "windowstr.h"
43#include "pixmapstr.h"
44#include "extnsionst.h"
45#include "servermd.h"
46#include <X11/extensions/randr.h>
47#include <X11/extensions/randrproto.h>
48#ifdef RENDER
49#include <X11/extensions/render.h> 	/* we share subpixel order information */
50#include "picturestr.h"
51#endif
52#include <X11/Xfuncproto.h>
53
54/* required for ABI compatibility for now */
55#define RANDR_10_INTERFACE 1
56#define RANDR_12_INTERFACE 1
57
58typedef XID	RRMode;
59typedef XID	RROutput;
60typedef XID	RRCrtc;
61
62extern int	RREventBase, RRErrorBase;
63
64extern int (*ProcRandrVector[RRNumberRequests])(ClientPtr);
65extern int (*SProcRandrVector[RRNumberRequests])(ClientPtr);
66
67/*
68 * Modeline for a monitor. Name follows directly after this struct
69 */
70
71#define RRModeName(pMode) ((char *) (pMode + 1))
72typedef struct _rrMode		RRModeRec, *RRModePtr;
73typedef struct _rrPropertyValue	RRPropertyValueRec, *RRPropertyValuePtr;
74typedef struct _rrProperty	RRPropertyRec, *RRPropertyPtr;
75typedef struct _rrCrtc		RRCrtcRec, *RRCrtcPtr;
76typedef struct _rrOutput	RROutputRec, *RROutputPtr;
77
78struct _rrMode {
79    int		    refcnt;
80    xRRModeInfo	    mode;
81    char	    *name;
82    ScreenPtr	    userScreen;
83};
84
85struct _rrPropertyValue {
86    Atom	    type;       /* ignored by server */
87    short	    format;     /* format of data for swapping - 8,16,32 */
88    long	    size;	/* size of data in (format/8) bytes */
89    pointer         data;	/* private to client */
90};
91
92struct _rrProperty {
93    RRPropertyPtr   next;
94    ATOM 	    propertyName;
95    Bool	    is_pending;
96    Bool	    range;
97    Bool	    immutable;
98    int		    num_valid;
99    INT32	    *valid_values;
100    RRPropertyValueRec	current, pending;
101};
102
103struct _rrCrtc {
104    RRCrtc	    id;
105    ScreenPtr	    pScreen;
106    RRModePtr	    mode;
107    int		    x, y;
108    Rotation	    rotation;
109    Rotation	    rotations;
110    Bool	    changed;
111    int		    numOutputs;
112    RROutputPtr	    *outputs;
113    int		    gammaSize;
114    CARD16	    *gammaRed;
115    CARD16	    *gammaBlue;
116    CARD16	    *gammaGreen;
117    void	    *devPrivate;
118};
119
120struct _rrOutput {
121    RROutput	    id;
122    ScreenPtr	    pScreen;
123    char	    *name;
124    int		    nameLength;
125    CARD8	    connection;
126    CARD8	    subpixelOrder;
127    int		    mmWidth;
128    int		    mmHeight;
129    RRCrtcPtr	    crtc;
130    int		    numCrtcs;
131    RRCrtcPtr	    *crtcs;
132    int		    numClones;
133    RROutputPtr	    *clones;
134    int		    numModes;
135    int		    numPreferred;
136    RRModePtr	    *modes;
137    int		    numUserModes;
138    RRModePtr	    *userModes;
139    Bool	    changed;
140    RRPropertyPtr   properties;
141    Bool	    pendingProperties;
142    void	    *devPrivate;
143};
144
145#if RANDR_12_INTERFACE
146typedef Bool (*RRScreenSetSizeProcPtr) (ScreenPtr	pScreen,
147					CARD16		width,
148					CARD16		height,
149					CARD32		mmWidth,
150					CARD32		mmHeight);
151
152typedef Bool (*RRCrtcSetProcPtr) (ScreenPtr		pScreen,
153				  RRCrtcPtr		crtc,
154				  RRModePtr		mode,
155				  int			x,
156				  int			y,
157				  Rotation		rotation,
158				  int			numOutputs,
159				  RROutputPtr		*outputs);
160
161typedef Bool (*RRCrtcSetGammaProcPtr) (ScreenPtr	pScreen,
162				       RRCrtcPtr	crtc);
163
164typedef Bool (*RROutputSetPropertyProcPtr) (ScreenPtr		pScreen,
165					    RROutputPtr		output,
166					    Atom		property,
167					    RRPropertyValuePtr	value);
168
169typedef Bool (*RROutputValidateModeProcPtr) (ScreenPtr		pScreen,
170					     RROutputPtr	output,
171					     RRModePtr		mode);
172
173typedef void (*RRModeDestroyProcPtr) (ScreenPtr	    pScreen,
174				      RRModePtr	    mode);
175
176#endif
177
178typedef Bool (*RRGetInfoProcPtr) (ScreenPtr pScreen, Rotation *rotations);
179typedef Bool (*RRCloseScreenProcPtr) ( int i, ScreenPtr pscreen);
180
181/* These are for 1.0 compatibility */
182
183typedef struct _rrRefresh {
184    CARD16	    rate;
185    RRModePtr	    mode;
186} RRScreenRate, *RRScreenRatePtr;
187
188typedef struct _rrScreenSize {
189    int		    id;
190    short	    width, height;
191    short	    mmWidth, mmHeight;
192    int		    nRates;
193    RRScreenRatePtr pRates;
194} RRScreenSize, *RRScreenSizePtr;
195
196#ifdef RANDR_10_INTERFACE
197
198typedef Bool (*RRSetConfigProcPtr) (ScreenPtr		pScreen,
199				    Rotation		rotation,
200				    int			rate,
201				    RRScreenSizePtr	pSize);
202
203#endif
204
205
206typedef struct _rrScrPriv {
207    /*
208     * 'public' part of the structure; DDXen fill this in
209     * as they initialize
210     */
211#if RANDR_10_INTERFACE
212    RRSetConfigProcPtr	    rrSetConfig;
213#endif
214    RRGetInfoProcPtr	    rrGetInfo;
215#if RANDR_12_INTERFACE
216    RRScreenSetSizeProcPtr  rrScreenSetSize;
217    RRCrtcSetProcPtr	    rrCrtcSet;
218    RRCrtcSetGammaProcPtr   rrCrtcSetGamma;
219    RROutputSetPropertyProcPtr	rrOutputSetProperty;
220    RROutputValidateModeProcPtr	rrOutputValidateMode;
221    RRModeDestroyProcPtr	rrModeDestroy;
222#endif
223
224    /*
225     * Private part of the structure; not considered part of the ABI
226     */
227    TimeStamp		    lastSetTime;	/* last changed by client */
228    TimeStamp		    lastConfigTime;	/* possible configs changed */
229    RRCloseScreenProcPtr    CloseScreen;
230
231    Bool		    changed;		/* some config changed */
232    Bool		    configChanged;	/* configuration changed */
233    Bool		    layoutChanged;	/* screen layout changed */
234
235    CARD16		    minWidth, minHeight;
236    CARD16		    maxWidth, maxHeight;
237    CARD16		    width, height;	/* last known screen size */
238    CARD16		    mmWidth, mmHeight;	/* last known screen size */
239
240    int			    numOutputs;
241    RROutputPtr		    *outputs;
242
243    int			    numCrtcs;
244    RRCrtcPtr		    *crtcs;
245
246    /* Last known pointer position */
247    RRCrtcPtr		    pointerCrtc;
248
249#ifdef RANDR_10_INTERFACE
250    /*
251     * Configuration information
252     */
253    Rotation		    rotations;
254    CARD16		    reqWidth, reqHeight;
255
256    int			    nSizes;
257    RRScreenSizePtr	    pSizes;
258
259    Rotation		    rotation;
260    int			    rate;
261    int			    size;
262#endif
263} rrScrPrivRec, *rrScrPrivPtr;
264
265extern int rrPrivIndex;
266
267#define rrGetScrPriv(pScr)  ((rrScrPrivPtr) (pScr)->devPrivates[rrPrivIndex].ptr)
268#define rrScrPriv(pScr)	rrScrPrivPtr    pScrPriv = rrGetScrPriv(pScr)
269#define SetRRScreen(s,p) ((s)->devPrivates[rrPrivIndex].ptr = (pointer) (p))
270
271/*
272 * each window has a list of clients requesting
273 * RRNotify events.  Each client has a resource
274 * for each window it selects RRNotify input for,
275 * this resource is used to delete the RRNotifyRec
276 * entry from the per-window queue.
277 */
278
279typedef struct _RREvent *RREventPtr;
280
281typedef struct _RREvent {
282    RREventPtr  next;
283    ClientPtr	client;
284    WindowPtr	window;
285    XID		clientResource;
286    int		mask;
287} RREventRec;
288
289typedef struct _RRTimes {
290    TimeStamp	setTime;
291    TimeStamp	configTime;
292} RRTimesRec, *RRTimesPtr;
293
294typedef struct _RRClient {
295    int		major_version;
296    int		minor_version;
297/*  RRTimesRec	times[0]; */
298} RRClientRec, *RRClientPtr;
299
300extern RESTYPE	RRClientType, RREventType; /* resource types for event masks */
301extern int	RRClientPrivateIndex;
302extern RESTYPE	RRCrtcType, RRModeType, RROutputType;
303
304#define LookupOutput(client,id,a) ((RROutputPtr) \
305				   (SecurityLookupIDByType (client, id, \
306							    RROutputType, a)))
307#define LookupCrtc(client,id,a) ((RRCrtcPtr) \
308				 (SecurityLookupIDByType (client, id, \
309							  RRCrtcType, a)))
310#define LookupMode(client,id,a) ((RRModePtr) \
311				 (SecurityLookupIDByType (client, id, \
312							  RRModeType, a)))
313
314#define GetRRClient(pClient)    ((RRClientPtr) (pClient)->devPrivates[RRClientPrivateIndex].ptr)
315#define rrClientPriv(pClient)	RRClientPtr pRRClient = GetRRClient(pClient)
316
317/* Initialize the extension */
318void
319RRExtensionInit (void);
320
321#ifdef RANDR_12_INTERFACE
322/*
323 * Set the range of sizes for the screen
324 */
325void
326RRScreenSetSizeRange (ScreenPtr	pScreen,
327		      CARD16	minWidth,
328		      CARD16	minHeight,
329		      CARD16	maxWidth,
330		      CARD16	maxHeight);
331#endif
332
333/* rrscreen.c */
334/*
335 * Notify the extension that the screen size has been changed.
336 * The driver is responsible for calling this whenever it has changed
337 * the size of the screen
338 */
339void
340RRScreenSizeNotify (ScreenPtr	pScreen);
341
342/*
343 * Request that the screen be resized
344 */
345Bool
346RRScreenSizeSet (ScreenPtr  pScreen,
347		 CARD16	    width,
348		 CARD16	    height,
349		 CARD32	    mmWidth,
350		 CARD32	    mmHeight);
351
352/*
353 * Send ConfigureNotify event to root window when 'something' happens
354 */
355void
356RRSendConfigNotify (ScreenPtr pScreen);
357
358/*
359 * screen dispatch
360 */
361int
362ProcRRGetScreenSizeRange (ClientPtr client);
363
364int
365ProcRRSetScreenSize (ClientPtr client);
366
367int
368ProcRRGetScreenResources (ClientPtr client);
369
370int
371ProcRRSetScreenConfig (ClientPtr client);
372
373int
374ProcRRGetScreenInfo (ClientPtr client);
375
376/*
377 * Deliver a ScreenNotify event
378 */
379void
380RRDeliverScreenEvent (ClientPtr client, WindowPtr pWin, ScreenPtr pScreen);
381
382/* mirandr.c */
383Bool
384miRandRInit (ScreenPtr pScreen);
385
386Bool
387miRRGetInfo (ScreenPtr pScreen, Rotation *rotations);
388
389Bool
390miRRGetScreenInfo (ScreenPtr pScreen);
391
392Bool
393miRRCrtcSet (ScreenPtr	pScreen,
394	     RRCrtcPtr	crtc,
395	     RRModePtr	mode,
396	     int	x,
397	     int	y,
398	     Rotation	rotation,
399	     int	numOutput,
400	     RROutputPtr *outputs);
401
402Bool
403miRROutputSetProperty (ScreenPtr	    pScreen,
404		       RROutputPtr	    output,
405		       Atom		    property,
406		       RRPropertyValuePtr   value);
407
408Bool
409miRROutputValidateMode (ScreenPtr	    pScreen,
410			RROutputPtr	    output,
411			RRModePtr	    mode);
412
413void
414miRRModeDestroy (ScreenPtr  pScreen,
415		 RRModePtr  mode);
416
417/* randr.c */
418/*
419 * Send all pending events
420 */
421void
422RRTellChanged (ScreenPtr pScreen);
423
424/*
425 * Poll the driver for changed information
426 */
427Bool
428RRGetInfo (ScreenPtr pScreen);
429
430Bool RRInit (void);
431
432Bool RRScreenInit(ScreenPtr pScreen);
433
434RROutputPtr
435RRFirstOutput (ScreenPtr pScreen);
436
437Rotation
438RRGetRotation (ScreenPtr pScreen);
439
440CARD16
441RRVerticalRefresh (xRRModeInfo *mode);
442
443#ifdef RANDR_10_INTERFACE
444/*
445 * This is the old interface, deprecated but left
446 * around for compatibility
447 */
448
449/*
450 * Then, register the specific size with the screen
451 */
452
453RRScreenSizePtr
454RRRegisterSize (ScreenPtr		pScreen,
455		short			width,
456		short			height,
457		short			mmWidth,
458		short			mmHeight);
459
460Bool RRRegisterRate (ScreenPtr		pScreen,
461		     RRScreenSizePtr	pSize,
462		     int		rate);
463
464/*
465 * Finally, set the current configuration of the screen
466 */
467
468void
469RRSetCurrentConfig (ScreenPtr		pScreen,
470		    Rotation		rotation,
471		    int			rate,
472		    RRScreenSizePtr	pSize);
473
474Bool RRScreenInit (ScreenPtr pScreen);
475
476Rotation
477RRGetRotation (ScreenPtr pScreen);
478
479int
480RRSetScreenConfig (ScreenPtr		pScreen,
481		   Rotation		rotation,
482		   int			rate,
483		   RRScreenSizePtr	pSize);
484
485#endif
486
487/* rrcrtc.c */
488
489/*
490 * Notify the CRTC of some change; layoutChanged indicates that
491 * some position or size element changed
492 */
493void
494RRCrtcChanged (RRCrtcPtr crtc, Bool layoutChanged);
495
496/*
497 * Create a CRTC
498 */
499RRCrtcPtr
500RRCrtcCreate (ScreenPtr pScreen, void	*devPrivate);
501
502/*
503 * Set the allowed rotations on a CRTC
504 */
505void
506RRCrtcSetRotations (RRCrtcPtr crtc, Rotation rotations);
507
508/*
509 * Notify the extension that the Crtc has been reconfigured,
510 * the driver calls this whenever it has updated the mode
511 */
512Bool
513RRCrtcNotify (RRCrtcPtr	    crtc,
514	      RRModePtr	    mode,
515	      int	    x,
516	      int	    y,
517	      Rotation	    rotation,
518	      int	    numOutputs,
519	      RROutputPtr   *outputs);
520
521void
522RRDeliverCrtcEvent (ClientPtr client, WindowPtr pWin, RRCrtcPtr crtc);
523
524/*
525 * Request that the Crtc be reconfigured
526 */
527Bool
528RRCrtcSet (RRCrtcPtr    crtc,
529	   RRModePtr	mode,
530	   int		x,
531	   int		y,
532	   Rotation	rotation,
533	   int		numOutput,
534	   RROutputPtr  *outputs);
535
536/*
537 * Request that the Crtc gamma be changed
538 */
539
540Bool
541RRCrtcGammaSet (RRCrtcPtr   crtc,
542		CARD16	    *red,
543		CARD16	    *green,
544		CARD16	    *blue);
545
546/*
547 * Notify the extension that the Crtc gamma has been changed
548 * The driver calls this whenever it has changed the gamma values
549 * in the RRCrtcRec
550 */
551
552Bool
553RRCrtcGammaNotify (RRCrtcPtr	crtc);
554
555/*
556 * Set the size of the gamma table at server startup time
557 */
558
559Bool
560RRCrtcGammaSetSize (RRCrtcPtr	crtc,
561		    int		size);
562
563/*
564 * Return the area of the frame buffer scanned out by the crtc,
565 * taking into account the current mode and rotation
566 */
567
568void
569RRCrtcGetScanoutSize(RRCrtcPtr crtc, int *width, int *height);
570
571/*
572 * Destroy a Crtc at shutdown
573 */
574void
575RRCrtcDestroy (RRCrtcPtr crtc);
576
577/*
578 * Initialize crtc type
579 */
580Bool
581RRCrtcInit (void);
582
583/*
584 * Crtc dispatch
585 */
586
587int
588ProcRRGetCrtcInfo (ClientPtr client);
589
590int
591ProcRRSetCrtcConfig (ClientPtr client);
592
593int
594ProcRRGetCrtcGammaSize (ClientPtr client);
595
596int
597ProcRRGetCrtcGamma (ClientPtr client);
598
599int
600ProcRRSetCrtcGamma (ClientPtr client);
601
602/* rrdispatch.c */
603Bool
604RRClientKnowsRates (ClientPtr	pClient);
605
606/* rrmode.c */
607/*
608 * Find, and if necessary, create a mode
609 */
610
611RRModePtr
612RRModeGet (xRRModeInfo	*modeInfo,
613	   const char	*name);
614
615void
616RRModePruneUnused (ScreenPtr pScreen);
617
618/*
619 * Destroy a mode.
620 */
621
622void
623RRModeDestroy (RRModePtr mode);
624
625/*
626 * Return a list of modes that are valid for some output in pScreen
627 */
628RRModePtr *
629RRModesForScreen (ScreenPtr pScreen, int *num_ret);
630
631/*
632 * Initialize mode type
633 */
634Bool
635RRModeInit (void);
636
637int
638ProcRRCreateMode (ClientPtr client);
639
640int
641ProcRRDestroyMode (ClientPtr client);
642
643int
644ProcRRAddOutputMode (ClientPtr client);
645
646int
647ProcRRDeleteOutputMode (ClientPtr client);
648
649/* rroutput.c */
650
651/*
652 * Notify the output of some change. configChanged indicates whether
653 * any external configuration (mode list, clones, connected status)
654 * has changed, or whether the change was strictly internal
655 * (which crtc is in use)
656 */
657void
658RROutputChanged (RROutputPtr output, Bool configChanged);
659
660/*
661 * Create an output
662 */
663
664RROutputPtr
665RROutputCreate (ScreenPtr   pScreen,
666		const char  *name,
667		int	    nameLength,
668		void	    *devPrivate);
669
670/*
671 * Notify extension that output parameters have been changed
672 */
673Bool
674RROutputSetClones (RROutputPtr  output,
675		   RROutputPtr  *clones,
676		   int		numClones);
677
678Bool
679RROutputSetModes (RROutputPtr	output,
680		  RRModePtr	*modes,
681		  int		numModes,
682		  int		numPreferred);
683
684int
685RROutputAddUserMode (RROutputPtr    output,
686		     RRModePtr	    mode);
687
688int
689RROutputDeleteUserMode (RROutputPtr output,
690			RRModePtr   mode);
691
692Bool
693RROutputSetCrtcs (RROutputPtr	output,
694		  RRCrtcPtr	*crtcs,
695		  int		numCrtcs);
696
697Bool
698RROutputSetConnection (RROutputPtr  output,
699		       CARD8	    connection);
700
701Bool
702RROutputSetSubpixelOrder (RROutputPtr output,
703			  int	      subpixelOrder);
704
705Bool
706RROutputSetPhysicalSize (RROutputPtr	output,
707			 int		mmWidth,
708			 int		mmHeight);
709
710void
711RRDeliverOutputEvent(ClientPtr client, WindowPtr pWin, RROutputPtr output);
712
713void
714RROutputDestroy (RROutputPtr	output);
715
716int
717ProcRRGetOutputInfo (ClientPtr client);
718
719/*
720 * Initialize output type
721 */
722Bool
723RROutputInit (void);
724
725/* rrpointer.c */
726void
727RRPointerMoved (ScreenPtr pScreen, int x, int y);
728
729void
730RRPointerScreenConfigured (ScreenPtr pScreen);
731
732/* rrproperty.c */
733
734void
735RRDeleteAllOutputProperties (RROutputPtr output);
736
737RRPropertyValuePtr
738RRGetOutputProperty (RROutputPtr output, Atom property, Bool pending);
739
740RRPropertyPtr
741RRQueryOutputProperty (RROutputPtr output, Atom property);
742
743void
744RRDeleteOutputProperty (RROutputPtr output, Atom property);
745
746Bool
747RRPostPendingProperties (RROutputPtr output);
748
749int
750RRChangeOutputProperty (RROutputPtr output, Atom property, Atom type,
751			int format, int mode, unsigned long len,
752			pointer value, Bool sendevent, Bool pending);
753
754int
755RRConfigureOutputProperty (RROutputPtr output, Atom property,
756			   Bool pending, Bool range, Bool immutable,
757			   int num_values, INT32 *values);
758int
759ProcRRChangeOutputProperty (ClientPtr client);
760
761int
762ProcRRGetOutputProperty (ClientPtr client);
763
764int
765ProcRRListOutputProperties (ClientPtr client);
766
767int
768ProcRRQueryOutputProperty (ClientPtr client);
769
770int
771ProcRRConfigureOutputProperty (ClientPtr client);
772
773int
774ProcRRDeleteOutputProperty (ClientPtr client);
775
776/* rrxinerama.c */
777void
778RRXineramaExtensionInit(void);
779
780#endif /* _RANDRSTR_H_ */
781
782/*
783
784randr extension implementation structure
785
786Query state:
787    ProcRRGetScreenInfo/ProcRRGetScreenResources
788	RRGetInfo
789
790	    • Request configuration from driver, either 1.0 or 1.2 style
791	    • These functions only record state changes, all
792	      other actions are pended until RRTellChanged is called
793
794	    ->rrGetInfo
795	    1.0:
796		RRRegisterSize
797		RRRegisterRate
798		RRSetCurrentConfig
799	    1.2:
800		RRScreenSetSizeRange
801		RROutputSetCrtcs
802		RRModeGet
803		RROutputSetModes
804		RROutputSetConnection
805		RROutputSetSubpixelOrder
806		RROutputSetClones
807		RRCrtcNotify
808
809	• Must delay scanning configuration until after ->rrGetInfo returns
810	  because some drivers will call SetCurrentConfig in the middle
811	  of the ->rrGetInfo operation.
812
813	1.0:
814
815	    • Scan old configuration, mirror to new structures
816
817	    RRScanOldConfig
818		RRCrtcCreate
819		RROutputCreate
820		RROutputSetCrtcs
821		RROutputSetConnection
822		RROutputSetSubpixelOrder
823		RROldModeAdd	• This adds modes one-at-a-time
824		    RRModeGet
825		RRCrtcNotify
826
827	• send events, reset pointer if necessary
828
829	RRTellChanged
830	    WalkTree (sending events)
831
832	    • when layout has changed:
833		RRPointerScreenConfigured
834		RRSendConfigNotify
835
836Asynchronous state setting (1.2 only)
837    When setting state asynchronously, the driver invokes the
838    ->rrGetInfo function and then calls RRTellChanged to flush
839    the changes to the clients and reset pointer if necessary
840
841Set state
842
843    ProcRRSetScreenConfig
844	RRCrtcSet
845	    1.2:
846		->rrCrtcSet
847		    RRCrtcNotify
848	    1.0:
849		->rrSetConfig
850		RRCrtcNotify
851	    RRTellChanged
852 */
853