diff options
Diffstat (limited to 'libdrm/xf86drm.c')
-rw-r--r-- | libdrm/xf86drm.c | 35 |
1 files changed, 18 insertions, 17 deletions
diff --git a/libdrm/xf86drm.c b/libdrm/xf86drm.c index e0d20ee8..bee50824 100644 --- a/libdrm/xf86drm.c +++ b/libdrm/xf86drm.c @@ -2272,7 +2272,8 @@ int drmFenceCreate(int fd, unsigned flags, int class, unsigned type, arg.flags = flags; arg.type = type; arg.class = class; - if (ioctl(fd, DRM_IOCTL_FENCE_CREATE, &arg)) + arg.op = drm_fence_create; + if (ioctl(fd, DRM_IOCTL_FENCE, &arg)) return -errno; fence->handle = arg.handle; fence->class = arg.class; @@ -2294,8 +2295,8 @@ int drmFenceBuffers(int fd, unsigned flags, drmFence *fence) memset(&arg, 0, sizeof(arg)); arg.flags = flags; - - if (ioctl(fd, DRM_IOCTL_FENCE_BUFFERS, &arg)) + arg.op = drm_fence_buffers; + if (ioctl(fd, DRM_IOCTL_FENCE, &arg)) return -errno; fence->handle = arg.handle; fence->class = arg.class; @@ -2311,8 +2312,8 @@ int drmFenceDestroy(int fd, const drmFence *fence) memset(&arg, 0, sizeof(arg)); arg.handle = fence->handle; - - if (ioctl(fd, DRM_IOCTL_FENCE_DESTROY, &arg)) + arg.op = drm_fence_destroy; + if (ioctl(fd, DRM_IOCTL_FENCE, &arg)) return -errno; return 0; } @@ -2323,8 +2324,8 @@ int drmFenceReference(int fd, unsigned handle, drmFence *fence) memset(&arg, 0, sizeof(arg)); arg.handle = handle; - - if (ioctl(fd, DRM_IOCTL_FENCE_REFERENCE, &arg)) + arg.op = drm_fence_reference; + if (ioctl(fd, DRM_IOCTL_FENCE, &arg)) return -errno; fence->handle = arg.handle; fence->class = arg.class; @@ -2340,8 +2341,8 @@ int drmFenceUnreference(int fd, const drmFence *fence) memset(&arg, 0, sizeof(arg)); arg.handle = fence->handle; - - if (ioctl(fd, DRM_IOCTL_FENCE_UNREFERENCE, &arg)) + arg.op = drm_fence_unreference; + if (ioctl(fd, DRM_IOCTL_FENCE, &arg)) return -errno; return 0; } @@ -2353,8 +2354,8 @@ int drmFenceFlush(int fd, drmFence *fence, unsigned flush_type) memset(&arg, 0, sizeof(arg)); arg.handle = fence->handle; arg.type = flush_type; - - if (ioctl(fd, DRM_IOCTL_FENCE_FLUSH, &arg)) + arg.op = drm_fence_flush; + if (ioctl(fd, DRM_IOCTL_FENCE, &arg)) return -errno; fence->class = arg.class; fence->type = arg.type; @@ -2368,8 +2369,8 @@ int drmFenceUpdate(int fd, drmFence *fence) memset(&arg, 0, sizeof(arg)); arg.handle = fence->handle; - - if (ioctl(fd, DRM_IOCTL_FENCE_SIGNALED, &arg)) + arg.op = drm_fence_signaled; + if (ioctl(fd, DRM_IOCTL_FENCE, &arg)) return -errno; fence->class = arg.class; fence->type = arg.type; @@ -2412,8 +2413,8 @@ int drmFenceEmit(int fd, unsigned flags, drmFence *fence, unsigned emit_type) arg.flags = flags; arg.handle = fence->handle; arg.type = emit_type; - - if (ioctl(fd, DRM_IOCTL_FENCE_EMIT, &arg)) + arg.op = drm_fence_emit; + if (ioctl(fd, DRM_IOCTL_FENCE, &arg)) return -errno; fence->class = arg.class; fence->type = arg.type; @@ -2446,9 +2447,9 @@ int drmFenceWait(int fd, unsigned flags, drmFence *fence, unsigned flush_type) arg.handle = fence->handle; arg.type = flush_type; arg.flags = flags; - + arg.op = drm_fence_wait; do { - ret = ioctl(fd, DRM_IOCTL_FENCE_WAIT, &arg); + ret = ioctl(fd, DRM_IOCTL_FENCE, &arg); } while (ret != 0 && errno == EAGAIN); if (ret) |