Mesa (master): winsys/svga/drm: Prepare to support fence fd

Brian Paul brianp at kemper.freedesktop.org
Mon Jul 17 16:08:47 UTC 2017


Module: Mesa
Branch: master
Commit: 2431cccad1ec8d3fd75f2aec657ce1e57a194ab3
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=2431cccad1ec8d3fd75f2aec657ce1e57a194ab3

Author: Sinclair Yeh <syeh at vmware.com>
Date:   Mon May 15 15:25:31 2017 -0700

winsys/svga/drm: Prepare to support fence fd

Make the fields and flags available.

Reviewed-by: Brian Paul <brianp at vmware.com>
Reviewed-by: Charmaine Lee <charmainel at vmware.com>

---

 src/gallium/winsys/svga/drm/vmwgfx_drm.h | 11 ++++++++---
 1 file changed, 8 insertions(+), 3 deletions(-)

diff --git a/src/gallium/winsys/svga/drm/vmwgfx_drm.h b/src/gallium/winsys/svga/drm/vmwgfx_drm.h
index 807ec901ad..13d779494f 100644
--- a/src/gallium/winsys/svga/drm/vmwgfx_drm.h
+++ b/src/gallium/winsys/svga/drm/vmwgfx_drm.h
@@ -294,13 +294,17 @@ union drm_vmw_surface_reference_arg {
  * @version: Allows expanding the execbuf ioctl parameters without breaking
  * backwards compatibility, since user-space will always tell the kernel
  * which version it uses.
- * @flags: Execbuf flags. None currently.
+ * @flags: Execbuf flags.
+ * @imported_fence_fd:  FD for a fence imported from another device
  *
  * Argument to the DRM_VMW_EXECBUF Ioctl.
  */
 
 #define DRM_VMW_EXECBUF_VERSION 2
 
+#define DRM_VMW_EXECBUF_FLAG_IMPORT_FENCE_FD (1 << 0)
+#define DRM_VMW_EXECBUF_FLAG_EXPORT_FENCE_FD (1 << 1)
+
 struct drm_vmw_execbuf_arg {
 	uint64_t commands;
 	uint32_t command_size;
@@ -309,7 +313,7 @@ struct drm_vmw_execbuf_arg {
 	uint32_t version;
 	uint32_t flags;
 	uint32_t context_handle;
-	uint32_t pad64;
+	int32_t imported_fence_fd;
 };
 
 /**
@@ -325,6 +329,7 @@ struct drm_vmw_execbuf_arg {
  * @passed_seqno: The highest seqno number processed by the hardware
  * so far. This can be used to mark user-space fence objects as signaled, and
  * to determine whether a fence seqno might be stale.
+ * @fd: FD associated with the fence, -1 if not exported
  * @error: This member should've been set to -EFAULT on submission.
  * The following actions should be take on completion:
  * error == -EFAULT: Fence communication failed. The host is synchronized.
@@ -342,7 +347,7 @@ struct drm_vmw_fence_rep {
 	uint32_t mask;
 	uint32_t seqno;
 	uint32_t passed_seqno;
-	uint32_t pad64;
+	int32_t fd;
 	int32_t error;
 };
 




More information about the mesa-commit mailing list