[Intel-gfx] [PATCH] drm/i915: Disallow any pinning when kms is enabled

Daniel Vetter daniel.vetter at ffwll.ch
Mon Aug 25 21:59:33 CEST 2014


So apparently userspace managed to get itself into a corner with
tricky tricks and the kernel can't work around because the batch
buffer ends up being pinned. For simplicity let's just take the toys
away.

References: http://mid.gmane.org/20140825063250.GC17083@nuc-i3427.alporthouse.com
Cc: Chris Wilson <chris at chris-wilson.co.uk>
Cc: stable at vger.kernel.org
Signed-off-by: Daniel Vetter <daniel.vetter at ffwll.ch>
---
 drivers/gpu/drm/i915/i915_gem.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/i915/i915_gem.c b/drivers/gpu/drm/i915/i915_gem.c
index dcd8d7b42552..247f44bd082d 100644
--- a/drivers/gpu/drm/i915/i915_gem.c
+++ b/drivers/gpu/drm/i915/i915_gem.c
@@ -4149,7 +4149,7 @@ i915_gem_pin_ioctl(struct drm_device *dev, void *data,
 	struct drm_i915_gem_object *obj;
 	int ret;
 
-	if (INTEL_INFO(dev)->gen >= 6)
+	if (drm_core_check_feature(dev, DRIVER_MODESET))
 		return -ENODEV;
 
 	ret = i915_mutex_lock_interruptible(dev);
-- 
2.0.1




More information about the Intel-gfx mailing list