• R/O
  • HTTP
  • SSH
  • HTTPS

Commit

Tags
No Tags

Frequently used words (click to add to your profile)

javac++androidlinuxc#windowsobjective-ccocoa誰得qtpythonphprubygameguibathyscaphec計画中(planning stage)翻訳omegatframeworktwitterdomtestvb.netdirectxゲームエンジンbtronarduinopreviewer

hardware/intel/common/libva


Commit MetaInfo

Revision91359d182e2dcadf76d0cf9b5c801887819c9af0 (tree)
Time2016-10-31 10:42:26
AuthorXiang, Haihao <haihao.xiang@inte...>
CommiterXiang, Haihao

Log Message

New wayland-drm.xml

Update wayland-drm-client-protocol.h as well

Signed-off-by: Xiang, Haihao <haihao.xiang@intel.com>
(cherry picked from commit d8719fb8b2d999c3de64def3a801778021c71f84)

Change Summary

Incremental Difference

--- a/va/wayland/wayland-drm-client-protocol.h
+++ b/va/wayland/wayland-drm-client-protocol.h
@@ -14,7 +14,7 @@ extern "C" {
1414 /**
1515 * @page page_drm The drm protocol
1616 * @section page_ifaces_drm Interfaces
17- * - @subpage page_iface_wl_drm -
17+ * - @subpage page_iface_wl_drm -
1818 * @section page_copyright_drm Copyright
1919 * <pre>
2020 *
@@ -129,6 +129,22 @@ enum wl_drm_format {
129129 };
130130 #endif /* WL_DRM_FORMAT_ENUM */
131131
132+#ifndef WL_DRM_CAPABILITY_ENUM
133+#define WL_DRM_CAPABILITY_ENUM
134+/**
135+ * @ingroup iface_wl_drm
136+ * wl_drm capability bitmask
137+ *
138+ * Bitmask of capabilities.
139+ */
140+enum wl_drm_capability {
141+ /**
142+ * wl_drm prime available
143+ */
144+ WL_DRM_CAPABILITY_PRIME = 1,
145+};
146+#endif /* WL_DRM_CAPABILITY_ENUM */
147+
132148 /**
133149 * @ingroup iface_wl_drm
134150 * @struct wl_drm_listener
@@ -148,6 +164,11 @@ struct wl_drm_listener {
148164 */
149165 void (*authenticated)(void *data,
150166 struct wl_drm *wl_drm);
167+ /**
168+ */
169+ void (*capabilities)(void *data,
170+ struct wl_drm *wl_drm,
171+ uint32_t value);
151172 };
152173
153174 /**
@@ -164,6 +185,7 @@ wl_drm_add_listener(struct wl_drm *wl_drm,
164185 #define WL_DRM_AUTHENTICATE 0
165186 #define WL_DRM_CREATE_BUFFER 1
166187 #define WL_DRM_CREATE_PLANAR_BUFFER 2
188+#define WL_DRM_CREATE_PRIME_BUFFER 3
167189
168190 /**
169191 * @ingroup iface_wl_drm
@@ -177,6 +199,10 @@ wl_drm_add_listener(struct wl_drm *wl_drm,
177199 * @ingroup iface_wl_drm
178200 */
179201 #define WL_DRM_CREATE_PLANAR_BUFFER_SINCE_VERSION 1
202+/**
203+ * @ingroup iface_wl_drm
204+ */
205+#define WL_DRM_CREATE_PRIME_BUFFER_SINCE_VERSION 2
180206
181207 /** @ingroup iface_wl_drm */
182208 static inline void
@@ -243,6 +269,20 @@ wl_drm_create_planar_buffer(struct wl_drm *wl_drm, uint32_t name, int32_t width,
243269 return (struct wl_buffer *) id;
244270 }
245271
272+/**
273+ * @ingroup iface_wl_drm
274+ */
275+static inline struct wl_buffer *
276+wl_drm_create_prime_buffer(struct wl_drm *wl_drm, int32_t name, int32_t width, int32_t height, uint32_t format, int32_t offset0, int32_t stride0, int32_t offset1, int32_t stride1, int32_t offset2, int32_t stride2)
277+{
278+ struct wl_proxy *id;
279+
280+ id = wl_proxy_marshal_constructor((struct wl_proxy *) wl_drm,
281+ WL_DRM_CREATE_PRIME_BUFFER, &wl_buffer_interface, NULL, name, width, height, format, offset0, stride0, offset1, stride1, offset2, stride2);
282+
283+ return (struct wl_buffer *) id;
284+}
285+
246286 #ifdef __cplusplus
247287 }
248288 #endif
--- a/va/wayland/wayland-drm.xml
+++ b/va/wayland/wayland-drm.xml
@@ -29,7 +29,7 @@
2929
3030 <!-- drm support. This object is created by the server and published
3131 using the display's global event. -->
32- <interface name="wl_drm" version="1">
32+ <interface name="wl_drm" version="2">
3333 <enum name="error">
3434 <entry name="authenticate_fail" value="0"/>
3535 <entry name="invalid_format" value="1"/>
@@ -150,6 +150,36 @@
150150
151151 <!-- Raised if the authenticate request succeeded -->
152152 <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+
153183 </interface>
154184
155185 </protocol>