1 <?xml version="1.0" encoding="utf-8"?>
3 Copyright (C) 2009 Open Text Corporation. All Rights Reserved.
5 Permission is hereby granted, free of charge, to any person obtaining a copy
6 of this software and associated documentation files (the "Software"), to deal
7 in the Software without restriction, including without limitation the rights
8 to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 copies of the Software, and to permit persons to whom the Software is
10 furnished to do so, subject to the following conditions:
12 The above copyright notice and this permission notice shall be included in all
13 copies or substantial portions of the Software.
15 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
19 ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
20 WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
22 Except as contained in this notice, the names of the authors or their
23 institutions shall not be used in advertising or otherwise to promote the
24 sale, use or other dealings in this Software without prior written
25 authorization from the authors.
28 <xcb header="xf86vidmode" extension-xname="XFree86-VidModeExtension" extension-name="XF86VidMode"
29 major-version="2" minor-version="2">
31 <!-- In places where there are multiple versions of the protocol, this
32 describes version 2.2. If you do not call xcb_xf86vidmode_set_client_version()
33 then some requests may fail and some replies may not be what you expect. -->
35 <typedef oldname="CARD32" newname="SYNCRANGE" /> <!-- Min and Max fixed-decimal-point values -->
36 <typedef oldname="CARD32" newname="DOTCLOCK" /> <!-- A single fixed-decimal-point value -->
38 <enum name="ModeFlag">
39 <item name="Positive_HSync"> <bit>0</bit></item>
40 <item name="Negative_HSync"> <bit>1</bit></item>
41 <item name="Positive_VSync"> <bit>2</bit></item>
42 <item name="Negative_VSync"> <bit>3</bit></item>
43 <item name="Interlace"> <bit>4</bit></item>
44 <item name="Composite_Sync"> <bit>5</bit></item>
45 <item name="Positive_CSync"> <bit>6</bit></item>
46 <item name="Negative_CSync"> <bit>7</bit></item>
47 <item name="HSkew"> <bit>8</bit></item>
48 <item name="Broadcast"> <bit>9</bit></item>
49 <item name="Pixmux"> <bit>10</bit></item>
50 <item name="Double_Clock"> <bit>11</bit></item>
51 <item name="Half_Clock"> <bit>12</bit></item>
54 <enum name="ClockFlag">
55 <item name="Programable"> <bit>0</bit></item>
58 <enum name="Permission">
59 <item name="Read"> <bit>0</bit></item>
60 <item name="Write"> <bit>1</bit></item>
63 <struct name="ModeInfo">
64 <field type="DOTCLOCK" name="dotclock" />
65 <field type="CARD16" name= "hdisplay" />
66 <field type="CARD16" name= "hsyncstart" />
67 <field type="CARD16" name= "hsyncend" />
68 <field type="CARD16" name= "htotal" />
69 <field type="CARD32" name= "hskew" />
70 <field type="CARD16" name= "vdisplay" />
71 <field type="CARD16" name= "vsyncstart" />
72 <field type="CARD16" name= "vsyncend" />
73 <field type="CARD16" name= "vtotal" />
75 <field type="CARD32" name="flags" mask="ModeFlag" />
77 <field type="CARD32" name="privsize" />
80 <request name="QueryVersion" opcode="0">
83 <field type="CARD16" name="major_version" />
84 <field type="CARD16" name="minor_version" />
88 <request name="GetModeLine" opcode="1">
89 <field type="CARD16" name="screen" />
93 <field type="DOTCLOCK" name="dotclock" />
94 <field type="CARD16" name= "hdisplay" />
95 <field type="CARD16" name= "hsyncstart" />
96 <field type="CARD16" name= "hsyncend" />
97 <field type="CARD16" name= "htotal" />
98 <field type="CARD16" name= "hskew" />
99 <field type="CARD16" name= "vdisplay" />
100 <field type="CARD16" name= "vsyncstart" />
101 <field type="CARD16" name= "vsyncend" />
102 <field type="CARD16" name= "vtotal" />
104 <field type="CARD32" name="flags" mask="ModeFlag" />
106 <field type="CARD32" name="privsize" />
107 <list type="CARD8" name="private">
108 <fieldref>privsize</fieldref>
113 <request name="ModModeLine" opcode="2">
114 <field type="CARD32" name="screen" />
115 <field type="CARD16" name= "hdisplay" />
116 <field type="CARD16" name= "hsyncstart" />
117 <field type="CARD16" name= "hsyncend" />
118 <field type="CARD16" name= "htotal" />
119 <field type="CARD16" name= "hskew" />
120 <field type="CARD16" name= "vdisplay" />
121 <field type="CARD16" name= "vsyncstart" />
122 <field type="CARD16" name= "vsyncend" />
123 <field type="CARD16" name= "vtotal" />
125 <field type="CARD32" name="flags" mask="ModeFlag" />
127 <field type="CARD32" name="privsize" />
128 <list type="CARD8" name="private">
129 <fieldref>privsize</fieldref>
133 <request name="SwitchMode" opcode="3">
134 <field type="CARD16" name="screen" />
135 <field type="CARD16" name="zoom" />
138 <request name="GetMonitor" opcode="4">
139 <field type="CARD16" name="screen" />
143 <field type="CARD8" name="vendor_length" />
144 <field type="CARD8" name="model_length" />
145 <field type="CARD8" name="num_hsync" />
146 <field type="CARD8" name="num_vsync" />
148 <list type="SYNCRANGE" name="hsync">
149 <fieldref>num_hsync</fieldref>
151 <list type="SYNCRANGE" name="vsync">
152 <fieldref>num_vsync</fieldref>
154 <list type="char" name="vendor">
155 <fieldref>vendor_length</fieldref>
157 <list type="void" name="alignment_pad">
161 <fieldref>vendor_length</fieldref>
168 <fieldref>vendor_length</fieldref>
171 <list type="char" name="model">
172 <fieldref>model_length</fieldref>
177 <request name="LockModeSwitch" opcode="5">
178 <field type="CARD16" name="screen" />
179 <field type="CARD16" name="lock" />
182 <request name="GetAllModeLines" opcode="6">
183 <field type="CARD16" name="screen" />
187 <field type="CARD32" name="modecount" />
189 <list type="ModeInfo" name="modeinfo">
190 <fieldref>modecount</fieldref>
195 <request name="AddModeLine" opcode="7">
196 <field type="CARD32" name="screen" />
197 <field type="DOTCLOCK" name="dotclock" />
198 <field type="CARD16" name= "hdisplay" />
199 <field type="CARD16" name= "hsyncstart" />
200 <field type="CARD16" name= "hsyncend" />
201 <field type="CARD16" name= "htotal" />
202 <field type="CARD16" name= "hskew" />
203 <field type="CARD16" name= "vdisplay" />
204 <field type="CARD16" name= "vsyncstart" />
205 <field type="CARD16" name= "vsyncend" />
206 <field type="CARD16" name= "vtotal" />
208 <field type="CARD32" name="flags" mask="ModeFlag" />
210 <field type="CARD32" name="privsize" />
211 <field type="DOTCLOCK" name="after_dotclock" />
212 <field type="CARD16" name= "after_hdisplay" />
213 <field type="CARD16" name= "after_hsyncstart" />
214 <field type="CARD16" name= "after_hsyncend" />
215 <field type="CARD16" name= "after_htotal" />
216 <field type="CARD16" name= "after_hskew" />
217 <field type="CARD16" name= "after_vdisplay" />
218 <field type="CARD16" name= "after_vsyncstart" />
219 <field type="CARD16" name= "after_vsyncend" />
220 <field type="CARD16" name= "after_vtotal" />
222 <field type="CARD32" name="after_flags" mask="ModeFlag" />
224 <list type="CARD8" name="private">
225 <fieldref>privsize</fieldref>
229 <request name="DeleteModeLine" opcode="8">
230 <field type="CARD32" name="screen" />
231 <field type="DOTCLOCK" name="dotclock" />
232 <field type="CARD16" name= "hdisplay" />
233 <field type="CARD16" name= "hsyncstart" />
234 <field type="CARD16" name= "hsyncend" />
235 <field type="CARD16" name= "htotal" />
236 <field type="CARD16" name= "hskew" />
237 <field type="CARD16" name= "vdisplay" />
238 <field type="CARD16" name= "vsyncstart" />
239 <field type="CARD16" name= "vsyncend" />
240 <field type="CARD16" name= "vtotal" />
242 <field type="CARD32" name="flags" mask="ModeFlag" />
244 <field type="CARD32" name="privsize" />
245 <list type="CARD8" name="private">
246 <fieldref>privsize</fieldref>
250 <request name="ValidateModeLine" opcode="9">
251 <field type="CARD32" name="screen" />
252 <field type="DOTCLOCK" name="dotclock" />
253 <field type="CARD16" name= "hdisplay" />
254 <field type="CARD16" name= "hsyncstart" />
255 <field type="CARD16" name= "hsyncend" />
256 <field type="CARD16" name= "htotal" />
257 <field type="CARD16" name= "hskew" />
258 <field type="CARD16" name= "vdisplay" />
259 <field type="CARD16" name= "vsyncstart" />
260 <field type="CARD16" name= "vsyncend" />
261 <field type="CARD16" name= "vtotal" />
263 <field type="CARD32" name="flags" mask="ModeFlag" />
265 <field type="CARD32" name="privsize" />
266 <list type="CARD8" name="private">
267 <fieldref>privsize</fieldref>
271 <field type="CARD32" name="status" />
276 <request name="SwitchToMode" opcode="10">
277 <field type="CARD32" name="screen" />
278 <field type="DOTCLOCK" name="dotclock" />
279 <field type="CARD16" name= "hdisplay" />
280 <field type="CARD16" name= "hsyncstart" />
281 <field type="CARD16" name= "hsyncend" />
282 <field type="CARD16" name= "htotal" />
283 <field type="CARD16" name= "hskew" />
284 <field type="CARD16" name= "vdisplay" />
285 <field type="CARD16" name= "vsyncstart" />
286 <field type="CARD16" name= "vsyncend" />
287 <field type="CARD16" name= "vtotal" />
289 <field type="CARD32" name="flags" mask="ModeFlag" />
291 <field type="CARD32" name="privsize" />
292 <list type="CARD8" name="private">
293 <fieldref>privsize</fieldref>
297 <request name="GetViewPort" opcode="11">
298 <field type="CARD16" name="screen" />
302 <field type="CARD32" name="x" />
303 <field type="CARD32" name="y" />
308 <request name="SetViewPort" opcode="12">
309 <field type="CARD16" name="screen" />
311 <field type="CARD32" name="x" />
312 <field type="CARD32" name="y" />
315 <!-- new for version 2.x -->
316 <request name="GetDotClocks" opcode="13">
317 <field type="CARD16" name="screen" />
321 <field type="CARD32" name="flags" mask="ClockFlag" />
322 <field type="CARD32" name="clocks" />
323 <field type="CARD32" name="maxclocks" />
325 <list type="CARD32" name="clock">
326 <!-- Only if flags does not include Programable:
327 (1 - (flags & 1)) * clocks
333 <fieldref>flags</fieldref>
337 <fieldref>clocks</fieldref>
343 <request name="SetClientVersion" opcode="14">
344 <field type="CARD16" name="major" />
345 <field type="CARD16" name="minor" />
348 <request name="SetGamma" opcode="15">
349 <field type="CARD16" name="screen" />
351 <field type="CARD32" name="red" />
352 <field type="CARD32" name="green" />
353 <field type="CARD32" name="blue" />
357 <request name="GetGamma" opcode="16">
358 <field type="CARD16" name="screen" />
362 <field type="CARD32" name="red" />
363 <field type="CARD32" name="green" />
364 <field type="CARD32" name="blue" />
369 <request name="GetGammaRamp" opcode="17">
370 <field type="CARD16" name="screen" />
371 <field type="CARD16" name="size" />
374 <field type="CARD16" name="size" />
376 <list type="CARD16" name="red">
379 <fieldref>size</fieldref>
387 <list type="CARD16" name="green">
390 <fieldref>size</fieldref>
398 <list type="CARD16" name="blue">
401 <fieldref>size</fieldref>
412 <request name="SetGammaRamp" opcode="18">
413 <field type="CARD16" name="screen" />
414 <field type="CARD16" name="size" />
415 <list type="CARD16" name="red">
418 <fieldref>size</fieldref>
426 <list type="CARD16" name="green">
429 <fieldref>size</fieldref>
437 <list type="CARD16" name="blue">
440 <fieldref>size</fieldref>
450 <request name="GetGammaRampSize" opcode="19">
451 <field type="CARD16" name="screen" />
455 <field type="CARD16" name="size" />
460 <request name="GetPermissions" opcode="20">
461 <field type="CARD16" name="screen" />
465 <field type="CARD32" name="permissions" mask="Permission" />
470 <error name="BadClock" number="0" />
471 <error name="BadHTimings" number="1" />
472 <error name="BadVTimings" number="2" />
473 <error name="ModeUnsuitable" number="3" />
474 <error name="ExtensionDisabled" number="4" />
475 <error name="ClientNotLocal" number="5" />
476 <error name="ZoomLocked" number="6" />