summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorXiang, Haihao <haihao.xiang@intel.com>2016-07-19 10:26:41 +0800
committerXiang, Haihao <haihao.xiang@intel.com>2016-09-19 14:03:24 +0800
commitd8719fb8b2d999c3de64def3a801778021c71f84 (patch)
tree882611159bd5e7dc6df3171e00ad4bd635b9d29e
parent2ea2088b5dc315a2331503bd9827623f4552f8c9 (diff)
New wayland-drm.xml
Update wayland-drm-client-protocol.h as well Signed-off-by: Xiang, Haihao <haihao.xiang@intel.com>
-rw-r--r--va/wayland/wayland-drm-client-protocol.h42
-rw-r--r--va/wayland/wayland-drm.xml32
2 files changed, 72 insertions, 2 deletions
diff --git a/va/wayland/wayland-drm-client-protocol.h b/va/wayland/wayland-drm-client-protocol.h
index 7f2789b..da267e8 100644
--- a/va/wayland/wayland-drm-client-protocol.h
+++ b/va/wayland/wayland-drm-client-protocol.h
@@ -14,7 +14,7 @@ extern "C" {
/**
* @page page_drm The drm protocol
* @section page_ifaces_drm Interfaces
- * - @subpage page_iface_wl_drm -
+ * - @subpage page_iface_wl_drm -
* @section page_copyright_drm Copyright
* <pre>
*
@@ -129,6 +129,22 @@ enum wl_drm_format {
};
#endif /* WL_DRM_FORMAT_ENUM */
+#ifndef WL_DRM_CAPABILITY_ENUM
+#define WL_DRM_CAPABILITY_ENUM
+/**
+ * @ingroup iface_wl_drm
+ * wl_drm capability bitmask
+ *
+ * Bitmask of capabilities.
+ */
+enum wl_drm_capability {
+ /**
+ * wl_drm prime available
+ */
+ WL_DRM_CAPABILITY_PRIME = 1,
+};
+#endif /* WL_DRM_CAPABILITY_ENUM */
+
/**
* @ingroup iface_wl_drm
* @struct wl_drm_listener
@@ -148,6 +164,11 @@ struct wl_drm_listener {
*/
void (*authenticated)(void *data,
struct wl_drm *wl_drm);
+ /**
+ */
+ void (*capabilities)(void *data,
+ struct wl_drm *wl_drm,
+ uint32_t value);
};
/**
@@ -164,6 +185,7 @@ wl_drm_add_listener(struct wl_drm *wl_drm,
#define WL_DRM_AUTHENTICATE 0
#define WL_DRM_CREATE_BUFFER 1
#define WL_DRM_CREATE_PLANAR_BUFFER 2
+#define WL_DRM_CREATE_PRIME_BUFFER 3
/**
* @ingroup iface_wl_drm
@@ -177,6 +199,10 @@ wl_drm_add_listener(struct wl_drm *wl_drm,
* @ingroup iface_wl_drm
*/
#define WL_DRM_CREATE_PLANAR_BUFFER_SINCE_VERSION 1
+/**
+ * @ingroup iface_wl_drm
+ */
+#define WL_DRM_CREATE_PRIME_BUFFER_SINCE_VERSION 2
/** @ingroup iface_wl_drm */
static inline void
@@ -243,6 +269,20 @@ wl_drm_create_planar_buffer(struct wl_drm *wl_drm, uint32_t name, int32_t width,
return (struct wl_buffer *) id;
}
+/**
+ * @ingroup iface_wl_drm
+ */
+static inline struct wl_buffer *
+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)
+{
+ struct wl_proxy *id;
+
+ id = wl_proxy_marshal_constructor((struct wl_proxy *) wl_drm,
+ WL_DRM_CREATE_PRIME_BUFFER, &wl_buffer_interface, NULL, name, width, height, format, offset0, stride0, offset1, stride1, offset2, stride2);
+
+ return (struct wl_buffer *) id;
+}
+
#ifdef __cplusplus
}
#endif
diff --git a/va/wayland/wayland-drm.xml b/va/wayland/wayland-drm.xml
index 265d4f8..5e64622 100644
--- a/va/wayland/wayland-drm.xml
+++ b/va/wayland/wayland-drm.xml
@@ -29,7 +29,7 @@
<!-- drm support. This object is created by the server and published
using the display's global event. -->
- <interface name="wl_drm" version="1">
+ <interface name="wl_drm" version="2">
<enum name="error">
<entry name="authenticate_fail" value="0"/>
<entry name="invalid_format" value="1"/>
@@ -150,6 +150,36 @@
<!-- Raised if the authenticate request succeeded -->
<event name="authenticated"/>
+
+ <enum name="capability" since="2">
+ <description summary="wl_drm capability bitmask">
+ Bitmask of capabilities.
+ </description>
+ <entry name="prime" value="1" summary="wl_drm prime available"/>
+ </enum>
+
+ <event name="capabilities">
+ <arg name="value" type="uint"/>
+ </event>
+
+ <!-- Version 2 additions -->
+
+ <!-- Create a wayland buffer for the prime fd. Use for regular and planar
+ buffers. Pass 0 for offset and stride for unused planes. -->
+ <request name="create_prime_buffer" since="2">
+ <arg name="id" type="new_id" interface="wl_buffer"/>
+ <arg name="name" type="fd"/>
+ <arg name="width" type="int"/>
+ <arg name="height" type="int"/>
+ <arg name="format" type="uint"/>
+ <arg name="offset0" type="int"/>
+ <arg name="stride0" type="int"/>
+ <arg name="offset1" type="int"/>
+ <arg name="stride1" type="int"/>
+ <arg name="offset2" type="int"/>
+ <arg name="stride2" type="int"/>
+ </request>
+
</interface>
</protocol>