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="nv12" value="0x3231564e"/> 89 <entry name="nv21" value="0x3132564e"/> 90 <entry name="nv16" value="0x3631564e"/> 91 <entry name="nv61" value="0x3136564e"/> 92 <entry name="yuv410" value="0x39565559"/> 93 <entry name="yvu410" value="0x39555659"/> 94 <entry name="yuv411" value="0x31315559"/> 95 <entry name="yvu411" value="0x31315659"/> 96 <entry name="yuv420" value="0x32315559"/> 97 <entry name="yvu420" value="0x32315659"/> 98 <entry name="yuv422" value="0x36315559"/> 99 <entry name="yvu422" value="0x36315659"/> 100 <entry name="yuv444" value="0x34325559"/> 101 <entry name="yvu444" value="0x34325659"/> 102 </enum> 103 104 <!-- Call this request with the magic received from drmGetMagic(). 105 It will be passed on to the drmAuthMagic() or 106 DRIAuthConnection() call. This authentication must be 107 completed before create_buffer could be used. --> 108 <request name="authenticate"> 109 <arg name="id" type="uint"/> 110 </request> 111 112 <!-- Create a wayland buffer for the named DRM buffer. The DRM 113 surface must have a name using the flink ioctl --> 114 <request name="create_buffer"> 115 <arg name="id" type="new_id" interface="wl_buffer"/> 116 <arg name="name" type="uint"/> 117 <arg name="width" type="int"/> 118 <arg name="height" type="int"/> 119 <arg name="stride" type="uint"/> 120 <arg name="format" type="uint"/> 121 </request> 122 123 <!-- Create a wayland buffer for the named DRM buffer. The DRM 124 surface must have a name using the flink ioctl --> 125 <request name="create_planar_buffer"> 126 <arg name="id" type="new_id" interface="wl_buffer"/> 127 <arg name="name" type="uint"/> 128 <arg name="width" type="int"/> 129 <arg name="height" type="int"/> 130 <arg name="format" type="uint"/> 131 <arg name="offset0" type="int"/> 132 <arg name="stride0" type="int"/> 133 <arg name="offset1" type="int"/> 134 <arg name="stride1" type="int"/> 135 <arg name="offset2" type="int"/> 136 <arg name="stride2" type="int"/> 137 </request> 138 139 <!-- Notification of the path of the drm device which is used by 140 the server. The client should use this device for creating 141 local buffers. Only buffers created from this device should 142 be be passed to the server using this drm object's 143 create_buffer request. --> 144 <event name="device"> 145 <arg name="name" type="string"/> 146 </event> 147 148 <event name="format"> 149 <arg name="format" type="uint"/> 150 </event> 151 152 <!-- Raised if the authenticate request succeeded --> 153 <event name="authenticated"/> 154 155 <enum name="capability" since="2"> 156 <description summary="wl_drm capability bitmask"> 157 Bitmask of capabilities. 158 </description> 159 <entry name="prime" value="1" summary="wl_drm prime available"/> 160 </enum> 161 162 <event name="capabilities"> 163 <arg name="value" type="uint"/> 164 </event> 165 166 <!-- Version 2 additions --> 167 168 <!-- Create a wayland buffer for the prime fd. Use for regular and planar 169 buffers. Pass 0 for offset and stride for unused planes. --> 170 <request name="create_prime_buffer" since="2"> 171 <arg name="id" type="new_id" interface="wl_buffer"/> 172 <arg name="name" type="fd"/> 173 <arg name="width" type="int"/> 174 <arg name="height" type="int"/> 175 <arg name="format" type="uint"/> 176 <arg name="offset0" type="int"/> 177 <arg name="stride0" type="int"/> 178 <arg name="offset1" type="int"/> 179 <arg name="stride1" type="int"/> 180 <arg name="offset2" type="int"/> 181 <arg name="stride2" type="int"/> 182 </request> 183 184 </interface> 185 186</protocol> 187