Commit 69fdf420 authored by Chris Wilson's avatar Chris Wilson

drm: Differentiate the lack of an interface from invalid parameter

If the ioctl is not supported on a particular piece of HW/driver
combination, report ENOTSUP (aka EOPNOTSUPP) so that it can be easily
distinguished from both the lack of the ioctl and from a regular invalid
parameter.

v2: Across all the kms ioctls we had a mixture of reporting EINVAL,
ENODEV and a few ENOTSUPP (most where EINVAL) for a failed
drm_core_check_feature(). Update everybody to report ENOTSUPP.

v3: ENOTSUPP is an internal errno! It's value (524) does not correspond
to a POSIX errno, the one we want is ENOTSUP. However,
uapi/asm-generic/errno.h doesn't include ENOTSUP but man errno says

	"ENOTSUP and EOPNOTSUPP have the same value on Linux,
	but according to POSIX.1 these error values should be
	distinct."

so use EOPNOTSUPP as its equivalent.
Signed-off-by: default avatarChris Wilson <chris@chris-wilson.co.uk>
Cc: Daniel Vetter <daniel@ffwll.ch>
Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>
Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch> #v2
Link: https://patchwork.freedesktop.org/patch/msgid/20180913192050.24812-1-chris@chris-wilson.co.uk
parent 6f19eb21
...@@ -1251,7 +1251,7 @@ int drm_mode_atomic_ioctl(struct drm_device *dev, ...@@ -1251,7 +1251,7 @@ int drm_mode_atomic_ioctl(struct drm_device *dev,
/* disallow for drivers not supporting atomic: */ /* disallow for drivers not supporting atomic: */
if (!drm_core_check_feature(dev, DRIVER_ATOMIC)) if (!drm_core_check_feature(dev, DRIVER_ATOMIC))
return -EINVAL; return -EOPNOTSUPP;
/* disallow for userspace that has not enabled atomic cap (even /* disallow for userspace that has not enabled atomic cap (even
* though this may be a bit overkill, since legacy userspace * though this may be a bit overkill, since legacy userspace
......
...@@ -398,7 +398,7 @@ int drm_legacy_addmap_ioctl(struct drm_device *dev, void *data, ...@@ -398,7 +398,7 @@ int drm_legacy_addmap_ioctl(struct drm_device *dev, void *data,
if (!drm_core_check_feature(dev, DRIVER_KMS_LEGACY_CONTEXT) && if (!drm_core_check_feature(dev, DRIVER_KMS_LEGACY_CONTEXT) &&
!drm_core_check_feature(dev, DRIVER_LEGACY)) !drm_core_check_feature(dev, DRIVER_LEGACY))
return -EINVAL; return -EOPNOTSUPP;
err = drm_addmap_core(dev, map->offset, map->size, map->type, err = drm_addmap_core(dev, map->offset, map->size, map->type,
map->flags, &maplist); map->flags, &maplist);
...@@ -444,7 +444,7 @@ int drm_legacy_getmap_ioctl(struct drm_device *dev, void *data, ...@@ -444,7 +444,7 @@ int drm_legacy_getmap_ioctl(struct drm_device *dev, void *data,
if (!drm_core_check_feature(dev, DRIVER_KMS_LEGACY_CONTEXT) && if (!drm_core_check_feature(dev, DRIVER_KMS_LEGACY_CONTEXT) &&
!drm_core_check_feature(dev, DRIVER_LEGACY)) !drm_core_check_feature(dev, DRIVER_LEGACY))
return -EINVAL; return -EOPNOTSUPP;
idx = map->offset; idx = map->offset;
if (idx < 0) if (idx < 0)
...@@ -596,7 +596,7 @@ int drm_legacy_rmmap_ioctl(struct drm_device *dev, void *data, ...@@ -596,7 +596,7 @@ int drm_legacy_rmmap_ioctl(struct drm_device *dev, void *data,
if (!drm_core_check_feature(dev, DRIVER_KMS_LEGACY_CONTEXT) && if (!drm_core_check_feature(dev, DRIVER_KMS_LEGACY_CONTEXT) &&
!drm_core_check_feature(dev, DRIVER_LEGACY)) !drm_core_check_feature(dev, DRIVER_LEGACY))
return -EINVAL; return -EOPNOTSUPP;
mutex_lock(&dev->struct_mutex); mutex_lock(&dev->struct_mutex);
list_for_each_entry(r_list, &dev->maplist, head) { list_for_each_entry(r_list, &dev->maplist, head) {
...@@ -860,7 +860,7 @@ int drm_legacy_addbufs_pci(struct drm_device *dev, ...@@ -860,7 +860,7 @@ int drm_legacy_addbufs_pci(struct drm_device *dev,
struct drm_buf **temp_buflist; struct drm_buf **temp_buflist;
if (!drm_core_check_feature(dev, DRIVER_PCI_DMA)) if (!drm_core_check_feature(dev, DRIVER_PCI_DMA))
return -EINVAL; return -EOPNOTSUPP;
if (!dma) if (!dma)
return -EINVAL; return -EINVAL;
...@@ -1064,7 +1064,7 @@ static int drm_legacy_addbufs_sg(struct drm_device *dev, ...@@ -1064,7 +1064,7 @@ static int drm_legacy_addbufs_sg(struct drm_device *dev,
struct drm_buf **temp_buflist; struct drm_buf **temp_buflist;
if (!drm_core_check_feature(dev, DRIVER_SG)) if (!drm_core_check_feature(dev, DRIVER_SG))
return -EINVAL; return -EOPNOTSUPP;
if (!dma) if (!dma)
return -EINVAL; return -EINVAL;
...@@ -1221,10 +1221,10 @@ int drm_legacy_addbufs(struct drm_device *dev, void *data, ...@@ -1221,10 +1221,10 @@ int drm_legacy_addbufs(struct drm_device *dev, void *data,
int ret; int ret;
if (!drm_core_check_feature(dev, DRIVER_LEGACY)) if (!drm_core_check_feature(dev, DRIVER_LEGACY))
return -EINVAL; return -EOPNOTSUPP;
if (!drm_core_check_feature(dev, DRIVER_HAVE_DMA)) if (!drm_core_check_feature(dev, DRIVER_HAVE_DMA))
return -EINVAL; return -EOPNOTSUPP;
#if IS_ENABLED(CONFIG_AGP) #if IS_ENABLED(CONFIG_AGP)
if (request->flags & _DRM_AGP_BUFFER) if (request->flags & _DRM_AGP_BUFFER)
...@@ -1267,10 +1267,10 @@ int __drm_legacy_infobufs(struct drm_device *dev, ...@@ -1267,10 +1267,10 @@ int __drm_legacy_infobufs(struct drm_device *dev,
int count; int count;
if (!drm_core_check_feature(dev, DRIVER_LEGACY)) if (!drm_core_check_feature(dev, DRIVER_LEGACY))
return -EINVAL; return -EOPNOTSUPP;
if (!drm_core_check_feature(dev, DRIVER_HAVE_DMA)) if (!drm_core_check_feature(dev, DRIVER_HAVE_DMA))
return -EINVAL; return -EOPNOTSUPP;
if (!dma) if (!dma)
return -EINVAL; return -EINVAL;
...@@ -1352,10 +1352,10 @@ int drm_legacy_markbufs(struct drm_device *dev, void *data, ...@@ -1352,10 +1352,10 @@ int drm_legacy_markbufs(struct drm_device *dev, void *data,
struct drm_buf_entry *entry; struct drm_buf_entry *entry;
if (!drm_core_check_feature(dev, DRIVER_LEGACY)) if (!drm_core_check_feature(dev, DRIVER_LEGACY))
return -EINVAL; return -EOPNOTSUPP;
if (!drm_core_check_feature(dev, DRIVER_HAVE_DMA)) if (!drm_core_check_feature(dev, DRIVER_HAVE_DMA))
return -EINVAL; return -EOPNOTSUPP;
if (!dma) if (!dma)
return -EINVAL; return -EINVAL;
...@@ -1400,10 +1400,10 @@ int drm_legacy_freebufs(struct drm_device *dev, void *data, ...@@ -1400,10 +1400,10 @@ int drm_legacy_freebufs(struct drm_device *dev, void *data,
struct drm_buf *buf; struct drm_buf *buf;
if (!drm_core_check_feature(dev, DRIVER_LEGACY)) if (!drm_core_check_feature(dev, DRIVER_LEGACY))
return -EINVAL; return -EOPNOTSUPP;
if (!drm_core_check_feature(dev, DRIVER_HAVE_DMA)) if (!drm_core_check_feature(dev, DRIVER_HAVE_DMA))
return -EINVAL; return -EOPNOTSUPP;
if (!dma) if (!dma)
return -EINVAL; return -EINVAL;
...@@ -1455,10 +1455,10 @@ int __drm_legacy_mapbufs(struct drm_device *dev, void *data, int *p, ...@@ -1455,10 +1455,10 @@ int __drm_legacy_mapbufs(struct drm_device *dev, void *data, int *p,
int i; int i;
if (!drm_core_check_feature(dev, DRIVER_LEGACY)) if (!drm_core_check_feature(dev, DRIVER_LEGACY))
return -EINVAL; return -EOPNOTSUPP;
if (!drm_core_check_feature(dev, DRIVER_HAVE_DMA)) if (!drm_core_check_feature(dev, DRIVER_HAVE_DMA))
return -EINVAL; return -EOPNOTSUPP;
if (!dma) if (!dma)
return -EINVAL; return -EINVAL;
...@@ -1545,7 +1545,7 @@ int drm_legacy_dma_ioctl(struct drm_device *dev, void *data, ...@@ -1545,7 +1545,7 @@ int drm_legacy_dma_ioctl(struct drm_device *dev, void *data,
struct drm_file *file_priv) struct drm_file *file_priv)
{ {
if (!drm_core_check_feature(dev, DRIVER_LEGACY)) if (!drm_core_check_feature(dev, DRIVER_LEGACY))
return -EINVAL; return -EOPNOTSUPP;
if (dev->driver->dma_ioctl) if (dev->driver->dma_ioctl)
return dev->driver->dma_ioctl(dev, data, file_priv); return dev->driver->dma_ioctl(dev, data, file_priv);
......
...@@ -82,7 +82,7 @@ int drm_client_new(struct drm_device *dev, struct drm_client_dev *client, ...@@ -82,7 +82,7 @@ int drm_client_new(struct drm_device *dev, struct drm_client_dev *client,
if (!drm_core_check_feature(dev, DRIVER_MODESET) || if (!drm_core_check_feature(dev, DRIVER_MODESET) ||
!dev->driver->dumb_create || !dev->driver->gem_prime_vmap) !dev->driver->dumb_create || !dev->driver->gem_prime_vmap)
return -ENOTSUPP; return -EOPNOTSUPP;
if (funcs && !try_module_get(funcs->owner)) if (funcs && !try_module_get(funcs->owner))
return -ENODEV; return -ENODEV;
......
...@@ -242,7 +242,7 @@ int drm_mode_gamma_set_ioctl(struct drm_device *dev, ...@@ -242,7 +242,7 @@ int drm_mode_gamma_set_ioctl(struct drm_device *dev,
int ret = 0; int ret = 0;
if (!drm_core_check_feature(dev, DRIVER_MODESET)) if (!drm_core_check_feature(dev, DRIVER_MODESET))
return -EINVAL; return -EOPNOTSUPP;
crtc = drm_crtc_find(dev, file_priv, crtc_lut->crtc_id); crtc = drm_crtc_find(dev, file_priv, crtc_lut->crtc_id);
if (!crtc) if (!crtc)
...@@ -320,7 +320,7 @@ int drm_mode_gamma_get_ioctl(struct drm_device *dev, ...@@ -320,7 +320,7 @@ int drm_mode_gamma_get_ioctl(struct drm_device *dev,
int ret = 0; int ret = 0;
if (!drm_core_check_feature(dev, DRIVER_MODESET)) if (!drm_core_check_feature(dev, DRIVER_MODESET))
return -EINVAL; return -EOPNOTSUPP;
crtc = drm_crtc_find(dev, file_priv, crtc_lut->crtc_id); crtc = drm_crtc_find(dev, file_priv, crtc_lut->crtc_id);
if (!crtc) if (!crtc)
......
...@@ -1725,7 +1725,7 @@ int drm_mode_getconnector(struct drm_device *dev, void *data, ...@@ -1725,7 +1725,7 @@ int drm_mode_getconnector(struct drm_device *dev, void *data,
LIST_HEAD(export_list); LIST_HEAD(export_list);
if (!drm_core_check_feature(dev, DRIVER_MODESET)) if (!drm_core_check_feature(dev, DRIVER_MODESET))
return -EINVAL; return -EOPNOTSUPP;
memset(&u_mode, 0, sizeof(struct drm_mode_modeinfo)); memset(&u_mode, 0, sizeof(struct drm_mode_modeinfo));
......
...@@ -178,7 +178,7 @@ int drm_legacy_getsareactx(struct drm_device *dev, void *data, ...@@ -178,7 +178,7 @@ int drm_legacy_getsareactx(struct drm_device *dev, void *data,
if (!drm_core_check_feature(dev, DRIVER_KMS_LEGACY_CONTEXT) && if (!drm_core_check_feature(dev, DRIVER_KMS_LEGACY_CONTEXT) &&
!drm_core_check_feature(dev, DRIVER_LEGACY)) !drm_core_check_feature(dev, DRIVER_LEGACY))
return -EINVAL; return -EOPNOTSUPP;
mutex_lock(&dev->struct_mutex); mutex_lock(&dev->struct_mutex);
...@@ -226,7 +226,7 @@ int drm_legacy_setsareactx(struct drm_device *dev, void *data, ...@@ -226,7 +226,7 @@ int drm_legacy_setsareactx(struct drm_device *dev, void *data,
if (!drm_core_check_feature(dev, DRIVER_KMS_LEGACY_CONTEXT) && if (!drm_core_check_feature(dev, DRIVER_KMS_LEGACY_CONTEXT) &&
!drm_core_check_feature(dev, DRIVER_LEGACY)) !drm_core_check_feature(dev, DRIVER_LEGACY))
return -EINVAL; return -EOPNOTSUPP;
mutex_lock(&dev->struct_mutex); mutex_lock(&dev->struct_mutex);
list_for_each_entry(r_list, &dev->maplist, head) { list_for_each_entry(r_list, &dev->maplist, head) {
...@@ -330,7 +330,7 @@ int drm_legacy_resctx(struct drm_device *dev, void *data, ...@@ -330,7 +330,7 @@ int drm_legacy_resctx(struct drm_device *dev, void *data,
if (!drm_core_check_feature(dev, DRIVER_KMS_LEGACY_CONTEXT) && if (!drm_core_check_feature(dev, DRIVER_KMS_LEGACY_CONTEXT) &&
!drm_core_check_feature(dev, DRIVER_LEGACY)) !drm_core_check_feature(dev, DRIVER_LEGACY))
return -EINVAL; return -EOPNOTSUPP;
if (res->count >= DRM_RESERVED_CONTEXTS) { if (res->count >= DRM_RESERVED_CONTEXTS) {
memset(&ctx, 0, sizeof(ctx)); memset(&ctx, 0, sizeof(ctx));
...@@ -364,7 +364,7 @@ int drm_legacy_addctx(struct drm_device *dev, void *data, ...@@ -364,7 +364,7 @@ int drm_legacy_addctx(struct drm_device *dev, void *data,
if (!drm_core_check_feature(dev, DRIVER_KMS_LEGACY_CONTEXT) && if (!drm_core_check_feature(dev, DRIVER_KMS_LEGACY_CONTEXT) &&
!drm_core_check_feature(dev, DRIVER_LEGACY)) !drm_core_check_feature(dev, DRIVER_LEGACY))
return -EINVAL; return -EOPNOTSUPP;
ctx->handle = drm_legacy_ctxbitmap_next(dev); ctx->handle = drm_legacy_ctxbitmap_next(dev);
if (ctx->handle == DRM_KERNEL_CONTEXT) { if (ctx->handle == DRM_KERNEL_CONTEXT) {
...@@ -411,7 +411,7 @@ int drm_legacy_getctx(struct drm_device *dev, void *data, ...@@ -411,7 +411,7 @@ int drm_legacy_getctx(struct drm_device *dev, void *data,
if (!drm_core_check_feature(dev, DRIVER_KMS_LEGACY_CONTEXT) && if (!drm_core_check_feature(dev, DRIVER_KMS_LEGACY_CONTEXT) &&
!drm_core_check_feature(dev, DRIVER_LEGACY)) !drm_core_check_feature(dev, DRIVER_LEGACY))
return -EINVAL; return -EOPNOTSUPP;
/* This is 0, because we don't handle any context flags */ /* This is 0, because we don't handle any context flags */
ctx->flags = 0; ctx->flags = 0;
...@@ -437,7 +437,7 @@ int drm_legacy_switchctx(struct drm_device *dev, void *data, ...@@ -437,7 +437,7 @@ int drm_legacy_switchctx(struct drm_device *dev, void *data,
if (!drm_core_check_feature(dev, DRIVER_KMS_LEGACY_CONTEXT) && if (!drm_core_check_feature(dev, DRIVER_KMS_LEGACY_CONTEXT) &&
!drm_core_check_feature(dev, DRIVER_LEGACY)) !drm_core_check_feature(dev, DRIVER_LEGACY))
return -EINVAL; return -EOPNOTSUPP;
DRM_DEBUG("%d\n", ctx->handle); DRM_DEBUG("%d\n", ctx->handle);
return drm_context_switch(dev, dev->last_context, ctx->handle); return drm_context_switch(dev, dev->last_context, ctx->handle);
...@@ -461,7 +461,7 @@ int drm_legacy_newctx(struct drm_device *dev, void *data, ...@@ -461,7 +461,7 @@ int drm_legacy_newctx(struct drm_device *dev, void *data,
if (!drm_core_check_feature(dev, DRIVER_KMS_LEGACY_CONTEXT) && if (!drm_core_check_feature(dev, DRIVER_KMS_LEGACY_CONTEXT) &&
!drm_core_check_feature(dev, DRIVER_LEGACY)) !drm_core_check_feature(dev, DRIVER_LEGACY))
return -EINVAL; return -EOPNOTSUPP;
DRM_DEBUG("%d\n", ctx->handle); DRM_DEBUG("%d\n", ctx->handle);
drm_context_switch_complete(dev, file_priv, ctx->handle); drm_context_switch_complete(dev, file_priv, ctx->handle);
...@@ -487,7 +487,7 @@ int drm_legacy_rmctx(struct drm_device *dev, void *data, ...@@ -487,7 +487,7 @@ int drm_legacy_rmctx(struct drm_device *dev, void *data,
if (!drm_core_check_feature(dev, DRIVER_KMS_LEGACY_CONTEXT) && if (!drm_core_check_feature(dev, DRIVER_KMS_LEGACY_CONTEXT) &&
!drm_core_check_feature(dev, DRIVER_LEGACY)) !drm_core_check_feature(dev, DRIVER_LEGACY))
return -EINVAL; return -EOPNOTSUPP;
DRM_DEBUG("%d\n", ctx->handle); DRM_DEBUG("%d\n", ctx->handle);
if (ctx->handle != DRM_KERNEL_CONTEXT) { if (ctx->handle != DRM_KERNEL_CONTEXT) {
......
...@@ -405,7 +405,7 @@ int drm_mode_getcrtc(struct drm_device *dev, ...@@ -405,7 +405,7 @@ int drm_mode_getcrtc(struct drm_device *dev,
struct drm_plane *plane; struct drm_plane *plane;
if (!drm_core_check_feature(dev, DRIVER_MODESET)) if (!drm_core_check_feature(dev, DRIVER_MODESET))
return -EINVAL; return -EOPNOTSUPP;
crtc = drm_crtc_find(dev, file_priv, crtc_resp->crtc_id); crtc = drm_crtc_find(dev, file_priv, crtc_resp->crtc_id);
if (!crtc) if (!crtc)
...@@ -580,7 +580,7 @@ int drm_mode_setcrtc(struct drm_device *dev, void *data, ...@@ -580,7 +580,7 @@ int drm_mode_setcrtc(struct drm_device *dev, void *data,
int i; int i;
if (!drm_core_check_feature(dev, DRIVER_MODESET)) if (!drm_core_check_feature(dev, DRIVER_MODESET))
return -EINVAL; return -EOPNOTSUPP;
/* /*
* Universal plane src offsets are only 16.16, prevent havoc for * Universal plane src offsets are only 16.16, prevent havoc for
......
...@@ -222,7 +222,7 @@ int drm_mode_getencoder(struct drm_device *dev, void *data, ...@@ -222,7 +222,7 @@ int drm_mode_getencoder(struct drm_device *dev, void *data,
struct drm_crtc *crtc; struct drm_crtc *crtc;
if (!drm_core_check_feature(dev, DRIVER_MODESET)) if (!drm_core_check_feature(dev, DRIVER_MODESET))
return -EINVAL; return -EOPNOTSUPP;
encoder = drm_encoder_find(dev, file_priv, enc_resp->encoder_id); encoder = drm_encoder_find(dev, file_priv, enc_resp->encoder_id);
if (!encoder) if (!encoder)
......
...@@ -113,6 +113,9 @@ int drm_mode_addfb(struct drm_device *dev, struct drm_mode_fb_cmd *or, ...@@ -113,6 +113,9 @@ int drm_mode_addfb(struct drm_device *dev, struct drm_mode_fb_cmd *or,
struct drm_mode_fb_cmd2 r = {}; struct drm_mode_fb_cmd2 r = {};
int ret; int ret;
if (!drm_core_check_feature(dev, DRIVER_MODESET))
return -EOPNOTSUPP;
r.pixel_format = drm_mode_legacy_fb_format(or->bpp, or->depth); r.pixel_format = drm_mode_legacy_fb_format(or->bpp, or->depth);
if (r.pixel_format == DRM_FORMAT_INVALID) { if (r.pixel_format == DRM_FORMAT_INVALID) {
DRM_DEBUG("bad {bpp:%d, depth:%d}\n", or->bpp, or->depth); DRM_DEBUG("bad {bpp:%d, depth:%d}\n", or->bpp, or->depth);
...@@ -352,7 +355,7 @@ int drm_mode_addfb2(struct drm_device *dev, ...@@ -352,7 +355,7 @@ int drm_mode_addfb2(struct drm_device *dev,
struct drm_framebuffer *fb; struct drm_framebuffer *fb;
if (!drm_core_check_feature(dev, DRIVER_MODESET)) if (!drm_core_check_feature(dev, DRIVER_MODESET))
return -EINVAL; return -EOPNOTSUPP;
fb = drm_internal_framebuffer_create(dev, r, file_priv); fb = drm_internal_framebuffer_create(dev, r, file_priv);
if (IS_ERR(fb)) if (IS_ERR(fb))
...@@ -387,7 +390,7 @@ int drm_mode_addfb2_ioctl(struct drm_device *dev, ...@@ -387,7 +390,7 @@ int drm_mode_addfb2_ioctl(struct drm_device *dev,
* ADDFB. * ADDFB.
*/ */
DRM_DEBUG_KMS("addfb2 broken on bigendian"); DRM_DEBUG_KMS("addfb2 broken on bigendian");
return -EINVAL; return -EOPNOTSUPP;
} }
#endif #endif
return drm_mode_addfb2(dev, data, file_priv); return drm_mode_addfb2(dev, data, file_priv);
...@@ -432,7 +435,7 @@ int drm_mode_rmfb(struct drm_device *dev, u32 fb_id, ...@@ -432,7 +435,7 @@ int drm_mode_rmfb(struct drm_device *dev, u32 fb_id,
int found = 0; int found = 0;
if (!drm_core_check_feature(dev, DRIVER_MODESET)) if (!drm_core_check_feature(dev, DRIVER_MODESET))
return -EINVAL; return -EOPNOTSUPP;
fb = drm_framebuffer_lookup(dev, file_priv, fb_id); fb = drm_framebuffer_lookup(dev, file_priv, fb_id);
if (!fb) if (!fb)
...@@ -509,7 +512,7 @@ int drm_mode_getfb(struct drm_device *dev, ...@@ -509,7 +512,7 @@ int drm_mode_getfb(struct drm_device *dev,
int ret; int ret;
if (!drm_core_check_feature(dev, DRIVER_MODESET)) if (!drm_core_check_feature(dev, DRIVER_MODESET))
return -EINVAL; return -EOPNOTSUPP;
fb = drm_framebuffer_lookup(dev, file_priv, r->fb_id); fb = drm_framebuffer_lookup(dev, file_priv, r->fb_id);
if (!fb) if (!fb)
...@@ -582,7 +585,7 @@ int drm_mode_dirtyfb_ioctl(struct drm_device *dev, ...@@ -582,7 +585,7 @@ int drm_mode_dirtyfb_ioctl(struct drm_device *dev,
int ret; int ret;
if (!drm_core_check_feature(dev, DRIVER_MODESET)) if (!drm_core_check_feature(dev, DRIVER_MODESET))
return -EINVAL; return -EOPNOTSUPP;
fb = drm_framebuffer_lookup(dev, file_priv, r->fb_id); fb = drm_framebuffer_lookup(dev, file_priv, r->fb_id);
if (!fb) if (!fb)
......
...@@ -667,7 +667,7 @@ drm_gem_close_ioctl(struct drm_device *dev, void *data, ...@@ -667,7 +667,7 @@ drm_gem_close_ioctl(struct drm_device *dev, void *data,
int ret; int ret;
if (!drm_core_check_feature(dev, DRIVER_GEM)) if (!drm_core_check_feature(dev, DRIVER_GEM))
return -ENODEV; return -EOPNOTSUPP;
ret = drm_gem_handle_delete(file_priv, args->handle); ret = drm_gem_handle_delete(file_priv, args->handle);
...@@ -694,7 +694,7 @@ drm_gem_flink_ioctl(struct drm_device *dev, void *data, ...@@ -694,7 +694,7 @@ drm_gem_flink_ioctl(struct drm_device *dev, void *data,
int ret; int ret;
if (!drm_core_check_feature(dev, DRIVER_GEM)) if (!drm_core_check_feature(dev, DRIVER_GEM))
return -ENODEV; return -EOPNOTSUPP;
obj = drm_gem_object_lookup(file_priv, args->handle); obj = drm_gem_object_lookup(file_priv, args->handle);
if (obj == NULL) if (obj == NULL)
...@@ -745,7 +745,7 @@ drm_gem_open_ioctl(struct drm_device *dev, void *data, ...@@ -745,7 +745,7 @@ drm_gem_open_ioctl(struct drm_device *dev, void *data,
u32 handle; u32 handle;
if (!drm_core_check_feature(dev, DRIVER_GEM)) if (!drm_core_check_feature(dev, DRIVER_GEM))
return -ENODEV; return -EOPNOTSUPP;
mutex_lock(&dev->object_name_lock); mutex_lock(&dev->object_name_lock);
obj = idr_find(&dev->object_name_idr, (int) args->name); obj = idr_find(&dev->object_name_idr, (int) args->name);
......
...@@ -248,7 +248,7 @@ static int drm_getcap(struct drm_device *dev, void *data, struct drm_file *file_ ...@@ -248,7 +248,7 @@ static int drm_getcap(struct drm_device *dev, void *data, struct drm_file *file_
/* Other caps only work with KMS drivers */ /* Other caps only work with KMS drivers */
if (!drm_core_check_feature(dev, DRIVER_MODESET)) if (!drm_core_check_feature(dev, DRIVER_MODESET))
return -ENOTSUPP; return -EOPNOTSUPP;
switch (req->capability) { switch (req->capability) {
case DRM_CAP_DUMB_BUFFER: case DRM_CAP_DUMB_BUFFER:
...@@ -319,7 +319,7 @@ drm_setclientcap(struct drm_device *dev, void *data, struct drm_file *file_priv) ...@@ -319,7 +319,7 @@ drm_setclientcap(struct drm_device *dev, void *data, struct drm_file *file_priv)
break; break;
case DRM_CLIENT_CAP_ATOMIC: case DRM_CLIENT_CAP_ATOMIC:
if (!drm_core_check_feature(dev, DRIVER_ATOMIC)) if (!drm_core_check_feature(dev, DRIVER_ATOMIC))
return -EINVAL; return -EOPNOTSUPP;
if (req->value > 1) if (req->value > 1)
return -EINVAL; return -EINVAL;
file_priv->atomic = req->value; file_priv->atomic = req->value;
......
...@@ -104,7 +104,7 @@ int drm_irq_install(struct drm_device *dev, int irq) ...@@ -104,7 +104,7 @@ int drm_irq_install(struct drm_device *dev, int irq)
unsigned long sh_flags = 0; unsigned long sh_flags = 0;
if (!drm_core_check_feature(dev, DRIVER_HAVE_IRQ)) if (!drm_core_check_feature(dev, DRIVER_HAVE_IRQ))
return -EINVAL; return -EOPNOTSUPP;
if (irq == 0) if (irq == 0)
return -EINVAL; return -EINVAL;
...@@ -175,7 +175,7 @@ int drm_irq_uninstall(struct drm_device *dev) ...@@ -175,7 +175,7 @@ int drm_irq_uninstall(struct drm_device *dev)
int i; int i;
if (!drm_core_check_feature(dev, DRIVER_HAVE_IRQ)) if (!drm_core_check_feature(dev, DRIVER_HAVE_IRQ))
return -EINVAL; return -EOPNOTSUPP;
irq_enabled = dev->irq_enabled; irq_enabled = dev->irq_enabled;
dev->irq_enabled = false; dev->irq_enabled = false;
......
...@@ -506,7 +506,7 @@ int drm_mode_create_lease_ioctl(struct drm_device *dev, ...@@ -506,7 +506,7 @@ int drm_mode_create_lease_ioctl(struct drm_device *dev,
/* Can't lease without MODESET */ /* Can't lease without MODESET */
if (!drm_core_check_feature(dev, DRIVER_MODESET)) if (!drm_core_check_feature(dev, DRIVER_MODESET))
return -EINVAL; return -EOPNOTSUPP;
/* Do not allow sub-leases */ /* Do not allow sub-leases */
if (lessor->lessor) if (lessor->lessor)
...@@ -615,7 +615,7 @@ int drm_mode_list_lessees_ioctl(struct drm_device *dev, ...@@ -615,7 +615,7 @@ int drm_mode_list_lessees_ioctl(struct drm_device *dev,
/* Can't lease without MODESET */ /* Can't lease without MODESET */
if (!drm_core_check_feature(dev, DRIVER_MODESET)) if (!drm_core_check_feature(dev, DRIVER_MODESET))
return -EINVAL; return -EOPNOTSUPP;
DRM_DEBUG_LEASE("List lessees for %d\n", lessor->lessee_id); DRM_DEBUG_LEASE("List lessees for %d\n", lessor->lessee_id);
...@@ -671,7 +671,7 @@ int drm_mode_get_lease_ioctl(struct drm_device *dev, ...@@ -671,7 +671,7 @@ int drm_mode_get_lease_ioctl(struct drm_device *dev,
/* Can't lease without MODESET */ /* Can't lease without MODESET */
if (!drm_core_check_feature(dev, DRIVER_MODESET)) if (!drm_core_check_feature(dev, DRIVER_MODESET))
return -EINVAL; return -EOPNOTSUPP;
DRM_DEBUG_LEASE("get lease for %d\n", lessee->lessee_id); DRM_DEBUG_LEASE("get lease for %d\n", lessee->lessee_id);
...@@ -726,7 +726,7 @@ int drm_mode_revoke_lease_ioctl(struct drm_device *dev, ...@@ -726,7 +726,7 @@ int drm_mode_revoke_lease_ioctl(struct drm_device *dev,
/* Can't lease without MODESET */ /* Can't lease without MODESET */
if (!drm_core_check_feature(dev, DRIVER_MODESET)) if (!drm_core_check_feature(dev, DRIVER_MODESET))
return -EINVAL; return -EOPNOTSUPP;
mutex_lock(&dev->mode_config.idr_mutex); mutex_lock(&dev->mode_config.idr_mutex);
......
...@@ -166,7 +166,7 @@ int drm_legacy_lock(struct drm_device *dev, void *data, ...@@ -166,7 +166,7 @@ int drm_legacy_lock(struct drm_device *dev, void *data,
int ret = 0; int ret = 0;
if (!drm_core_check_feature(dev, DRIVER_LEGACY)) if (!drm_core_check_feature(dev, DRIVER_LEGACY))
return -EINVAL; return -EOPNOTSUPP;
++file_priv->lock_count; ++file_priv->lock_count;
...@@ -256,7 +256,7 @@ int drm_legacy_unlock(struct drm_device *dev, void *data, struct drm_file *file_ ...@@ -256,7 +256,7 @@ int drm_legacy_unlock(struct drm_device *dev, void *data, struct drm_file *file_
struct drm_master *master = file_priv->master; struct drm_master *master = file_priv->master;
if (!drm_core_check_feature(dev, DRIVER_LEGACY)) if (!drm_core_check_feature(dev, DRIVER_LEGACY))
return -EINVAL; return -EOPNOTSUPP;
if (lock->context == DRM_KERNEL_CONTEXT) { if (lock->context == DRM_KERNEL_CONTEXT) {
DRM_ERROR("Process %d using kernel context %d\n", DRM_ERROR("Process %d using kernel context %d\n",
......
...@@ -97,8 +97,7 @@ int drm_mode_getresources(struct drm_device *dev, void *data, ...@@ -97,8 +97,7 @@ int drm_mode_getresources(struct drm_device *dev, void *data,
struct drm_connector_list_iter conn_iter; struct drm_connector_list_iter conn_iter;
if (!drm_core_check_feature(dev, DRIVER_MODESET)) if (!drm_core_check_feature(dev, DRIVER_MODESET))
return -EINVAL; return -EOPNOTSUPP;
mutex_lock(&file_priv->fbs_lock); mutex_lock(&file_priv->fbs_lock);
count = 0; count = 0;
......
...@@ -381,7 +381,7 @@ int drm_mode_obj_get_properties_ioctl(struct drm_device *dev, void *data, ...@@ -381,7 +381,7 @@ int drm_mode_obj_get_properties_ioctl(struct drm_device *dev, void *data,
int ret = 0; int ret = 0;
if (!drm_core_check_feature(dev, DRIVER_MODESET)) if (!drm_core_check_feature(dev, DRIVER_MODESET))
return -EINVAL; return -EOPNOTSUPP;
drm_modeset_lock_all(dev); drm_modeset_lock_all(dev);
...@@ -504,7 +504,7 @@ int drm_mode_obj_set_property_ioctl(struct drm_device *dev, void *data, ...@@ -504,7 +504,7 @@ int drm_mode_obj_set_property_ioctl(struct drm_device *dev, void *data,
int ret = -EINVAL; int ret = -EINVAL;
if (!drm_core_check_feature(dev, DRIVER_MODESET)) if (!drm_core_check_feature(dev, DRIVER_MODESET))
return -EINVAL; return -EOPNOTSUPP;
arg_obj = drm_mode_object_find(dev, file_priv, arg->obj_id, arg->obj_type); arg_obj = drm_mode_object_find(dev, file_priv, arg->obj_id, arg->obj_type);
if (!arg_obj) if (!arg_obj)
......
...@@ -182,14 +182,14 @@ int drm_irq_by_busid(struct drm_device *dev, void *data, ...@@ -182,14 +182,14 @@ int drm_irq_by_busid(struct drm_device *dev, void *data,
struct drm_irq_busid *p = data; struct drm_irq_busid *p = data;
if (!drm_core_check_feature(dev, DRIVER_LEGACY)) if (!drm_core_check_feature(dev, DRIVER_LEGACY))
return -EINVAL; return -EOPNOTSUPP;
/* UMS was only ever support on PCI devices. */ /* UMS was only ever support on PCI devices. */
if (WARN_ON(!dev->pdev)) if (WARN_ON(!dev->pdev))
return -EINVAL; return -EINVAL;
if (!drm_core_check_feature(dev, DRIVER_HAVE_IRQ)) if (!drm_core_check_feature(dev, DRIVER_HAVE_IRQ))
return -EINVAL; return -EOPNOTSUPP;
return drm_pci_irq_by_busid(dev, p); return drm_pci_irq_by_busid(dev, p);
} }
......
...@@ -477,7 +477,7 @@ int drm_mode_getplane_res(struct drm_device *dev, void *data, ...@@ -477,7 +477,7 @@ int drm_mode_getplane_res(struct drm_device *dev, void *data,
int count = 0; int count = 0;
if (!drm_core_check_feature(dev, DRIVER_MODESET)) if (!drm_core_check_feature(dev, DRIVER_MODESET))
return -EINVAL; return -EOPNOTSUPP;
plane_ptr = u64_to_user_ptr(plane_resp->plane_id_ptr); plane_ptr = u64_to_user_ptr(plane_resp->plane_id_ptr);
...@@ -514,7 +514,7 @@ int drm_mode_getplane(struct drm_device *dev, void *data, ...@@ -514,7 +514,7 @@ int drm_mode_getplane(struct drm_device *dev, void *data,
uint32_t __user *format_ptr; uint32_t __user *format_ptr;
if (!drm_core_check_feature(dev, DRIVER_MODESET)) if (!drm_core_check_feature(dev, DRIVER_MODESET))
return -EINVAL; return -EOPNOTSUPP;
plane = drm_plane_find(dev, file_priv, plane_resp->plane_id); plane = drm_plane_find(dev, file_priv, plane_resp->plane_id);
if (!plane) if (!plane)
...@@ -781,7 +781,7 @@ int drm_mode_setplane(struct drm_device *dev, void *data, ...@@ -781,7 +781,7 @@ int drm_mode_setplane(struct drm_device *dev, void *data,
int ret; int ret;
if (!drm_core_check_feature(dev, DRIVER_MODESET)) if (!drm_core_check_feature(dev, DRIVER_MODESET))
return -EINVAL; return -EOPNOTSUPP;
/* /*
* First, find the plane, crtc, and fb objects. If not available, * First, find the plane, crtc, and fb objects. If not available,
...@@ -919,7 +919,7 @@ static int drm_mode_cursor_common(struct drm_device *dev, ...@@ -919,7 +919,7 @@ static int drm_mode_cursor_common(struct drm_device *dev,
int ret = 0; int ret = 0;
if (!drm_core_check_feature(dev, DRIVER_MODESET)) if (!drm_core_check_feature(dev, DRIVER_MODESET))
return -EINVAL; return -EOPNOTSUPP;
if (!req->flags || (~DRM_MODE_CURSOR_FLAGS & req->flags)) if (!req->flags || (~DRM_MODE_CURSOR_FLAGS & req->flags))
return -EINVAL; return -EINVAL;
...@@ -1023,7 +1023,7 @@ int drm_mode_page_flip_ioctl(struct drm_device *dev, ...@@ -1023,7 +1023,7 @@ int drm_mode_page_flip_ioctl(struct drm_device *dev,
int ret = -EINVAL; int ret = -EINVAL;
if (!drm_core_check_feature(dev, DRIVER_MODESET)) if (!drm_core_check_feature(dev, DRIVER_MODESET))
return -EINVAL; return -EOPNOTSUPP;
if (page_flip->flags & ~DRM_MODE_PAGE_FLIP_FLAGS) if (page_flip->flags & ~DRM_MODE_PAGE_FLIP_FLAGS)
return -EINVAL; return -EINVAL;
......
...@@ -844,7 +844,7 @@ int drm_prime_handle_to_fd_ioctl(struct drm_device *dev, void *data, ...@@ -844,7 +844,7 @@ int drm_prime_handle_to_fd_ioctl(struct drm_device *dev, void *data,
struct drm_prime_handle *args = data; struct drm_prime_handle *args = data;
if (!drm_core_check_feature(dev, DRIVER_PRIME)) if (!drm_core_check_feature(dev, DRIVER_PRIME))
return -EINVAL; return -EOPNOTSUPP;
if (!dev->driver->prime_handle_to_fd) if (!dev->driver->prime_handle_to_fd)
return -ENOSYS; return -ENOSYS;
...@@ -863,7 +863,7 @@ int drm_prime_fd_to_handle_ioctl(struct drm_device *dev, void *data, ...@@ -863,7 +863,7 @@ int drm_prime_fd_to_handle_ioctl(struct drm_device *dev, void *data,
struct drm_prime_handle *args = data; struct drm_prime_handle *args = data;
if (!drm_core_check_feature(dev, DRIVER_PRIME)) if (!drm_core_check_feature(dev, DRIVER_PRIME))
return -EINVAL; return -EOPNOTSUPP;
if (!dev->driver->prime_fd_to_handle) if (!dev->driver->prime_fd_to_handle)
return -ENOSYS; return -ENOSYS;
......
...@@ -464,7 +464,7 @@ int drm_mode_getproperty_ioctl(struct drm_device *dev, ...@@ -464,7 +464,7 @@ int drm_mode_getproperty_ioctl(struct drm_device *dev,
uint64_t __user *values_ptr; uint64_t __user *values_ptr;
if (!drm_core_check_feature(dev, DRIVER_MODESET)) if (!drm_core_check_feature(dev, DRIVER_MODESET))
return -EINVAL; return -EOPNOTSUPP;
property = drm_property_find(dev, file_priv, out_resp->prop_id); property = drm_property_find(dev, file_priv, out_resp->prop_id);
if (!property) if (!property)
...@@ -757,7 +757,7 @@ int drm_mode_getblob_ioctl(struct drm_device *dev, ...@@ -757,7 +757,7 @@ int drm_mode_getblob_ioctl(struct drm_device *dev,
int ret = 0; int ret = 0;
if (!drm_core_check_feature(dev, DRIVER_MODESET)) if (!drm_core_check_feature(dev, DRIVER_MODESET))
return -EINVAL; return -EOPNOTSUPP;
blob = drm_property_lookup_blob(dev, out_resp->blob_id); blob = drm_property_lookup_blob(dev, out_resp->blob_id);
if (!blob) if (!blob)
...@@ -786,7 +786,7 @@ int drm_mode_createblob_ioctl(struct drm_device *dev, ...@@ -786,7 +786,7 @@ int drm_mode_createblob_ioctl(struct drm_device *dev,
int ret = 0; int ret = 0;
if (!drm_core_check_feature(dev, DRIVER_MODESET)) if (!drm_core_check_feature(dev, DRIVER_MODESET))
return -EINVAL; return -EOPNOTSUPP;
blob = drm_property_create_blob(dev, out_resp->length, NULL); blob = drm_property_create_blob(dev, out_resp->length, NULL);
if (IS_ERR(blob)) if (IS_ERR(blob))
...@@ -823,7 +823,7 @@ int drm_mode_destroyblob_ioctl(struct drm_device *dev, ...@@ -823,7 +823,7 @@ int drm_mode_destroyblob_ioctl(struct drm_device *dev,
int ret = 0; int ret = 0;
if (!drm_core_check_feature(dev, DRIVER_MODESET)) if (!drm_core_check_feature(dev, DRIVER_MODESET))
return -EINVAL; return -EOPNOTSUPP;
blob = drm_property_lookup_blob(dev, out_resp->blob_id); blob = drm_property_lookup_blob(dev, out_resp->blob_id);
if (!blob) if (!blob)
......
...@@ -89,10 +89,10 @@ int drm_legacy_sg_alloc(struct drm_device *dev, void *data, ...@@ -89,10 +89,10 @@ int drm_legacy_sg_alloc(struct drm_device *dev, void *data,
DRM_DEBUG("\n"); DRM_DEBUG("\n");
if (!drm_core_check_feature(dev, DRIVER_LEGACY)) if (!drm_core_check_feature(dev, DRIVER_LEGACY))
return -EINVAL; return -EOPNOTSUPP;
if (!drm_core_check_feature(dev, DRIVER_SG)) if (!drm_core_check_feature(dev, DRIVER_SG))
return -EINVAL; return -EOPNOTSUPP;
if (dev->sg) if (dev->sg)
return -EINVAL; return -EINVAL;
...@@ -202,10 +202,10 @@ int drm_legacy_sg_free(struct drm_device *dev, void *data, ...@@ -202,10 +202,10 @@ int drm_legacy_sg_free(struct drm_device *dev, void *data,
struct drm_sg_mem *entry; struct drm_sg_mem *entry;
if (!drm_core_check_feature(dev, DRIVER_LEGACY)) if (!drm_core_check_feature(dev, DRIVER_LEGACY))
return -EINVAL; return -EOPNOTSUPP;
if (!drm_core_check_feature(dev, DRIVER_SG)) if (!drm_core_check_feature(dev, DRIVER_SG))
return -EINVAL; return -EOPNOTSUPP;
entry = dev->sg; entry = dev->sg;
dev->sg = NULL; dev->sg = NULL;
......
...@@ -573,7 +573,7 @@ drm_syncobj_create_ioctl(struct drm_device *dev, void *data, ...@@ -573,7 +573,7 @@ drm_syncobj_create_ioctl(struct drm_device *dev, void *data,
struct drm_syncobj_create *args = data; struct drm_syncobj_create *args = data;
if (!drm_core_check_feature(dev, DRIVER_SYNCOBJ)) if (!drm_core_check_feature(dev, DRIVER_SYNCOBJ))
return -ENODEV; return -EOPNOTSUPP;
/* no valid flags yet */ /* no valid flags yet */
if (args->flags & ~DRM_SYNCOBJ_CREATE_SIGNALED) if (args->flags & ~DRM_SYNCOBJ_CREATE_SIGNALED)
...@@ -590,7 +590,7 @@ drm_syncobj_destroy_ioctl(struct drm_device *dev, void *data, ...@@ -590,7 +590,7 @@ drm_syncobj_destroy_ioctl(struct drm_device *dev, void *data,
struct drm_syncobj_destroy *args = data; struct drm_syncobj_destroy *args = data;
if (!drm_core_check_feature(dev, DRIVER_SYNCOBJ)) if (!drm_core_check_feature(dev, DRIVER_SYNCOBJ))
return -ENODEV; return -EOPNOTSUPP;
/* make sure padding is empty */ /* make sure padding is empty */
if (args->pad) if (args->pad)
...@@ -605,7 +605,7 @@ drm_syncobj_handle_to_fd_ioctl(struct drm_device *dev, void *data, ...@@ -605,7 +605,7 @@ drm_syncobj_handle_to_fd_ioctl(struct drm_device *dev, void *data,
struct drm_syncobj_handle *args = data; struct drm_syncobj_handle *args = data;
if (!drm_core_check_feature(dev, DRIVER_SYNCOBJ)) if (!drm_core_check_feature(dev, DRIVER_SYNCOBJ))
return -ENODEV; return -EOPNOTSUPP;
if (args->pad) if (args->pad)
return -EINVAL; return -EINVAL;
...@@ -629,7 +629,7 @@ drm_syncobj_fd_to_handle_ioctl(struct drm_device *dev, void *data, ...@@ -629,7 +629,7 @@ drm_syncobj_fd_to_handle_ioctl(struct drm_device *dev, void *data,
struct drm_syncobj_handle *args = data; struct drm_syncobj_handle *args = data;
if (!drm_core_check_feature(dev, DRIVER_SYNCOBJ)) if (!drm_core_check_feature(dev, DRIVER_SYNCOBJ))
return -ENODEV; return -EOPNOTSUPP;
if (args->pad) if (args->pad)
return -EINVAL; return -EINVAL;
...@@ -921,7 +921,7 @@ drm_syncobj_wait_ioctl(struct drm_device *dev, void *data, ...@@ -921,7 +921,7 @@ drm_syncobj_wait_ioctl(struct drm_device *dev, void *data,
int ret = 0; int ret = 0;
if (!drm_core_check_feature(dev, DRIVER_SYNCOBJ)) if (!drm_core_check_feature(dev, DRIVER_SYNCOBJ))
return -ENODEV; return -EOPNOTSUPP;
if (args->flags & ~(DRM_SYNCOBJ_WAIT_FLAGS_WAIT_ALL | if (args->flags & ~(DRM_SYNCOBJ_WAIT_FLAGS_WAIT_ALL |
DRM_SYNCOBJ_WAIT_FLAGS_WAIT_FOR_SUBMIT)) DRM_SYNCOBJ_WAIT_FLAGS_WAIT_FOR_SUBMIT))
...@@ -955,7 +955,7 @@ drm_syncobj_reset_ioctl(struct drm_device *dev, void *data, ...@@ -955,7 +955,7 @@ drm_syncobj_reset_ioctl(struct drm_device *dev, void *data,
int ret; int ret;
if (!drm_core_check_feature(dev, DRIVER_SYNCOBJ)) if (!drm_core_check_feature(dev, DRIVER_SYNCOBJ))
return -ENODEV; return -EOPNOTSUPP;
if (args->pad != 0) if (args->pad != 0)
return -EINVAL; return -EINVAL;
...@@ -988,7 +988,7 @@ drm_syncobj_signal_ioctl(struct drm_device *dev, void *data, ...@@ -988,7 +988,7 @@ drm_syncobj_signal_ioctl(struct drm_device *dev, void *data,
int ret; int ret;
if (!drm_core_check_feature(dev, DRIVER_SYNCOBJ)) if (!drm_core_check_feature(dev, DRIVER_SYNCOBJ))
return -ENODEV; return -EOPNOTSUPP;
if (args->pad != 0) if (args->pad != 0)
return -EINVAL; return -EINVAL;
......
...@@ -1771,7 +1771,7 @@ int drm_crtc_get_sequence_ioctl(struct drm_device *dev, void *data, ...@@ -1771,7 +1771,7 @@ int drm_crtc_get_sequence_ioctl(struct drm_device *dev, void *data,
int ret; int ret;
if (!drm_core_check_feature(dev, DRIVER_MODESET)) if (!drm_core_check_feature(dev, DRIVER_MODESET))
return -EINVAL; return -EOPNOTSUPP;
if (!dev->irq_enabled) if (!dev->irq_enabled)
return -EINVAL; return -EINVAL;
...@@ -1829,7 +1829,7 @@ int drm_crtc_queue_sequence_ioctl(struct drm_device *dev, void *data, ...@@ -1829,7 +1829,7 @@ int drm_crtc_queue_sequence_ioctl(struct drm_device *dev, void *data,
unsigned long spin_flags; unsigned long spin_flags;
if (!drm_core_check_feature(dev, DRIVER_MODESET)) if (!drm_core_check_feature(dev, DRIVER_MODESET))
return -EINVAL; return -EOPNOTSUPP;
if (!dev->irq_enabled) if (!dev->irq_enabled)
return -EINVAL; return -EINVAL;
......
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