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. New codes must not be added, 43 unless directly taken from drm_fourcc.h. --> 44 <entry name="c8" value="0x20203843"/> 45 <entry name="rgb332" value="0x38424752"/> 46 <entry name="bgr233" value="0x38524742"/> 47 <entry name="xrgb4444" value="0x32315258"/> 48 <entry name="xbgr4444" value="0x32314258"/> 49 <entry name="rgbx4444" value="0x32315852"/> 50 <entry name="bgrx4444" value="0x32315842"/> 51 <entry name="argb4444" value="0x32315241"/> 52 <entry name="abgr4444" value="0x32314241"/> 53 <entry name="rgba4444" value="0x32314152"/> 54 <entry name="bgra4444" value="0x32314142"/> 55 <entry name="xrgb1555" value="0x35315258"/> 56 <entry name="xbgr1555" value="0x35314258"/> 57 <entry name="rgbx5551" value="0x35315852"/> 58 <entry name="bgrx5551" value="0x35315842"/> 59 <entry name="argb1555" value="0x35315241"/> 60 <entry name="abgr1555" value="0x35314241"/> 61 <entry name="rgba5551" value="0x35314152"/> 62 <entry name="bgra5551" value="0x35314142"/> 63 <entry name="rgb565" value="0x36314752"/> 64 <entry name="bgr565" value="0x36314742"/> 65 <entry name="rgb888" value="0x34324752"/> 66 <entry name="bgr888" value="0x34324742"/> 67 <entry name="xrgb8888" value="0x34325258"/> 68 <entry name="xbgr8888" value="0x34324258"/> 69 <entry name="rgbx8888" value="0x34325852"/> 70 <entry name="bgrx8888" value="0x34325842"/> 71 <entry name="argb8888" value="0x34325241"/> 72 <entry name="abgr8888" value="0x34324241"/> 73 <entry name="rgba8888" value="0x34324152"/> 74 <entry name="bgra8888" value="0x34324142"/> 75 <entry name="xrgb2101010" value="0x30335258"/> 76 <entry name="xbgr2101010" value="0x30334258"/> 77 <entry name="rgbx1010102" value="0x30335852"/> 78 <entry name="bgrx1010102" value="0x30335842"/> 79 <entry name="argb2101010" value="0x30335241"/> 80 <entry name="abgr2101010" value="0x30334241"/> 81 <entry name="rgba1010102" value="0x30334152"/> 82 <entry name="bgra1010102" value="0x30334142"/> 83 <entry name="yuyv" value="0x56595559"/> 84 <entry name="yvyu" value="0x55595659"/> 85 <entry name="uyvy" value="0x59565955"/> 86 <entry name="vyuy" value="0x59555956"/> 87 <entry name="ayuv" value="0x56555941"/> 88 <entry name="xyuv8888" value="0x56555958"/> 89 <entry name="nv12" value="0x3231564e"/> 90 <entry name="nv21" value="0x3132564e"/> 91 <entry name="nv16" value="0x3631564e"/> 92 <entry name="nv61" value="0x3136564e"/> 93 <entry name="yuv410" value="0x39565559"/> 94 <entry name="yvu410" value="0x39555659"/> 95 <entry name="yuv411" value="0x31315559"/> 96 <entry name="yvu411" value="0x31315659"/> 97 <entry name="yuv420" value="0x32315559"/> 98 <entry name="yvu420" value="0x32315659"/> 99 <entry name="yuv422" value="0x36315559"/> 100 <entry name="yvu422" value="0x36315659"/> 101 <entry name="yuv444" value="0x34325559"/> 102 <entry name="yvu444" value="0x34325659"/> 103 </enum> 104 105 <!-- Call this request with the magic received from drmGetMagic(). 106 It will be passed on to the drmAuthMagic() or 107 DRIAuthConnection() call. This authentication must be 108 completed before create_buffer could be used. --> 109 <request name="authenticate"> 110 <arg name="id" type="uint"/> 111 </request> 112 113 <!-- Create a wayland buffer for the named DRM buffer. The DRM 114 surface must have a name using the flink ioctl --> 115 <request name="create_buffer"> 116 <arg name="id" type="new_id" interface="wl_buffer"/> 117 <arg name="name" type="uint"/> 118 <arg name="width" type="int"/> 119 <arg name="height" type="int"/> 120 <arg name="stride" type="uint"/> 121 <arg name="format" type="uint"/> 122 </request> 123 124 <!-- Create a wayland buffer for the named DRM buffer. The DRM 125 surface must have a name using the flink ioctl --> 126 <request name="create_planar_buffer"> 127 <arg name="id" type="new_id" interface="wl_buffer"/> 128 <arg name="name" type="uint"/> 129 <arg name="width" type="int"/> 130 <arg name="height" type="int"/> 131 <arg name="format" type="uint"/> 132 <arg name="offset0" type="int"/> 133 <arg name="stride0" type="int"/> 134 <arg name="offset1" type="int"/> 135 <arg name="stride1" type="int"/> 136 <arg name="offset2" type="int"/> 137 <arg name="stride2" type="int"/> 138 </request> 139 140 <!-- Notification of the path of the drm device which is used by 141 the server. The client should use this device for creating 142 local buffers. Only buffers created from this device should 143 be be passed to the server using this drm object's 144 create_buffer request. --> 145 <event name="device"> 146 <arg name="name" type="string"/> 147 </event> 148 149 <event name="format"> 150 <arg name="format" type="uint"/> 151 </event> 152 153 <!-- Raised if the authenticate request succeeded --> 154 <event name="authenticated"/> 155 156 <enum name="capability" since="2"> 157 <description summary="wl_drm capability bitmask"> 158 Bitmask of capabilities. 159 </description> 160 <entry name="prime" value="1" summary="wl_drm prime available"/> 161 </enum> 162 163 <event name="capabilities"> 164 <arg name="value" type="uint"/> 165 </event> 166 167 <!-- Version 2 additions --> 168 169 <!-- Create a wayland buffer for the prime fd. Use for regular and planar 170 buffers. Pass 0 for offset and stride for unused planes. --> 171 <request name="create_prime_buffer" since="2"> 172 <arg name="id" type="new_id" interface="wl_buffer"/> 173 <arg name="name" type="fd"/> 174 <arg name="width" type="int"/> 175 <arg name="height" type="int"/> 176 <arg name="format" type="uint"/> 177 <arg name="offset0" type="int"/> 178 <arg name="stride0" type="int"/> 179 <arg name="offset1" type="int"/> 180 <arg name="stride1" type="int"/> 181 <arg name="offset2" type="int"/> 182 <arg name="stride2" type="int"/> 183 </request> 184 185 </interface> 186 187</protocol> 188