From d8719fb8b2d999c3de64def3a801778021c71f84 Mon Sep 17 00:00:00 2001 From: "Xiang, Haihao" Date: Tue, 19 Jul 2016 10:26:41 +0800 Subject: New wayland-drm.xml Update wayland-drm-client-protocol.h as well Signed-off-by: Xiang, Haihao --- va/wayland/wayland-drm-client-protocol.h | 42 +++++++++++++++++++++++++++++++- va/wayland/wayland-drm.xml | 32 +++++++++++++++++++++++- 2 files changed, 72 insertions(+), 2 deletions(-) (limited to 'va/wayland') 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 *
  *
@@ -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 @@
 
   
-  
+  
     
       
       
@@ -150,6 +150,36 @@
 
     
     
+
+    
+      
+        Bitmask of capabilities.
+      
+      
+    
+
+    
+      
+    
+
+    
+
+    
+    
+      
+      
+      
+      
+      
+      
+      
+      
+      
+      
+      
+    
+
   
 
 
-- 
cgit v1.2.1