Fixup modeset ioctl number & typedef usage
Should be 0x08 rather than 0xa0, and shouldn't use typedefs.main
parent
e3c42f0004
commit
bfdddd218e
|
@ -397,23 +397,17 @@ EXPORT_SYMBOL(drm_vblank_put);
|
||||||
int drm_modeset_ctl(struct drm_device *dev, void *data,
|
int drm_modeset_ctl(struct drm_device *dev, void *data,
|
||||||
struct drm_file *file_priv)
|
struct drm_file *file_priv)
|
||||||
{
|
{
|
||||||
drm_modeset_ctl_t __user *argp = (void __user *)data;
|
struct drm_modeset_ctl *modeset = data;
|
||||||
drm_modeset_ctl_t modeset;
|
|
||||||
int crtc, ret = 0;
|
int crtc, ret = 0;
|
||||||
u32 new;
|
u32 new;
|
||||||
|
|
||||||
if (copy_from_user(&modeset, argp, sizeof(modeset))) {
|
crtc = modeset->arg;
|
||||||
ret = -EFAULT;
|
|
||||||
goto out;
|
|
||||||
}
|
|
||||||
|
|
||||||
crtc = modeset.arg;
|
|
||||||
if (crtc >= dev->num_crtcs) {
|
if (crtc >= dev->num_crtcs) {
|
||||||
ret = -EINVAL;
|
ret = -EINVAL;
|
||||||
goto out;
|
goto out;
|
||||||
}
|
}
|
||||||
|
|
||||||
switch (modeset.cmd) {
|
switch (modeset->cmd) {
|
||||||
case _DRM_PRE_MODESET:
|
case _DRM_PRE_MODESET:
|
||||||
dev->vblank_premodeset[crtc] =
|
dev->vblank_premodeset[crtc] =
|
||||||
dev->driver->get_vblank_counter(dev, crtc);
|
dev->driver->get_vblank_counter(dev, crtc);
|
||||||
|
|
|
@ -555,20 +555,20 @@ union drm_wait_vblank {
|
||||||
struct drm_wait_vblank_reply reply;
|
struct drm_wait_vblank_reply reply;
|
||||||
};
|
};
|
||||||
|
|
||||||
typedef enum {
|
enum drm_modeset_ctl_cmd {
|
||||||
_DRM_PRE_MODESET = 1,
|
_DRM_PRE_MODESET = 1,
|
||||||
_DRM_POST_MODESET = 2,
|
_DRM_POST_MODESET = 2,
|
||||||
} drm_modeset_ctl_cmd_t;
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* DRM_IOCTL_MODESET_CTL ioctl argument type
|
* DRM_IOCTL_MODESET_CTL ioctl argument type
|
||||||
*
|
*
|
||||||
* \sa drmModesetCtl().
|
* \sa drmModesetCtl().
|
||||||
*/
|
*/
|
||||||
typedef struct drm_modeset_ctl {
|
struct drm_modeset_ctl {
|
||||||
unsigned long arg;
|
unsigned long arg;
|
||||||
drm_modeset_ctl_cmd_t cmd;
|
enum drm_modeset_ctl_cmd cmd;
|
||||||
} drm_modeset_ctl_t;
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* DRM_IOCTL_AGP_ENABLE ioctl argument type.
|
* DRM_IOCTL_AGP_ENABLE ioctl argument type.
|
||||||
|
@ -969,6 +969,7 @@ struct drm_mm_init_arg {
|
||||||
#define DRM_IOCTL_GET_CLIENT DRM_IOWR(0x05, struct drm_client)
|
#define DRM_IOCTL_GET_CLIENT DRM_IOWR(0x05, struct drm_client)
|
||||||
#define DRM_IOCTL_GET_STATS DRM_IOR( 0x06, struct drm_stats)
|
#define DRM_IOCTL_GET_STATS DRM_IOR( 0x06, struct drm_stats)
|
||||||
#define DRM_IOCTL_SET_VERSION DRM_IOWR(0x07, struct drm_set_version)
|
#define DRM_IOCTL_SET_VERSION DRM_IOWR(0x07, struct drm_set_version)
|
||||||
|
#define DRM_IOCTL_MODESET_CTL DRM_IOW(0x08, struct drm_modeset_ctl)
|
||||||
|
|
||||||
#define DRM_IOCTL_SET_UNIQUE DRM_IOW( 0x10, struct drm_unique)
|
#define DRM_IOCTL_SET_UNIQUE DRM_IOW( 0x10, struct drm_unique)
|
||||||
#define DRM_IOCTL_AUTH_MAGIC DRM_IOW( 0x11, struct drm_auth)
|
#define DRM_IOCTL_AUTH_MAGIC DRM_IOW( 0x11, struct drm_auth)
|
||||||
|
@ -1041,9 +1042,6 @@ struct drm_mm_init_arg {
|
||||||
#define DRM_IOCTL_BO_WAIT_IDLE DRM_IOWR(0xd5, struct drm_bo_map_wait_idle_arg)
|
#define DRM_IOCTL_BO_WAIT_IDLE DRM_IOWR(0xd5, struct drm_bo_map_wait_idle_arg)
|
||||||
#define DRM_IOCTL_BO_VERSION DRM_IOR(0xd6, struct drm_bo_version_arg)
|
#define DRM_IOCTL_BO_VERSION DRM_IOR(0xd6, struct drm_bo_version_arg)
|
||||||
|
|
||||||
|
|
||||||
#define DRM_IOCTL_MODESET_CTL DRM_IOW(0xa0, drm_modeset_ctl_t)
|
|
||||||
|
|
||||||
/*@}*/
|
/*@}*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
Loading…
Reference in New Issue