Commit 062705be authored by Jani Nikula's avatar Jani Nikula

drm/i915: add i915_ioc32.h for compat

Keep reducing i915_drv.h.
Reviewed-by: default avatarChris Wilson <chris@chris-wilson.co.uk>
Signed-off-by: default avatarJani Nikula <jani.nikula@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20200227170047.31089-1-jani.nikula@intel.com
parent b28bba89
...@@ -70,6 +70,7 @@ ...@@ -70,6 +70,7 @@
#include "i915_debugfs.h" #include "i915_debugfs.h"
#include "i915_drv.h" #include "i915_drv.h"
#include "i915_ioc32.h"
#include "i915_irq.h" #include "i915_irq.h"
#include "i915_memcpy.h" #include "i915_memcpy.h"
#include "i915_perf.h" #include "i915_perf.h"
...@@ -1762,7 +1763,7 @@ static const struct file_operations i915_driver_fops = { ...@@ -1762,7 +1763,7 @@ static const struct file_operations i915_driver_fops = {
.mmap = i915_gem_mmap, .mmap = i915_gem_mmap,
.poll = drm_poll, .poll = drm_poll,
.read = drm_read, .read = drm_read,
.compat_ioctl = i915_compat_ioctl, .compat_ioctl = i915_ioc32_compat_ioctl,
.llseek = noop_llseek, .llseek = noop_llseek,
}; };
......
...@@ -1699,11 +1699,6 @@ intel_ggtt_update_needs_vtd_wa(struct drm_i915_private *dev_priv) ...@@ -1699,11 +1699,6 @@ intel_ggtt_update_needs_vtd_wa(struct drm_i915_private *dev_priv)
} }
/* i915_drv.c */ /* i915_drv.c */
#ifdef CONFIG_COMPAT
long i915_compat_ioctl(struct file *filp, unsigned int cmd, unsigned long arg);
#else
#define i915_compat_ioctl NULL
#endif
extern const struct dev_pm_ops i915_pm_ops; extern const struct dev_pm_ops i915_pm_ops;
int i915_driver_probe(struct pci_dev *pdev, const struct pci_device_id *ent); int i915_driver_probe(struct pci_dev *pdev, const struct pci_device_id *ent);
......
...@@ -29,7 +29,9 @@ ...@@ -29,7 +29,9 @@
#include <linux/compat.h> #include <linux/compat.h>
#include <drm/drm_ioctl.h> #include <drm/drm_ioctl.h>
#include "i915_drv.h" #include "i915_drv.h"
#include "i915_ioc32.h"
struct drm_i915_getparam32 { struct drm_i915_getparam32 {
s32 param; s32 param;
...@@ -66,7 +68,7 @@ static drm_ioctl_compat_t *i915_compat_ioctls[] = { ...@@ -66,7 +68,7 @@ static drm_ioctl_compat_t *i915_compat_ioctls[] = {
}; };
/** /**
* i915_compat_ioctl - handle the mistakes of the past * i915_ioc32_compat_ioctl - handle the mistakes of the past
* @filp: the file pointer * @filp: the file pointer
* @cmd: the ioctl command (and encoded flags) * @cmd: the ioctl command (and encoded flags)
* @arg: the ioctl argument (from userspace) * @arg: the ioctl argument (from userspace)
...@@ -74,7 +76,7 @@ static drm_ioctl_compat_t *i915_compat_ioctls[] = { ...@@ -74,7 +76,7 @@ static drm_ioctl_compat_t *i915_compat_ioctls[] = {
* Called whenever a 32-bit process running under a 64-bit kernel * Called whenever a 32-bit process running under a 64-bit kernel
* performs an ioctl on /dev/dri/card<n>. * performs an ioctl on /dev/dri/card<n>.
*/ */
long i915_compat_ioctl(struct file *filp, unsigned int cmd, unsigned long arg) long i915_ioc32_compat_ioctl(struct file *filp, unsigned int cmd, unsigned long arg)
{ {
unsigned int nr = DRM_IOCTL_NR(cmd); unsigned int nr = DRM_IOCTL_NR(cmd);
drm_ioctl_compat_t *fn = NULL; drm_ioctl_compat_t *fn = NULL;
......
/* SPDX-License-Identifier: MIT */
/*
* Copyright © 2020 Intel Corporation
*/
#ifndef __I915_IOC32_H__
#define __I915_IOC32_H__
#ifdef CONFIG_COMPAT
struct file;
long i915_ioc32_compat_ioctl(struct file *filp, unsigned int cmd,
unsigned long arg);
#else
#define i915_ioc32_compat_ioctl NULL
#endif
#endif /* __I915_IOC32_H__ */
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment