Forward DRM authentication to the upstream server.
[platform/adaptation/renesas_rcar/wayland-kms.git] / wayland-kms.xml
1 <?xml version="1.0" encoding="UTF-8"?>
2 <protocol name="kms">
3
4   <copyright>
5     Copyright © 2013 Renesas Solutions Corp.
6
7     Based on wayland-drm.xml:
8     Copyright © 2008-2011 Kristian Høgsberg
9     Copyright © 2010-2011 Intel Corporation
10
11     Permission to use, copy, modify, distribute, and sell this
12     software and its documentation for any purpose is hereby granted
13     without fee, provided that\n the above copyright notice appear in
14     all copies and that both that copyright notice and this permission
15     notice appear in supporting documentation, and that the name of
16     the copyright holders not be used in advertising or publicity
17     pertaining to distribution of the software without specific,
18     written prior permission.  The copyright holders make no
19     representations about the suitability of this software for any
20     purpose.  It is provided "as is" without express or implied
21     warranty.
22
23     THE COPYRIGHT HOLDERS DISCLAIM ALL WARRANTIES WITH REGARD TO THIS
24     SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND
25     FITNESS, IN NO EVENT SHALL THE COPYRIGHT HOLDERS BE LIABLE FOR ANY
26     SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
27     WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN
28     AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
29     ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF
30     THIS SOFTWARE.
31   </copyright>
32
33   <!-- KMS BO support. This object is created by the server and published
34        using the display's global event. -->
35   <interface name="wl_kms" version="1">
36     <enum name="error">
37       <entry name="invalid_format" value="0"/>
38       <entry name="invalid_fd" value="1"/>
39       <entry name="invalid_handle" value="2"/>
40       <entry name="authentication_failed" value="3"/>
41     </enum>
42
43     <enum name="format">
44       <!-- The drm format codes match the #defines in drm_fourcc.h.
45            The formats actually supported by the compositor will be
46            reported by the format event. -->
47       <entry name="c8" value="0x20203843"/>
48       <entry name="rgb332" value="0x38424752"/>
49       <entry name="bgr233" value="0x38524742"/>
50       <entry name="xrgb4444" value="0x32315258"/>
51       <entry name="xbgr4444" value="0x32314258"/>
52       <entry name="rgbx4444" value="0x32315852"/>
53       <entry name="bgrx4444" value="0x32315842"/>
54       <entry name="argb4444" value="0x32315241"/>
55       <entry name="abgr4444" value="0x32314241"/>
56       <entry name="rgba4444" value="0x32314152"/>
57       <entry name="bgra4444" value="0x32314142"/>
58       <entry name="xrgb1555" value="0x35315258"/>
59       <entry name="xbgr1555" value="0x35314258"/>
60       <entry name="rgbx5551" value="0x35315852"/>
61       <entry name="bgrx5551" value="0x35315842"/>
62       <entry name="argb1555" value="0x35315241"/>
63       <entry name="abgr1555" value="0x35314241"/>
64       <entry name="rgba5551" value="0x35314152"/>
65       <entry name="bgra5551" value="0x35314142"/>
66       <entry name="rgb565" value="0x36314752"/>
67       <entry name="bgr565" value="0x36314742"/>
68       <entry name="rgb888" value="0x34324752"/>
69       <entry name="bgr888" value="0x34324742"/>
70       <entry name="xrgb8888" value="0x34325258"/>
71       <entry name="xbgr8888" value="0x34324258"/>
72       <entry name="rgbx8888" value="0x34325852"/>
73       <entry name="bgrx8888" value="0x34325842"/>
74       <entry name="argb8888" value="0x34325241"/>
75       <entry name="abgr8888" value="0x34324241"/>
76       <entry name="rgba8888" value="0x34324152"/>
77       <entry name="bgra8888" value="0x34324142"/>
78       <entry name="xrgb2101010" value="0x30335258"/>
79       <entry name="xbgr2101010" value="0x30334258"/>
80       <entry name="rgbx1010102" value="0x30335852"/>
81       <entry name="bgrx1010102" value="0x30335842"/>
82       <entry name="argb2101010" value="0x30335241"/>
83       <entry name="abgr2101010" value="0x30334241"/>
84       <entry name="rgba1010102" value="0x30334152"/>
85       <entry name="bgra1010102" value="0x30334142"/>
86       <entry name="yuyv" value="0x56595559"/>
87       <entry name="yvyu" value="0x55595659"/>
88       <entry name="uyvy" value="0x59565955"/>
89       <entry name="vyuy" value="0x59555956"/>
90       <entry name="ayuv" value="0x56555941"/>
91       <entry name="nv12" value="0x3231564e"/>
92       <entry name="nv21" value="0x3132564e"/>
93       <entry name="nv16" value="0x3631564e"/>
94       <entry name="nv61" value="0x3136564e"/>
95       <entry name="yuv410" value="0x39565559"/>
96       <entry name="yvu410" value="0x39555659"/>
97       <entry name="yuv411" value="0x31315559"/>
98       <entry name="yvu411" value="0x31315659"/>
99       <entry name="yuv420" value="0x32315559"/>
100       <entry name="yvu420" value="0x32315659"/>
101       <entry name="yuv422" value="0x36315559"/>
102       <entry name="yvu422" value="0x36315659"/>
103       <entry name="yuv444" value="0x34325559"/>
104       <entry name="yvu444" value="0x34325659"/>
105     </enum>
106
107     <!-- DRM Authentication. Clients should send magic value
108          got with drmGetMagic(). -->
109     <request name="authenticate">
110       <arg name="magic" type="uint"/>
111     </request>
112
113     <!-- Create a wayland buffer for the KMS BO buffer.  The KMS
114          surface must have a prime FD. -->
115     <request name="create_buffer">
116       <arg name="id" type="new_id" interface="wl_buffer"/>
117       <arg name="fd" type="int"/>       <!-- KMS BO Prime FD -->
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       <arg name="handle" type="uint"/>  <!-- DevMem Export Handle -->
123     </request>
124
125     <!-- Notification of the path of the drm device which is used by
126          the server.  The client should use this device for creating
127          local buffers.  Only buffers created from this device should
128          be be passed to the server using this drm object's
129          create_buffer request. -->
130     <event name="device">
131       <arg name="name" type="string"/>
132     </event>
133
134     <event name="format">
135       <arg name="format" type="uint"/>
136     </event>
137
138     <!-- Sent if the authentication succeeded -->
139     <event name="authenticated"/>
140
141   </interface>
142
143 </protocol>