Home | History | Annotate | Download | only in drm

Lines Matching defs:ioctl

69  *  - GET_UNIQUE ioctl, implemented by drm_getunique is wrapped up in libdrm
71 * - The libdrm drmSetBusid function is backed by the SET_UNIQUE ioctl. All
74 * exclusively use by the SET_VERSION ioctl, because only drm 1.0 (which is
75 * nerved) allowed userspace to set the busid through the above ioctl.
97 * name returned by that ioctl. Note that SET_VERSION is not called, which
215 * Hollowed-out getclient ioctl to keep some dead old drm tests/tools
410 * Setversion ioctl.
466 * drm_noop - DRM no-op ioctl implemntation
467 * @dev: DRM device for the ioctl
468 * @data: data pointer for the ioctl
469 * @file_priv: DRM file for the ioctl call
473 * checks the result of the ioctl, but doesn't care about the action.
486 * drm_invalid_op - DRM invalid ioctl implemntation
487 * @dev: DRM device for the ioctl
488 * @data: data pointer for the ioctl
489 * @file_priv: DRM file for the ioctl call
492 * functionality where we really don't want to allow userspace to call the ioctl
508 * Copy and IOCTL return string to user space
563 * drm_ioctl_permit - Check ioctl permissions against caller
565 * @flags: ioctl permission flags.
568 * Checks whether the caller is allowed to run an ioctl with the
599 #define DRM_IOCTL_DEF(ioctl, _func, _flags) \
600 [DRM_IOCTL_NR(ioctl)] = { \
601 .cmd = ioctl, \
604 .name = #ioctl \
608 #define DRM_LEGACY_IOCTL_DEF(ioctl, _func, _flags) DRM_IOCTL_DEF(ioctl, _func, _flags)
610 #define DRM_LEGACY_IOCTL_DEF(ioctl, _func, _flags) DRM_IOCTL_DEF(ioctl, drm_invalid_op, _flags)
613 /* Ioctl table */
759 /* ioctl suspend/resume */
816 * which define IOCTL for use by the display DRM master, but they all predate
823 * First you need to define the structure for your IOCTL in your driver private
832 * ``Documentation/ioctl/botching-up-ioctls.rst``. Note that drm_ioctl()
836 * Then you need to define your IOCTL number, using one of DRM_IO(), DRM_IOR(),
842 * DRM driver private IOCTL must be in the range from DRM_COMMAND_BASE to
895 * drm_ioctl - ioctl callback implementation for DRM drivers
896 * @filp: file this ioctl is called on
897 * @cmd: ioctl cmd number
900 * Looks up the ioctl function in the DRM core and the driver dispatch table,
934 const struct drm_ioctl_desc *ioctl;
946 ioctl = &dev->driver->ioctls[driver_nr];
948 ioctl = &drm_ioctls[nr];
950 ioctl = NULL;
953 if ((ioctl == NULL) || (ioctl->func == NULL))
957 error = -drm_ioctl_permit(ioctl->flags, file);
962 if (IOCPARM_LEN(cmd) < IOCPARM_LEN(ioctl->cmd)) {
964 KASSERT(IOCPARM_LEN(ioctl->cmd) <= 4096);
965 if (IOCPARM_LEN(ioctl->cmd) > sizeof stackbuf) {
966 buf = kmem_alloc(IOCPARM_LEN(ioctl->cmd), KM_NOSLEEP);
972 IOCPARM_LEN(ioctl->cmd) - IOCPARM_LEN(cmd));
978 ISSET(ioctl->flags, DRM_UNLOCKED)) {
980 error = -(*ioctl->func)(dev, data0, file);
984 error = -(*ioctl->func)(dev, data0, file);
995 kmem_free(buf, IOCPARM_LEN(ioctl->cmd));
1005 const struct drm_ioctl_desc *ioctl = NULL;
1022 /* driver ioctl */
1028 ioctl = &dev->driver->ioctls[index];
1030 /* core ioctl */
1034 ioctl = &drm_ioctls[nr];
1037 drv_size = _IOC_SIZE(ioctl->cmd);
1039 if ((cmd & ioctl->cmd & IOC_IN) == 0)
1041 if ((cmd & ioctl->cmd & IOC_OUT) == 0)
1048 file_priv->authenticated, ioctl->name);
1051 func = ioctl->func;
1077 retcode = drm_ioctl_kernel(filp, func, kdata, ioctl->flags);
1082 if (!ioctl)
1083 DRM_DEBUG("invalid ioctl: pid=%d, dev=0x%lx, auth=%d, cmd=0x%02x, nr=0x%02x\n",
1098 * drm_ioctl_flags - Check for core ioctl and return ioctl permission flags
1099 * @nr: ioctl number
1100 * @flags: where to return the ioctl permission flags
1102 * This ioctl is only used by the vmwgfx driver to augment the access checks
1107 * True if the @nr corresponds to a DRM core ioctl number, false otherwise.