Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

drm: report consistent errors when checking syncobj capibility

We've been somewhat inconsistent when adding the new ioctl and
returned ENODEV instead of EOPNOTSUPPORTED upon failing the syncobj
capibility.

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Fixes: ea569910cbab98 ("drm/syncobj: add transition iotcls between binary and timeline v2")
Fixes: 01d6c357837918 ("drm/syncobj: add support for timeline point wait v8")
Cc: Dave Airlie <airlied@redhat.com>
Cc: Christian König <christian.koenig@amd.com>
Cc: Chunming Zhou <david1.zhou@amd.com>
Reviewed-by: Christian König <christian.koenig@amd.com> for the series.
Reviewed-by: Chunming Zhou <david1.zhou@amd.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20190416123048.2913-1-lionel.g.landwerlin@intel.com

authored by

Lionel Landwerlin and committed by
Dave Airlie
5ec77638 80869e7e

+2 -2
+2 -2
drivers/gpu/drm/drm_syncobj.c
··· 741 741 int ret; 742 742 743 743 if (!drm_core_check_feature(dev, DRIVER_SYNCOBJ)) 744 - return -ENODEV; 744 + return -EOPNOTSUPP; 745 745 746 746 if (args->pad) 747 747 return -EINVAL; ··· 1092 1092 int ret = 0; 1093 1093 1094 1094 if (!drm_core_check_feature(dev, DRIVER_SYNCOBJ)) 1095 - return -ENODEV; 1095 + return -EOPNOTSUPP; 1096 1096 1097 1097 if (args->flags & ~(DRM_SYNCOBJ_WAIT_FLAGS_WAIT_ALL | 1098 1098 DRM_SYNCOBJ_WAIT_FLAGS_WAIT_FOR_SUBMIT |