drm/i915: disallow gem init ioctl on ilk
authorDaniel Vetter <daniel.vetter@ffwll.ch>
Mon, 26 Mar 2012 20:37:04 +0000 (22:37 +0200)
committerDaniel Vetter <daniel.vetter@ffwll.ch>
Mon, 9 Apr 2012 16:04:08 +0000 (18:04 +0200)
Ums is already disabled, but on ilk we can additionally disable gem
initialization when using user mode setting. Upstream never support
ilk without kernel modesetting and not even the RHEL ilk ums backport
needs gem - that driver is based on xf86-video-intel version 2.2,
which is pre-gem.

Reviewed-by: Adam Jackson <ajax@redhat.com>
Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
Signed-Off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
drivers/gpu/drm/i915/i915_gem.c

index 54ca125a405d358fb1e69bc82d3bf570f2c0adf0..759daa491ab540fdf3bed97beee8095eeab26f43 100644 (file)
@@ -129,6 +129,10 @@ i915_gem_init_ioctl(struct drm_device *dev, void *data,
            (args->gtt_end | args->gtt_start) & (PAGE_SIZE - 1))
                return -EINVAL;
 
+       /* GEM with user mode setting was never supported on ilk and later. */
+       if (INTEL_INFO(dev)->gen >= 5)
+               return -ENODEV;
+
        mutex_lock(&dev->struct_mutex);
        i915_gem_init_global_gtt(dev, args->gtt_start,
                                 args->gtt_end, args->gtt_end);