1af69d88dSmrg<?xml version="1.0" encoding="UTF-8"?>
2af69d88dSmrg<protocol name="drm">
3af69d88dSmrg
4af69d88dSmrg  <copyright>
5af69d88dSmrg    Copyright © 2008-2011 Kristian Høgsberg
6af69d88dSmrg    Copyright © 2010-2011 Intel Corporation
7af69d88dSmrg
8af69d88dSmrg    Permission to use, copy, modify, distribute, and sell this
9af69d88dSmrg    software and its documentation for any purpose is hereby granted
10af69d88dSmrg    without fee, provided that\n the above copyright notice appear in
11af69d88dSmrg    all copies and that both that copyright notice and this permission
12af69d88dSmrg    notice appear in supporting documentation, and that the name of
13af69d88dSmrg    the copyright holders not be used in advertising or publicity
14af69d88dSmrg    pertaining to distribution of the software without specific,
15af69d88dSmrg    written prior permission.  The copyright holders make no
16af69d88dSmrg    representations about the suitability of this software for any
17af69d88dSmrg    purpose.  It is provided "as is" without express or implied
18af69d88dSmrg    warranty.
19af69d88dSmrg
20af69d88dSmrg    THE COPYRIGHT HOLDERS DISCLAIM ALL WARRANTIES WITH REGARD TO THIS
21af69d88dSmrg    SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND
22af69d88dSmrg    FITNESS, IN NO EVENT SHALL THE COPYRIGHT HOLDERS BE LIABLE FOR ANY
23af69d88dSmrg    SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
24af69d88dSmrg    WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN
25af69d88dSmrg    AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
26af69d88dSmrg    ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF
27af69d88dSmrg    THIS SOFTWARE.
28af69d88dSmrg  </copyright>
29af69d88dSmrg
30af69d88dSmrg  <!-- drm support. This object is created by the server and published
31af69d88dSmrg       using the display's global event. -->
32af69d88dSmrg  <interface name="wl_drm" version="2">
33af69d88dSmrg    <enum name="error">
34af69d88dSmrg      <entry name="authenticate_fail" value="0"/>
35af69d88dSmrg      <entry name="invalid_format" value="1"/>
36af69d88dSmrg      <entry name="invalid_name" value="2"/>
37af69d88dSmrg    </enum>
38af69d88dSmrg
39af69d88dSmrg    <enum name="format">
40af69d88dSmrg      <!-- The drm format codes match the #defines in drm_fourcc.h.
41af69d88dSmrg           The formats actually supported by the compositor will be
4201e04c3fSmrg           reported by the format event. New codes must not be added,
4301e04c3fSmrg           unless directly taken from drm_fourcc.h. -->
44af69d88dSmrg      <entry name="c8" value="0x20203843"/>
45af69d88dSmrg      <entry name="rgb332" value="0x38424752"/>
46af69d88dSmrg      <entry name="bgr233" value="0x38524742"/>
47af69d88dSmrg      <entry name="xrgb4444" value="0x32315258"/>
48af69d88dSmrg      <entry name="xbgr4444" value="0x32314258"/>
49af69d88dSmrg      <entry name="rgbx4444" value="0x32315852"/>
50af69d88dSmrg      <entry name="bgrx4444" value="0x32315842"/>
51af69d88dSmrg      <entry name="argb4444" value="0x32315241"/>
52af69d88dSmrg      <entry name="abgr4444" value="0x32314241"/>
53af69d88dSmrg      <entry name="rgba4444" value="0x32314152"/>
54af69d88dSmrg      <entry name="bgra4444" value="0x32314142"/>
55af69d88dSmrg      <entry name="xrgb1555" value="0x35315258"/>
56af69d88dSmrg      <entry name="xbgr1555" value="0x35314258"/>
57af69d88dSmrg      <entry name="rgbx5551" value="0x35315852"/>
58af69d88dSmrg      <entry name="bgrx5551" value="0x35315842"/>
59af69d88dSmrg      <entry name="argb1555" value="0x35315241"/>
60af69d88dSmrg      <entry name="abgr1555" value="0x35314241"/>
61af69d88dSmrg      <entry name="rgba5551" value="0x35314152"/>
62af69d88dSmrg      <entry name="bgra5551" value="0x35314142"/>
63af69d88dSmrg      <entry name="rgb565" value="0x36314752"/>
64af69d88dSmrg      <entry name="bgr565" value="0x36314742"/>
65af69d88dSmrg      <entry name="rgb888" value="0x34324752"/>
66af69d88dSmrg      <entry name="bgr888" value="0x34324742"/>
67af69d88dSmrg      <entry name="xrgb8888" value="0x34325258"/>
68af69d88dSmrg      <entry name="xbgr8888" value="0x34324258"/>
69af69d88dSmrg      <entry name="rgbx8888" value="0x34325852"/>
70af69d88dSmrg      <entry name="bgrx8888" value="0x34325842"/>
71af69d88dSmrg      <entry name="argb8888" value="0x34325241"/>
72af69d88dSmrg      <entry name="abgr8888" value="0x34324241"/>
73af69d88dSmrg      <entry name="rgba8888" value="0x34324152"/>
74af69d88dSmrg      <entry name="bgra8888" value="0x34324142"/>
75af69d88dSmrg      <entry name="xrgb2101010" value="0x30335258"/>
76af69d88dSmrg      <entry name="xbgr2101010" value="0x30334258"/>
77af69d88dSmrg      <entry name="rgbx1010102" value="0x30335852"/>
78af69d88dSmrg      <entry name="bgrx1010102" value="0x30335842"/>
79af69d88dSmrg      <entry name="argb2101010" value="0x30335241"/>
80af69d88dSmrg      <entry name="abgr2101010" value="0x30334241"/>
81af69d88dSmrg      <entry name="rgba1010102" value="0x30334152"/>
82af69d88dSmrg      <entry name="bgra1010102" value="0x30334142"/>
83af69d88dSmrg      <entry name="yuyv" value="0x56595559"/>
84af69d88dSmrg      <entry name="yvyu" value="0x55595659"/>
85af69d88dSmrg      <entry name="uyvy" value="0x59565955"/>
86af69d88dSmrg      <entry name="vyuy" value="0x59555956"/>
87af69d88dSmrg      <entry name="ayuv" value="0x56555941"/>
887e102996Smaya      <entry name="xyuv8888" value="0x56555958"/>
89af69d88dSmrg      <entry name="nv12" value="0x3231564e"/>
90af69d88dSmrg      <entry name="nv21" value="0x3132564e"/>
91af69d88dSmrg      <entry name="nv16" value="0x3631564e"/>
92af69d88dSmrg      <entry name="nv61" value="0x3136564e"/>
93af69d88dSmrg      <entry name="yuv410" value="0x39565559"/>
94af69d88dSmrg      <entry name="yvu410" value="0x39555659"/>
95af69d88dSmrg      <entry name="yuv411" value="0x31315559"/>
96af69d88dSmrg      <entry name="yvu411" value="0x31315659"/>
97af69d88dSmrg      <entry name="yuv420" value="0x32315559"/>
98af69d88dSmrg      <entry name="yvu420" value="0x32315659"/>
99af69d88dSmrg      <entry name="yuv422" value="0x36315559"/>
100af69d88dSmrg      <entry name="yvu422" value="0x36315659"/>
101af69d88dSmrg      <entry name="yuv444" value="0x34325559"/>
102af69d88dSmrg      <entry name="yvu444" value="0x34325659"/>
1037ec681f3Smrg      <entry name="abgr16f" value="0x48344241"/>
1047ec681f3Smrg      <entry name="xbgr16f" value="0x48344258"/>
105af69d88dSmrg    </enum>
106af69d88dSmrg
107af69d88dSmrg    <!-- Call this request with the magic received from drmGetMagic().
108af69d88dSmrg         It will be passed on to the drmAuthMagic() or
109af69d88dSmrg         DRIAuthConnection() call.  This authentication must be
110af69d88dSmrg         completed before create_buffer could be used. -->
111af69d88dSmrg    <request name="authenticate">
112af69d88dSmrg      <arg name="id" type="uint"/>
113af69d88dSmrg    </request>
114af69d88dSmrg
115af69d88dSmrg    <!-- Create a wayland buffer for the named DRM buffer.  The DRM
116af69d88dSmrg         surface must have a name using the flink ioctl -->
117af69d88dSmrg    <request name="create_buffer">
118af69d88dSmrg      <arg name="id" type="new_id" interface="wl_buffer"/>
119af69d88dSmrg      <arg name="name" type="uint"/>
120af69d88dSmrg      <arg name="width" type="int"/>
121af69d88dSmrg      <arg name="height" type="int"/>
122af69d88dSmrg      <arg name="stride" type="uint"/>
123af69d88dSmrg      <arg name="format" type="uint"/>
124af69d88dSmrg    </request>
125af69d88dSmrg
126af69d88dSmrg    <!-- Create a wayland buffer for the named DRM buffer.  The DRM
127af69d88dSmrg         surface must have a name using the flink ioctl -->
128af69d88dSmrg    <request name="create_planar_buffer">
129af69d88dSmrg      <arg name="id" type="new_id" interface="wl_buffer"/>
130af69d88dSmrg      <arg name="name" type="uint"/>
131af69d88dSmrg      <arg name="width" type="int"/>
132af69d88dSmrg      <arg name="height" type="int"/>
133af69d88dSmrg      <arg name="format" type="uint"/>
134af69d88dSmrg      <arg name="offset0" type="int"/>
135af69d88dSmrg      <arg name="stride0" type="int"/>
136af69d88dSmrg      <arg name="offset1" type="int"/>
137af69d88dSmrg      <arg name="stride1" type="int"/>
138af69d88dSmrg      <arg name="offset2" type="int"/>
139af69d88dSmrg      <arg name="stride2" type="int"/>
140af69d88dSmrg    </request>
141af69d88dSmrg
142af69d88dSmrg    <!-- Notification of the path of the drm device which is used by
143af69d88dSmrg         the server.  The client should use this device for creating
144af69d88dSmrg         local buffers.  Only buffers created from this device should
145af69d88dSmrg         be be passed to the server using this drm object's
146af69d88dSmrg         create_buffer request. -->
147af69d88dSmrg    <event name="device">
148af69d88dSmrg      <arg name="name" type="string"/>
149af69d88dSmrg    </event>
150af69d88dSmrg
151af69d88dSmrg    <event name="format">
152af69d88dSmrg      <arg name="format" type="uint"/>
153af69d88dSmrg    </event>
154af69d88dSmrg
155af69d88dSmrg    <!-- Raised if the authenticate request succeeded -->
156af69d88dSmrg    <event name="authenticated"/>
157af69d88dSmrg
158af69d88dSmrg    <enum name="capability" since="2">
159af69d88dSmrg      <description summary="wl_drm capability bitmask">
160af69d88dSmrg        Bitmask of capabilities.
161af69d88dSmrg      </description>
162af69d88dSmrg      <entry name="prime" value="1" summary="wl_drm prime available"/>
163af69d88dSmrg    </enum>
164af69d88dSmrg
165af69d88dSmrg    <event name="capabilities">
166af69d88dSmrg      <arg name="value" type="uint"/>
167af69d88dSmrg    </event>
168af69d88dSmrg
169af69d88dSmrg    <!-- Version 2 additions -->
170af69d88dSmrg
171af69d88dSmrg    <!-- Create a wayland buffer for the prime fd.  Use for regular and planar
172af69d88dSmrg         buffers.  Pass 0 for offset and stride for unused planes. -->
173af69d88dSmrg    <request name="create_prime_buffer" since="2">
174af69d88dSmrg      <arg name="id" type="new_id" interface="wl_buffer"/>
175af69d88dSmrg      <arg name="name" type="fd"/>
176af69d88dSmrg      <arg name="width" type="int"/>
177af69d88dSmrg      <arg name="height" type="int"/>
178af69d88dSmrg      <arg name="format" type="uint"/>
179af69d88dSmrg      <arg name="offset0" type="int"/>
180af69d88dSmrg      <arg name="stride0" type="int"/>
181af69d88dSmrg      <arg name="offset1" type="int"/>
182af69d88dSmrg      <arg name="stride1" type="int"/>
183af69d88dSmrg      <arg name="offset2" type="int"/>
184af69d88dSmrg      <arg name="stride2" type="int"/>
185af69d88dSmrg    </request>
186af69d88dSmrg
187af69d88dSmrg  </interface>
188af69d88dSmrg
189af69d88dSmrg</protocol>
190