aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/i915/i915_drv.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/gpu/drm/i915/i915_drv.c')
-rw-r--r--drivers/gpu/drm/i915/i915_drv.c38
1 files changed, 16 insertions, 22 deletions
diff --git a/drivers/gpu/drm/i915/i915_drv.c b/drivers/gpu/drm/i915/i915_drv.c
index a1103fc6597..8f7187915b0 100644
--- a/drivers/gpu/drm/i915/i915_drv.c
+++ b/drivers/gpu/drm/i915/i915_drv.c
@@ -810,6 +810,21 @@ static struct vm_operations_struct i915_gem_vm_ops = {
810 .close = drm_gem_vm_close, 810 .close = drm_gem_vm_close,
811}; 811};
812 812
813static const struct file_operations i915_driver_fops = {
814 .owner = THIS_MODULE,
815 .open = drm_open,
816 .release = drm_release,
817 .unlocked_ioctl = drm_ioctl,
818 .mmap = drm_gem_mmap,
819 .poll = drm_poll,
820 .fasync = drm_fasync,
821 .read = drm_read,
822#ifdef CONFIG_COMPAT
823 .compat_ioctl = i915_compat_ioctl,
824#endif
825 .llseek = noop_llseek,
826};
827
813static struct drm_driver driver = { 828static struct drm_driver driver = {
814 /* Don't use MTRRs here; the Xserver or userspace app should 829 /* Don't use MTRRs here; the Xserver or userspace app should
815 * deal with them for Intel hardware. 830 * deal with them for Intel hardware.
@@ -843,21 +858,7 @@ static struct drm_driver driver = {
843 .dumb_map_offset = i915_gem_mmap_gtt, 858 .dumb_map_offset = i915_gem_mmap_gtt,
844 .dumb_destroy = i915_gem_dumb_destroy, 859 .dumb_destroy = i915_gem_dumb_destroy,
845 .ioctls = i915_ioctls, 860 .ioctls = i915_ioctls,
846 .fops = { 861 .fops = &i915_driver_fops,
847 .owner = THIS_MODULE,
848 .open = drm_open,
849 .release = drm_release,
850 .unlocked_ioctl = drm_ioctl,
851 .mmap = drm_gem_mmap,
852 .poll = drm_poll,
853 .fasync = drm_fasync,
854 .read = drm_read,
855#ifdef CONFIG_COMPAT
856 .compat_ioctl = i915_compat_ioctl,
857#endif
858 .llseek = noop_llseek,
859 },
860
861 .name = DRIVER_NAME, 862 .name = DRIVER_NAME,
862 .desc = DRIVER_DESC, 863 .desc = DRIVER_DESC,
863 .date = DRIVER_DATE, 864 .date = DRIVER_DATE,
@@ -922,13 +923,6 @@ MODULE_AUTHOR(DRIVER_AUTHOR);
922MODULE_DESCRIPTION(DRIVER_DESC); 923MODULE_DESCRIPTION(DRIVER_DESC);
923MODULE_LICENSE("GPL and additional rights"); 924MODULE_LICENSE("GPL and additional rights");
924 925
925/* We give fast paths for the really cool registers */
926#define NEEDS_FORCE_WAKE(dev_priv, reg) \
927 (((dev_priv)->info->gen >= 6) && \
928 ((reg) < 0x40000) && \
929 ((reg) != FORCEWAKE) && \
930 ((reg) != ECOBUS))
931
932#define __i915_read(x, y) \ 926#define __i915_read(x, y) \
933u##x i915_read##x(struct drm_i915_private *dev_priv, u32 reg) { \ 927u##x i915_read##x(struct drm_i915_private *dev_priv, u32 reg) { \
934 u##x val = 0; \ 928 u##x val = 0; \