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