drm/i915 disallow physical batchbuffers for KMS
authorDaniel Vetter <daniel.vetter@ffwll.ch>
Thu, 26 Apr 2012 21:28:03 +0000 (23:28 +0200)
committerDaniel Vetter <daniel.vetter@ffwll.ch>
Thu, 3 May 2012 09:18:25 +0000 (11:18 +0200)
Even the horrible gen3 XvMC code has learned to do this
right by the time xf86-video-intel releases learned to do
kernel modesetting. So we can just disallow this.

Acked-by: Jesse Barnes <jbarnes@virtuousgeek.org>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
drivers/gpu/drm/i915/i915_gem.c

index 5e34775aa3a2fa02ae6f507e723aad90c2c44011..131eadb84adb4e771864e056c1f8f49ae4ca1fe9 100644 (file)
@@ -3567,8 +3567,9 @@ int i915_gem_init(struct drm_device *dev)
                return ret;
        }
 
-       /* Allow hardware batchbuffers unless told otherwise. */
-       dev_priv->dri1.allow_batchbuffer = 1;
+       /* Allow hardware batchbuffers unless told otherwise, but not for KMS. */
+       if (!drm_core_check_feature(dev, DRIVER_MODESET))
+               dev_priv->dri1.allow_batchbuffer = 1;
        return 0;
 }