diff options
author | Sinclair Yeh <syeh@vmware.com> | 2017-07-05 04:37:55 -0400 |
---|---|---|
committer | Sinclair Yeh <syeh@vmware.com> | 2017-08-28 11:51:28 -0400 |
commit | 2cfa0bb25d25aa183ea29f1f9c2bc65f3f2c2264 (patch) | |
tree | 5780aaf17088d412ed5b6c0f5cd5b263b25bc4d4 | |
parent | 1f1a36cc4d4986a800018f1d3eed94a4e92a576f (diff) |
drm/vmwgfx: Prepare to support fence fd
Make the fields and flags available.
Signed-off-by: Sinclair Yeh <syeh@vmware.com>
Reviewed-by: Deepak Singh Rawat <drawat@vmware.com>
Reviewed-by: Thomas Hellstrom <thellstrom@vmware.com>
-rw-r--r-- | drivers/gpu/drm/vmwgfx/vmwgfx_execbuf.c | 5 | ||||
-rw-r--r-- | include/uapi/drm/vmwgfx_drm.h | 11 |
2 files changed, 8 insertions, 8 deletions
diff --git a/drivers/gpu/drm/vmwgfx/vmwgfx_execbuf.c b/drivers/gpu/drm/vmwgfx/vmwgfx_execbuf.c index 8c583fd16c79..178dabcdb198 100644 --- a/drivers/gpu/drm/vmwgfx/vmwgfx_execbuf.c +++ b/drivers/gpu/drm/vmwgfx/vmwgfx_execbuf.c | |||
@@ -4449,11 +4449,6 @@ int vmw_execbuf_ioctl(struct drm_device *dev, unsigned long data, | |||
4449 | arg.context_handle = (uint32_t) -1; | 4449 | arg.context_handle = (uint32_t) -1; |
4450 | break; | 4450 | break; |
4451 | case 2: | 4451 | case 2: |
4452 | if (arg.pad64 != 0) { | ||
4453 | DRM_ERROR("Unused IOCTL data not set to zero.\n"); | ||
4454 | return -EINVAL; | ||
4455 | } | ||
4456 | break; | ||
4457 | default: | 4452 | default: |
4458 | break; | 4453 | break; |
4459 | } | 4454 | } |
diff --git a/include/uapi/drm/vmwgfx_drm.h b/include/uapi/drm/vmwgfx_drm.h index d9dfde9aa757..0bc784f5e0db 100644 --- a/include/uapi/drm/vmwgfx_drm.h +++ b/include/uapi/drm/vmwgfx_drm.h | |||
@@ -297,13 +297,17 @@ union drm_vmw_surface_reference_arg { | |||
297 | * @version: Allows expanding the execbuf ioctl parameters without breaking | 297 | * @version: Allows expanding the execbuf ioctl parameters without breaking |
298 | * backwards compatibility, since user-space will always tell the kernel | 298 | * backwards compatibility, since user-space will always tell the kernel |
299 | * which version it uses. | 299 | * which version it uses. |
300 | * @flags: Execbuf flags. None currently. | 300 | * @flags: Execbuf flags. |
301 | * @imported_fence_fd: FD for a fence imported from another device | ||
301 | * | 302 | * |
302 | * Argument to the DRM_VMW_EXECBUF Ioctl. | 303 | * Argument to the DRM_VMW_EXECBUF Ioctl. |
303 | */ | 304 | */ |
304 | 305 | ||
305 | #define DRM_VMW_EXECBUF_VERSION 2 | 306 | #define DRM_VMW_EXECBUF_VERSION 2 |
306 | 307 | ||
308 | #define DRM_VMW_EXECBUF_FLAG_IMPORT_FENCE_FD (1 << 0) | ||
309 | #define DRM_VMW_EXECBUF_FLAG_EXPORT_FENCE_FD (1 << 1) | ||
310 | |||
307 | struct drm_vmw_execbuf_arg { | 311 | struct drm_vmw_execbuf_arg { |
308 | __u64 commands; | 312 | __u64 commands; |
309 | __u32 command_size; | 313 | __u32 command_size; |
@@ -312,7 +316,7 @@ struct drm_vmw_execbuf_arg { | |||
312 | __u32 version; | 316 | __u32 version; |
313 | __u32 flags; | 317 | __u32 flags; |
314 | __u32 context_handle; | 318 | __u32 context_handle; |
315 | __u32 pad64; | 319 | __s32 imported_fence_fd; |
316 | }; | 320 | }; |
317 | 321 | ||
318 | /** | 322 | /** |
@@ -328,6 +332,7 @@ struct drm_vmw_execbuf_arg { | |||
328 | * @passed_seqno: The highest seqno number processed by the hardware | 332 | * @passed_seqno: The highest seqno number processed by the hardware |
329 | * so far. This can be used to mark user-space fence objects as signaled, and | 333 | * so far. This can be used to mark user-space fence objects as signaled, and |
330 | * to determine whether a fence seqno might be stale. | 334 | * to determine whether a fence seqno might be stale. |
335 | * @fd: FD associated with the fence, -1 if not exported | ||
331 | * @error: This member should've been set to -EFAULT on submission. | 336 | * @error: This member should've been set to -EFAULT on submission. |
332 | * The following actions should be take on completion: | 337 | * The following actions should be take on completion: |
333 | * error == -EFAULT: Fence communication failed. The host is synchronized. | 338 | * error == -EFAULT: Fence communication failed. The host is synchronized. |
@@ -345,7 +350,7 @@ struct drm_vmw_fence_rep { | |||
345 | __u32 mask; | 350 | __u32 mask; |
346 | __u32 seqno; | 351 | __u32 seqno; |
347 | __u32 passed_seqno; | 352 | __u32 passed_seqno; |
348 | __u32 pad64; | 353 | __s32 fd; |
349 | __s32 error; | 354 | __s32 error; |
350 | }; | 355 | }; |
351 | 356 | ||