History

drm/vmwgfx: Prepare to support fence fd

Make the fields and flags available.

Sinclair Yeh committed 9 years ago

Commit 2cfa0bb1 parent 1f1a36c2 files · +8 −8Browse files

Unified · Split

2 files
  1. drivers/gpu/drm/vmwgfx/vmwgfx_execbuf.c +0 −5
  2. include/uapi/drm/vmwgfx_drm.h +8 −3
drivers/gpu/drm/vmwgfx/vmwgfx_execbuf.c+0−5
@@ -4449,11 +4449,6 @@ int vmw_execbuf_ioctl(struct drm_device *dev, unsigned long data, · 4448 unmodified lines
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 }
include/uapi/drm/vmwgfx_drm.h+8−3
@@ -297,13 +297,17 @@ union drm_vmw_surface_reference_arg { · 296 unmodified lines
297 * @version: Allows expanding the execbuf ioctl parameters without breaking297 * @version: Allows expanding the execbuf ioctl parameters without breaking
298 * backwards compatibility, since user-space will always tell the kernel298 * 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 2306#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
307struct drm_vmw_execbuf_arg {311struct 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 { · 2 unmodified lines
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 { · 9 unmodified lines
328 * @passed_seqno: The highest seqno number processed by the hardware332 * @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, and333 * 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 { · 11 unmodified lines
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

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t