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
44494449 arg.context_handle = (uint32_t) -1;
44504450 break;
44514451 case 2:
4452− if (arg.pad64 != 0) {
4453− DRM_ERROR("Unused IOCTL data not set to zero.\n");
4454− return -EINVAL;
4455− }
4456− break;
44574452 default:
44584453 break;
44594454 }
include/uapi/drm/vmwgfx_drm.h+8−3
@@ -297,13 +297,17 @@ union drm_vmw_surface_reference_arg { · 296 unmodified lines
297297 * @version: Allows expanding the execbuf ioctl parameters without breaking
298298 * backwards compatibility, since user-space will always tell the kernel
299299 * 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
301302 *
302303 * Argument to the DRM_VMW_EXECBUF Ioctl.
303304 */
304305
305306 #define DRM_VMW_EXECBUF_VERSION 2
306307
308+#define DRM_VMW_EXECBUF_FLAG_IMPORT_FENCE_FD (1 << 0)
309+#define DRM_VMW_EXECBUF_FLAG_EXPORT_FENCE_FD (1 << 1)
310+
307311 struct drm_vmw_execbuf_arg {
308312 __u64 commands;
309313 __u32 command_size;
@@ -312,7 +316,7 @@ struct drm_vmw_execbuf_arg { · 2 unmodified lines
312316 __u32 version;
313317 __u32 flags;
314318 __u32 context_handle;
315− __u32 pad64;
319+ __s32 imported_fence_fd;
316320 };
317321
318322 /**
@@ -328,6 +332,7 @@ struct drm_vmw_execbuf_arg { · 9 unmodified lines
328332 * @passed_seqno: The highest seqno number processed by the hardware
329333 * so far. This can be used to mark user-space fence objects as signaled, and
330334 * to determine whether a fence seqno might be stale.
335+ * @fd: FD associated with the fence, -1 if not exported
331336 * @error: This member should've been set to -EFAULT on submission.
332337 * The following actions should be take on completion:
333338 * error == -EFAULT: Fence communication failed. The host is synchronized.
@@ -345,7 +350,7 @@ struct drm_vmw_fence_rep { · 11 unmodified lines
345350 __u32 mask;
346351 __u32 seqno;
347352 __u32 passed_seqno;
348− __u32 pad64;
353+ __s32 fd;
349354 __s32 error;
350355 };
351356

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