···450450 return retcode;451451}452452EXPORT_SYMBOL(drm_ioctl);453453+454454+/**455455+ * drm_ioctl_flags - Check for core ioctl and return ioctl permission flags456456+ *457457+ * @nr: Ioctl number.458458+ * @flags: Where to return the ioctl permission flags459459+ */460460+bool drm_ioctl_flags(unsigned int nr, unsigned int *flags)461461+{462462+ if ((nr >= DRM_COMMAND_END && nr < DRM_CORE_IOCTL_COUNT) ||463463+ (nr < DRM_COMMAND_BASE)) {464464+ *flags = drm_ioctls[nr].flags;465465+ return true;466466+ }467467+468468+ return false;469469+}470470+EXPORT_SYMBOL(drm_ioctl_flags);
+1
include/drm/drmP.h
···12291229extern long drm_compat_ioctl(struct file *filp,12301230 unsigned int cmd, unsigned long arg);12311231extern int drm_lastclose(struct drm_device *dev);12321232+extern bool drm_ioctl_flags(unsigned int nr, unsigned int *flags);1232123312331234 /* Device support (drm_fops.h) */12341235extern struct mutex drm_global_mutex;