wayland-drm.xml 7.8 KB

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