From: Daniel Vetter Date: Thu, 26 Apr 2012 21:28:11 +0000 (+0200) Subject: drm/i915: disallow clip rects on gen5+ X-Git-Tag: v3.5-rc1~83^2~8^2~26 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=6ebebc9206fca1d20d90edec4873e819cc4051d0;p=profile%2Fivi%2Fkernel-x86-ivi.git drm/i915: disallow clip rects on gen5+ Unfortunately there has been dri1 userspace that used gem to manage the gtt and hence also needed cliprects in the execbuf ioctl. So we can't ever remove that code without breaking the ioctl abi. But at least we can disable it on gen5+, because these horrible versions of mesa have not supported these chips. Acked-by: Jesse Barnes Signed-off-by: Daniel Vetter --- diff --git a/drivers/gpu/drm/i915/i915_gem_execbuffer.c b/drivers/gpu/drm/i915/i915_gem_execbuffer.c index cbba0aa..a46ed26 100644 --- a/drivers/gpu/drm/i915/i915_gem_execbuffer.c +++ b/drivers/gpu/drm/i915/i915_gem_execbuffer.c @@ -1116,6 +1116,11 @@ i915_gem_do_execbuffer(struct drm_device *dev, void *data, return -EINVAL; } + if (INTEL_INFO(dev)->gen >= 5) { + DRM_DEBUG("clip rectangles are only valid on pre-gen5\n"); + return -EINVAL; + } + cliprects = kmalloc(args->num_cliprects * sizeof(*cliprects), GFP_KERNEL); if (cliprects == NULL) {