Commit ee6ad137 authored by Janga Rahul Kumar's avatar Janga Rahul Kumar Committed by Rodrigo Vivi

drm/Xe: Use EOPNOTSUPP instead of ENOTSUPP

ENOTSUPP is not a standard Unix error should use
EOPNOTSUPP instead.

v2: Update commit description (Aravind)
Reviewed-by: default avatarAravind Iddamsetty <aravind.iddamsetty@intel.com>
Signed-off-by: default avatarJanga Rahul Kumar <janga.rahul.kumar@intel.com>
Signed-off-by: default avatarRodrigo Vivi <rodrigo.vivi@intel.com>
parent ab10e976
...@@ -612,7 +612,7 @@ int xe_engine_create_ioctl(struct drm_device *dev, void *data, ...@@ -612,7 +612,7 @@ int xe_engine_create_ioctl(struct drm_device *dev, void *data,
if (XE_IOCTL_ERR(xe, e->vm && xe_vm_in_compute_mode(e->vm) != if (XE_IOCTL_ERR(xe, e->vm && xe_vm_in_compute_mode(e->vm) !=
!!(e->flags & ENGINE_FLAG_COMPUTE_MODE))) { !!(e->flags & ENGINE_FLAG_COMPUTE_MODE))) {
err = -ENOTSUPP; err = -EOPNOTSUPP;
goto put_engine; goto put_engine;
} }
......
...@@ -495,7 +495,7 @@ int xe_mmio_ioctl(struct drm_device *dev, void *data, ...@@ -495,7 +495,7 @@ int xe_mmio_ioctl(struct drm_device *dev, void *data,
fallthrough; fallthrough;
case DRM_XE_MMIO_8BIT: /* TODO */ case DRM_XE_MMIO_8BIT: /* TODO */
case DRM_XE_MMIO_16BIT: /* TODO */ case DRM_XE_MMIO_16BIT: /* TODO */
ret = -ENOTSUPP; ret = -EOPNOTSUPP;
goto exit; goto exit;
} }
} }
...@@ -513,7 +513,7 @@ int xe_mmio_ioctl(struct drm_device *dev, void *data, ...@@ -513,7 +513,7 @@ int xe_mmio_ioctl(struct drm_device *dev, void *data,
fallthrough; fallthrough;
case DRM_XE_MMIO_8BIT: /* TODO */ case DRM_XE_MMIO_8BIT: /* TODO */
case DRM_XE_MMIO_16BIT: /* TODO */ case DRM_XE_MMIO_16BIT: /* TODO */
ret = -ENOTSUPP; ret = -EOPNOTSUPP;
} }
} }
......
...@@ -120,7 +120,7 @@ int xe_sync_entry_parse(struct xe_device *xe, struct xe_file *xef, ...@@ -120,7 +120,7 @@ int xe_sync_entry_parse(struct xe_device *xe, struct xe_file *xef,
switch (sync_in.flags & SYNC_FLAGS_TYPE_MASK) { switch (sync_in.flags & SYNC_FLAGS_TYPE_MASK) {
case DRM_XE_SYNC_SYNCOBJ: case DRM_XE_SYNC_SYNCOBJ:
if (XE_IOCTL_ERR(xe, no_dma_fences && signal)) if (XE_IOCTL_ERR(xe, no_dma_fences && signal))
return -ENOTSUPP; return -EOPNOTSUPP;
if (XE_IOCTL_ERR(xe, upper_32_bits(sync_in.addr))) if (XE_IOCTL_ERR(xe, upper_32_bits(sync_in.addr)))
return -EINVAL; return -EINVAL;
...@@ -138,7 +138,7 @@ int xe_sync_entry_parse(struct xe_device *xe, struct xe_file *xef, ...@@ -138,7 +138,7 @@ int xe_sync_entry_parse(struct xe_device *xe, struct xe_file *xef,
case DRM_XE_SYNC_TIMELINE_SYNCOBJ: case DRM_XE_SYNC_TIMELINE_SYNCOBJ:
if (XE_IOCTL_ERR(xe, no_dma_fences && signal)) if (XE_IOCTL_ERR(xe, no_dma_fences && signal))
return -ENOTSUPP; return -EOPNOTSUPP;
if (XE_IOCTL_ERR(xe, upper_32_bits(sync_in.addr))) if (XE_IOCTL_ERR(xe, upper_32_bits(sync_in.addr)))
return -EINVAL; return -EINVAL;
...@@ -173,7 +173,7 @@ int xe_sync_entry_parse(struct xe_device *xe, struct xe_file *xef, ...@@ -173,7 +173,7 @@ int xe_sync_entry_parse(struct xe_device *xe, struct xe_file *xef,
case DRM_XE_SYNC_USER_FENCE: case DRM_XE_SYNC_USER_FENCE:
if (XE_IOCTL_ERR(xe, !signal)) if (XE_IOCTL_ERR(xe, !signal))
return -ENOTSUPP; return -EOPNOTSUPP;
if (XE_IOCTL_ERR(xe, sync_in.addr & 0x7)) if (XE_IOCTL_ERR(xe, sync_in.addr & 0x7))
return -EINVAL; return -EINVAL;
......
...@@ -1819,10 +1819,10 @@ static int vm_set_error_capture_address(struct xe_device *xe, struct xe_vm *vm, ...@@ -1819,10 +1819,10 @@ static int vm_set_error_capture_address(struct xe_device *xe, struct xe_vm *vm,
return -EINVAL; return -EINVAL;
if (XE_IOCTL_ERR(xe, !(vm->flags & XE_VM_FLAG_ASYNC_BIND_OPS))) if (XE_IOCTL_ERR(xe, !(vm->flags & XE_VM_FLAG_ASYNC_BIND_OPS)))
return -ENOTSUPP; return -EOPNOTSUPP;
if (XE_IOCTL_ERR(xe, vm->async_ops.error_capture.addr)) if (XE_IOCTL_ERR(xe, vm->async_ops.error_capture.addr))
return -ENOTSUPP; return -EOPNOTSUPP;
vm->async_ops.error_capture.mm = current->mm; vm->async_ops.error_capture.mm = current->mm;
vm->async_ops.error_capture.addr = value; vm->async_ops.error_capture.addr = value;
...@@ -3072,7 +3072,7 @@ int xe_vm_bind_ioctl(struct drm_device *dev, void *data, struct drm_file *file) ...@@ -3072,7 +3072,7 @@ int xe_vm_bind_ioctl(struct drm_device *dev, void *data, struct drm_file *file)
if (VM_BIND_OP(bind_ops[0].op) == XE_VM_BIND_OP_RESTART) { if (VM_BIND_OP(bind_ops[0].op) == XE_VM_BIND_OP_RESTART) {
if (XE_IOCTL_ERR(xe, !(vm->flags & XE_VM_FLAG_ASYNC_BIND_OPS))) if (XE_IOCTL_ERR(xe, !(vm->flags & XE_VM_FLAG_ASYNC_BIND_OPS)))
err = -ENOTSUPP; err = -EOPNOTSUPP;
if (XE_IOCTL_ERR(xe, !err && args->num_syncs)) if (XE_IOCTL_ERR(xe, !err && args->num_syncs))
err = EINVAL; err = EINVAL;
if (XE_IOCTL_ERR(xe, !err && !vm->async_ops.error)) if (XE_IOCTL_ERR(xe, !err && !vm->async_ops.error))
...@@ -3096,7 +3096,7 @@ int xe_vm_bind_ioctl(struct drm_device *dev, void *data, struct drm_file *file) ...@@ -3096,7 +3096,7 @@ int xe_vm_bind_ioctl(struct drm_device *dev, void *data, struct drm_file *file)
if (XE_IOCTL_ERR(xe, !vm->async_ops.error && if (XE_IOCTL_ERR(xe, !vm->async_ops.error &&
async != !!(vm->flags & XE_VM_FLAG_ASYNC_BIND_OPS))) { async != !!(vm->flags & XE_VM_FLAG_ASYNC_BIND_OPS))) {
err = -ENOTSUPP; err = -EOPNOTSUPP;
goto put_engine; goto put_engine;
} }
......
...@@ -143,7 +143,7 @@ int xe_wait_user_fence_ioctl(struct drm_device *dev, void *data, ...@@ -143,7 +143,7 @@ int xe_wait_user_fence_ioctl(struct drm_device *dev, void *data,
if (XE_IOCTL_ERR(xe, !vm->async_ops.error_capture.addr)) { if (XE_IOCTL_ERR(xe, !vm->async_ops.error_capture.addr)) {
xe_vm_put(vm); xe_vm_put(vm);
return -ENOTSUPP; return -EOPNOTSUPP;
} }
addr = vm->async_ops.error_capture.addr; addr = vm->async_ops.error_capture.addr;
......
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