#include <linux/compat.h>
#include <linux/ratelimit.h>
#include <linux/export.h>
#include <drm/drm_device.h>
#include <drm/drm_file.h>
#include <drm/drm_print.h>
#include "drm_crtc_internal.h"
#include "drm_internal.h"
#define DRM_IOCTL_VERSION32 …
#define DRM_IOCTL_GET_UNIQUE32 …
#define DRM_IOCTL_GET_MAP32 …
#define DRM_IOCTL_GET_CLIENT32 …
#define DRM_IOCTL_GET_STATS32 …
#define DRM_IOCTL_SET_UNIQUE32 …
#define DRM_IOCTL_ADD_MAP32 …
#define DRM_IOCTL_ADD_BUFS32 …
#define DRM_IOCTL_MARK_BUFS32 …
#define DRM_IOCTL_INFO_BUFS32 …
#define DRM_IOCTL_MAP_BUFS32 …
#define DRM_IOCTL_FREE_BUFS32 …
#define DRM_IOCTL_RM_MAP32 …
#define DRM_IOCTL_SET_SAREA_CTX32 …
#define DRM_IOCTL_GET_SAREA_CTX32 …
#define DRM_IOCTL_RES_CTX32 …
#define DRM_IOCTL_DMA32 …
#define DRM_IOCTL_AGP_ENABLE32 …
#define DRM_IOCTL_AGP_INFO32 …
#define DRM_IOCTL_AGP_ALLOC32 …
#define DRM_IOCTL_AGP_FREE32 …
#define DRM_IOCTL_AGP_BIND32 …
#define DRM_IOCTL_AGP_UNBIND32 …
#define DRM_IOCTL_SG_ALLOC32 …
#define DRM_IOCTL_SG_FREE32 …
#define DRM_IOCTL_UPDATE_DRAW32 …
#define DRM_IOCTL_WAIT_VBLANK32 …
#define DRM_IOCTL_MODE_ADDFB232 …
drm_version32_t;
static int compat_drm_version(struct file *file, unsigned int cmd,
unsigned long arg)
{ … }
drm_unique32_t;
static int compat_drm_getunique(struct file *file, unsigned int cmd,
unsigned long arg)
{ … }
static int compat_drm_setunique(struct file *file, unsigned int cmd,
unsigned long arg)
{ … }
drm_client32_t;
static int compat_drm_getclient(struct file *file, unsigned int cmd,
unsigned long arg)
{ … }
drm_stats32_t;
static int compat_drm_getstats(struct file *file, unsigned int cmd,
unsigned long arg)
{ … }
#if defined(CONFIG_X86)
drm_update_draw32_t;
static int compat_drm_update_draw(struct file *file, unsigned int cmd,
unsigned long arg)
{ … }
#endif
struct drm_wait_vblank_request32 { … };
struct drm_wait_vblank_reply32 { … };
drm_wait_vblank32_t;
static int compat_drm_wait_vblank(struct file *file, unsigned int cmd,
unsigned long arg)
{ … }
#if defined(CONFIG_X86)
drm_mode_fb_cmd232_t;
static int compat_drm_mode_addfb2(struct file *file, unsigned int cmd,
unsigned long arg)
{ … }
#endif
static struct { … } drm_compat_ioctls[] = …;
long drm_compat_ioctl(struct file *filp, unsigned int cmd, unsigned long arg)
{ … }
EXPORT_SYMBOL(…);