Remove mode origins. Add preferred mode count.

Switched from identifying source of mode line to listing which modes are
preferred by each output. This enables better CRTC sharing by making modes
less arbitrarily different.
This commit is contained in:
Keith Packard 2006-10-04 20:03:35 -07:00
parent 3c354e7245
commit 369d4e7d20
3 changed files with 22 additions and 44 deletions

View file

@ -36,6 +36,7 @@ typedef unsigned short XRandrRotation;
typedef unsigned short XRandrSizeID;
typedef unsigned short XRandrSubpixelOrder;
typedef unsigned long XRandrModeFlags;
typedef unsigned long XRandrOutputOptions;
#define RANDR_NAME "RANDR"
#define RANDR_MAJOR 1
@ -132,12 +133,6 @@ typedef unsigned long XRandrModeFlags;
#define BadRRCrtc 1
#define BadRRMode 2
#define RRModeOriginMonitor 0
#define RRModeOriginVESA 1
#define RRModeOriginConfig 2
#define RRModeOriginUser 3
#define RRModeOriginOther 4
#define RROutputOptionScaleNone 1
#define RROutputOptionScaleMaxAspect 2
#define RROutputOptionScaleMax 4

View file

@ -48,7 +48,6 @@
#define RRCrtc CARD32
#define RRModeFlags CARD32
#define RROutputOptions CARD32
#define RRModeOrigin CARD8
#define Rotation CARD16
#define SizeID CARD16
@ -196,11 +195,8 @@ typedef struct _xRRModeInfo {
CARD16 vTotal B16;
CARD16 nameLength B16;
RRModeFlags modeFlags B32;
RRModeOrigin origin;
CARD8 pad1;
CARD16 pad2 B16;
} xRRModeInfo;
#define sz_xRRModeInfo 44
#define sz_xRRModeInfo 40
typedef struct {
RROutput output B32;
@ -289,9 +285,9 @@ typedef struct {
CARD8 subpixelOrder;
CARD16 nCrtcs B16;
CARD16 nModes B16;
CARD16 nPreferred B16;
CARD16 nClones B16;
CARD16 nameLength B16;
CARD16 pad1 B16;
RROutputOptions possibleOptions B32;
} xRRGetOutputInfoReply;
#define sz_xRRGetOutputInfoReply 36
@ -378,7 +374,7 @@ typedef struct {
Window window B32;
xRRModeInfo modeInfo;
} xRRCreateModeReq;
#define sz_xRRCreateModeReq 52
#define sz_xRRCreateModeReq 48
typedef struct {
BYTE type;
@ -601,7 +597,10 @@ typedef struct {
} xRROutputPropertyNotifyEvent;
#define sz_xRROUtputPropertyNotifyEvent 32
#undef RROutputOptions
#undef RRModeFlags
#undef RRCrtc
#undef RRMode
#undef RROutput
#undef RRMode
#undef RRCrtc

View file

@ -242,13 +242,6 @@ SIZEID { CARD16 }
MODE { XID or None }
OUTPUTPREFERENCE { RROutputPreferencePreferred,
RROutputPreferenceMonitor,
RROutputPreference
OUTPUTMODE { mode: MODE,
preference: OUTPUTPREFERENCE }
CRTC { XID }
OUTPUT { XID }
@ -300,8 +293,7 @@ MODEINFO { id: MODE
dotClock: CARD32
hSyncStart, hSyncEnd, hTotal, hSkew: CARD16
vSyncStart, vSyncEnd, vTotal: CARD16
modeFlags: SETofMODEFLAG
modeOrigin: MODEORIGIN }
modeFlags: SETofMODEFLAG }
OUTPUTCONFIG { output: OUTPUT
options: SETofOUTPUTOPTION }
@ -570,7 +562,8 @@ dynamic changes in the display environment.
possible-options: SETofOUTPUTOPTION
crtcs: LISTofCRTC
clones: LISTofOUTPUT
modes: LISTofOUTPUTMODE
modes: LISTofOUTPUT
num-preferred: CARD16
└───
Errors: Output
@ -616,6 +609,10 @@ dynamic changes in the display environment.
connect this output to a CRTC not using one of these modes results
in a Match error.
The first 'num-preferred' modes in 'modes' are preferred by the
monitor in some way; for fixed-pixel devices, this would generally
indicate which modes match the resolution of the output device.
┌───
RRListOutputProperties
output:OUTPUT
@ -1178,18 +1175,7 @@ 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 (44) Added in version 1.2
MODEINFO (40) Added in version 1.2
4 CARD32 id
2 CARD16 width in pixels
2 CARD16 height in pixels
@ -1205,8 +1191,6 @@ 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
@ -1249,7 +1233,7 @@ A.1 Common Types
┌───
OUTPUTCONFIG
4 CARD32 output
4 CARD32 set of output options
4 OUTPUTOPTION set of output options
└───
@ -1383,7 +1367,7 @@ A.2.1 Protocol Requests added with version 1.2
1 1 Reply
1 unused
2 CARD16 sequence number
4 c+o+11m+(b+p)/4 reply length
4 c+o+10m+(b+p)/4 reply length
4 TIMESTAMP timestamp
4 TIMESTAMP config-timestamp
2 c number of CRTCs
@ -1393,7 +1377,7 @@ A.2.1 Protocol Requests added with version 1.2
8 unused
4c LISTofCRTC crtcs
4o LISTofOUTPUT outputs
44m LISTofMODEINFO modeinfos
40m LISTofMODEINFO modeinfos
b STRING8 mode names
p unused, p=pad(b)
└───
@ -1416,9 +1400,9 @@ A.2.1 Protocol Requests added with version 1.2
1 SUBPIXELORDER subpixel-order
2 c number of CRTCs
2 m number of modes
2 p number of preferred modes
2 o number of clones
2 n length of name
2 unused
4 SETofOUTPUTOPTION supported output options
4c LISTofCRTC crtcs
4m LISTofMODE modes
@ -1508,9 +1492,9 @@ A.2.1 Protocol Requests added with version 1.2
RRCreateMode
1 CARD8 major opcode
1 14 RandR opcode
2 13+(n+p)/4 length
2 12+(n+p)/4 length
4 WINDOW window
44 MODEINFO mode
40 MODEINFO mode
n STRING8 mode name
p unused, p=pad(n)