Commit 2cfa0bb2 authored by Sinclair Yeh's avatar Sinclair Yeh

drm/vmwgfx: Prepare to support fence fd

Make the fields and flags available.
Signed-off-by: default avatarSinclair Yeh <syeh@vmware.com>
Reviewed-by: default avatarDeepak Singh Rawat <drawat@vmware.com>
Reviewed-by: default avatarThomas Hellstrom <thellstrom@vmware.com>
parent 1f1a36cc
...@@ -4449,11 +4449,6 @@ int vmw_execbuf_ioctl(struct drm_device *dev, unsigned long data, ...@@ -4449,11 +4449,6 @@ int vmw_execbuf_ioctl(struct drm_device *dev, unsigned long data,
arg.context_handle = (uint32_t) -1; arg.context_handle = (uint32_t) -1;
break; break;
case 2: case 2:
if (arg.pad64 != 0) {
DRM_ERROR("Unused IOCTL data not set to zero.\n");
return -EINVAL;
}
break;
default: default:
break; break;
} }
......
...@@ -297,13 +297,17 @@ union drm_vmw_surface_reference_arg { ...@@ -297,13 +297,17 @@ union drm_vmw_surface_reference_arg {
* @version: Allows expanding the execbuf ioctl parameters without breaking * @version: Allows expanding the execbuf ioctl parameters without breaking
* backwards compatibility, since user-space will always tell the kernel * backwards compatibility, since user-space will always tell the kernel
* which version it uses. * 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. * Argument to the DRM_VMW_EXECBUF Ioctl.
*/ */
#define DRM_VMW_EXECBUF_VERSION 2 #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 { struct drm_vmw_execbuf_arg {
__u64 commands; __u64 commands;
__u32 command_size; __u32 command_size;
...@@ -312,7 +316,7 @@ struct drm_vmw_execbuf_arg { ...@@ -312,7 +316,7 @@ struct drm_vmw_execbuf_arg {
__u32 version; __u32 version;
__u32 flags; __u32 flags;
__u32 context_handle; __u32 context_handle;
__u32 pad64; __s32 imported_fence_fd;
}; };
/** /**
...@@ -328,6 +332,7 @@ struct drm_vmw_execbuf_arg { ...@@ -328,6 +332,7 @@ struct drm_vmw_execbuf_arg {
* @passed_seqno: The highest seqno number processed by the hardware * @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 * so far. This can be used to mark user-space fence objects as signaled, and
* to determine whether a fence seqno might be stale. * 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. * @error: This member should've been set to -EFAULT on submission.
* The following actions should be take on completion: * The following actions should be take on completion:
* error == -EFAULT: Fence communication failed. The host is synchronized. * error == -EFAULT: Fence communication failed. The host is synchronized.
...@@ -345,7 +350,7 @@ struct drm_vmw_fence_rep { ...@@ -345,7 +350,7 @@ struct drm_vmw_fence_rep {
__u32 mask; __u32 mask;
__u32 seqno; __u32 seqno;
__u32 passed_seqno; __u32 passed_seqno;
__u32 pad64; __s32 fd;
__s32 error; __s32 error;
}; };
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment