diff options
author | Dave Airlie <airlied@redhat.com> | 2012-01-20 17:38:16 +0000 |
---|---|---|
committer | Dave Airlie <airlied@redhat.com> | 2012-07-05 21:08:55 +0100 |
commit | ef99bda581449d6c8dab7233e287c7bfd578730c (patch) | |
tree | 614f0ba8e581a2cfc789b1c215265a41302bd893 /randrproto.h | |
parent | e0c94fa3a9e9f237c65c35e42aaa673994e55b7e (diff) |
randr: add provider object (v8)
A provider object represents a GPU or virtual device that provides
rendering or output services to the X server. This protocol
allow controlling provider objects for output and offload slave devices.
v1.1: fix typo add missing define
v2: rename nProperties back to nAtoms, makes server simpler to c-n-p,
add missing Get request/reply
v3: bring back configure property, no point in diverging from the
output property code without good reason.
also fix typo pointed out on irc by rei4dan.
v3.1: drop cut-n-paste, increase RRNumberRequests
v4: reviewed by Aaron, address comments:
Fix provider error code
add missing notify, remove dri2 references, fix c-n-p issues.
v5: add provider change notify event with current role.
v5.1: fix cut-n-paste
v6:
document flags, fix whitespace, add better errors for SetProviderRoles,
add new events, fix pending language.
v6.1: add missing change notify event struct + missing padding
v7: fix a bunch more tab/spaces, add appendix sections for requests, events
and errors, remove multimaster flag in favour of max master counter,
move some members around to follow other events.
v7.1 fix maxMaster + wrong comment, one whitespace
v7.2 bump to being randr 1.4, fix some too generic names.
v7.3 remove dynamic flag, fix some language
v8 overhaul complete protocol, remove set provider roles, add specific
methods for setting offload sinks and output sources, add a list
of associated providers into the get provider info struct.
Earlier-review-by: Aaron Plattner <aplattner@nvidia.com>
Reviewed-by: Keith Packard <keithp@keithp.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
Diffstat (limited to 'randrproto.h')
-rw-r--r-- | randrproto.h | 235 |
1 files changed, 235 insertions, 0 deletions
diff --git a/randrproto.h b/randrproto.h index 3b98a9f..30691e7 100644 --- a/randrproto.h +++ b/randrproto.h @@ -48,6 +48,7 @@ #define RROutput CARD32 #define RRMode CARD32 #define RRCrtc CARD32 +#define RRProvider CARD32 #define RRModeFlags CARD32 #define Rotation CARD16 @@ -646,6 +647,195 @@ typedef struct { #define sz_xRRGetOutputPrimaryReply 32 /* + * Additions for V1.4 + */ + +typedef struct { + CARD8 reqType; + CARD8 randrReqType; + CARD16 length B16; + Window window B32; +} xRRGetProvidersReq; +#define sz_xRRGetProvidersReq 8 + +typedef struct { + BYTE type; + CARD8 pad; + CARD16 sequenceNumber B16; + CARD32 length B32; + Time timestamp B32; + CARD16 nProviders; + CARD16 pad1 B16; + CARD32 pad2 B32; + CARD32 pad3 B32; + CARD32 pad4 B32; + CARD32 pad5 B32; +} xRRGetProvidersReply; +#define sz_xRRGetProvidersReply 32 + +typedef struct { + CARD8 reqType; + CARD8 randrReqType; + CARD16 length B16; + RRProvider provider B32; + Time configTimestamp B32; +} xRRGetProviderInfoReq; +#define sz_xRRGetProviderInfoReq 12 + +typedef struct { + BYTE type; + CARD8 status; + CARD16 sequenceNumber B16; + CARD32 length B32; + Time timestamp B32; + CARD32 capabilities B32; + CARD16 nCrtcs B16; + CARD16 nOutputs B16; + CARD16 nAssociatedProviders B16; + CARD16 nameLength B16; + CARD32 pad1 B32; + CARD32 pad2 B32; +} xRRGetProviderInfoReply; +#define sz_xRRGetProviderInfoReply 32 + +typedef struct { + CARD8 reqType; + CARD8 randrReqType; + CARD16 length B16; + RRProvider provider B32; + RRProvider source_provider B32; + Time configTimestamp B32; +} xRRSetProviderOutputSourceReq; +#define sz_xRRSetProviderOutputSourceReq 16 + +typedef struct { + CARD8 reqType; + CARD8 randrReqType; + CARD16 length B16; + RRProvider provider B32; + RRProvider sink_provider B32; + Time configTimestamp B32; +} xRRSetProviderOffloadSinkReq; +#define sz_xRRSetProviderOffloadSinkReq 16 + +typedef struct { + CARD8 reqType; + CARD8 randrReqType; + CARD16 length B16; + RRProvider provider B32; +} xRRListProviderPropertiesReq; +#define sz_xRRListProviderPropertiesReq 8 + +typedef struct { + BYTE type; + CARD8 pad0; + CARD16 sequenceNumber B16; + CARD32 length B32; + CARD16 nAtoms B16; + CARD16 pad1 B16; + CARD32 pad2 B32; + CARD32 pad3 B32; + CARD32 pad4 B32; + CARD32 pad5 B32; + CARD32 pad6 B32; +} xRRListProviderPropertiesReply; +#define sz_xRRListProviderPropertiesReply 32 + +typedef struct { + CARD8 reqType; + CARD8 randrReqType; + CARD16 length B16; + RRProvider provider B32; + Atom property B32; +} xRRQueryProviderPropertyReq; +#define sz_xRRQueryProviderPropertyReq 12 + +typedef struct { + BYTE type; + BYTE pad0; + CARD16 sequenceNumber B16; + CARD32 length B32; + BOOL pending; + BOOL range; + BOOL immutable; + BYTE pad1; + CARD32 pad2 B32; + CARD32 pad3 B32; + CARD32 pad4 B32; + CARD32 pad5 B32; + CARD32 pad6 B32; +} xRRQueryProviderPropertyReply; +#define sz_xRRQueryProviderPropertyReply 32 + +typedef struct { + CARD8 reqType; + CARD8 randrReqType; + CARD16 length B16; + RRProvider provider B32; + Atom property B32; + BOOL pending; + BOOL range; + CARD16 pad B16; +} xRRConfigureProviderPropertyReq; +#define sz_xRRConfigureProviderPropertyReq 16 + +typedef struct { + CARD8 reqType; + CARD8 randrReqType; + CARD16 length B16; + RRProvider provider B32; + Atom property B32; + Atom type B32; + CARD8 format; + CARD8 mode; + CARD16 pad; + CARD32 nUnits B32; +} xRRChangeProviderPropertyReq; +#define sz_xRRChangeProviderPropertyReq 24 + +typedef struct { + CARD8 reqType; + CARD8 randrReqType; + CARD16 length B16; + RRProvider provider B32; + Atom property B32; +} xRRDeleteProviderPropertyReq; +#define sz_xRRDeleteProviderPropertyReq 12 + +typedef struct { + CARD8 reqType; + CARD8 randrReqType; + CARD16 length B16; + RRProvider provider B32; + Atom property B32; + Atom type B32; + CARD32 longOffset B32; + CARD32 longLength B32; +#ifdef __cplusplus + BOOL _delete; +#else + BOOL delete; +#endif + BOOL pending; + CARD16 pad1 B16; +} xRRGetProviderPropertyReq; +#define sz_xRRGetProviderPropertyReq 28 + +typedef struct { + BYTE type; + CARD8 format; + CARD16 sequenceNumber B16; + CARD32 length B32; + Atom propertyType B32; + CARD32 bytesAfter B32; + CARD32 nItems B32; + CARD32 pad1 B32; + CARD32 pad2 B32; + CARD32 pad3 B32; +} xRRGetProviderPropertyReply; +#define sz_xRRGetProviderPropertyReply 32 + +/* * event */ typedef struct { @@ -715,6 +905,50 @@ typedef struct { #define sz_xRROutputPropertyNotifyEvent 32 typedef struct { + CARD8 type; /* always evBase + RRNotify */ + CARD8 subCode; /* RRNotify_ProviderChange */ + CARD16 sequenceNumber B16; + Time timestamp B32; /* time provider was changed */ + Window window B32; /* window requesting notification */ + RRProvider provider B32; /* affected provider */ + CARD32 pad1 B32; + CARD32 pad2 B32; + CARD32 pad3 B32; + CARD32 pad4 B32; +} xRRProviderChangeNotifyEvent; +#define sz_xRRProviderChangeNotifyEvent 32 + +typedef struct { + CARD8 type; /* always evBase + RRNotify */ + CARD8 subCode; /* RRNotify_ProviderProperty */ + CARD16 sequenceNumber B16; + Window window B32; /* window requesting notification */ + RRProvider provider B32; /* affected provider */ + Atom atom B32; /* property name */ + Time timestamp B32; /* time provider was changed */ + CARD8 state; /* NewValue or Deleted */ + CARD8 pad1; + CARD16 pad2 B16; + CARD32 pad3 B32; + CARD32 pad4 B32; +} xRRProviderPropertyNotifyEvent; +#define sz_xRRProviderPropertyNotifyEvent 32 + +typedef struct { + CARD8 type; /* always evBase + RRNotify */ + CARD8 subCode; /* RRNotify_ResourceChange */ + CARD16 sequenceNumber B16; + Time timestamp B32; /* time resource was changed */ + Window window B32; /* window requesting notification */ + CARD32 pad1 B32; + CARD32 pad2 B32; + CARD32 pad3 B32; + CARD32 pad4 B32; + CARD32 pad5 B32; +} xRRResourceChangeNotifyEvent; +#define sz_xRRResourceChangeNotifyEvent 32 + +typedef struct { CARD8 reqType; CARD8 randrReqType; CARD16 length B16; @@ -784,6 +1018,7 @@ typedef struct { #undef RROutput #undef RRMode #undef RRCrtc +#undef RRProvider #undef Drawable #undef Window #undef Font |