From: Daniel Vetter Date: Wed, 18 Dec 2013 16:38:53 +0000 (+0100) Subject: drm/i915: Reject NEEDS_GTT relocations with full ppgtt X-Git-Tag: next-20140306~57^2~4^2~80^2~7 X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=2c9f8d56a1ccc9064180a95cf22531c4b37154be;p=karo-tx-linux.git drm/i915: Reject NEEDS_GTT relocations with full ppgtt Doesn't make sense. Spotted while fixing an issue Chris noticed in the same area. 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 f5a1e0c34552..277485505bca 100644 --- a/drivers/gpu/drm/i915/i915_gem_execbuffer.c +++ b/drivers/gpu/drm/i915/i915_gem_execbuffer.c @@ -128,6 +128,12 @@ eb_lookup_vmas(struct eb_vmas *eb, struct i915_vma *vma; struct i915_address_space *bind_vm = vm; + if (exec[i].flags & EXEC_OBJECT_NEEDS_GTT && + USES_FULL_PPGTT(vm->dev)) { + ret = -EINVAL; + goto out; + } + /* If we have secure dispatch, or the userspace assures us that * they know what they're doing, use the GGTT VM. */