From mboxrd@z Thu Jan 1 00:00:00 1970 From: Daniel Vetter Subject: Re: [PATCH 7/9] drm/i915: Make aliasing a 2nd class VM Date: Wed, 7 May 2014 09:56:24 +0200 Message-ID: <20140507075624.GP5730@phenom.ffwll.local> References: <1399440098-17378-1-git-send-email-benjamin.widawsky@intel.com> <1399440098-17378-7-git-send-email-benjamin.widawsky@intel.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mail-ee0-f44.google.com (mail-ee0-f44.google.com [74.125.83.44]) by gabe.freedesktop.org (Postfix) with ESMTP id 82F4A6E4AA for ; Wed, 7 May 2014 00:56:28 -0700 (PDT) Received: by mail-ee0-f44.google.com with SMTP id c41so408787eek.17 for ; Wed, 07 May 2014 00:56:27 -0700 (PDT) Content-Disposition: inline In-Reply-To: <1399440098-17378-7-git-send-email-benjamin.widawsky@intel.com> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" To: Ben Widawsky Cc: Intel GFX , Ben Widawsky List-Id: intel-gfx@lists.freedesktop.org On Tue, May 06, 2014 at 10:21:36PM -0700, Ben Widawsky wrote: > There is a good debate to be had about how best to fit the aliasing > PPGTT into the code. However, as it stands right now, getting aliasing > PPGTT bindings is a hack, and done through implicit arguments. To make > this absolutely clear, WARN and return an error if a driver writer tries > to do something they shouldn't. > > I have no issue with an eventual revert of this patch. It makes sense > for what we have today. > > Signed-off-by: Ben Widawsky Queued for -next, thanks for the patch. -Daniel > --- > drivers/gpu/drm/i915/i915_gem.c | 4 ++++ > 1 file changed, 4 insertions(+) > > diff --git a/drivers/gpu/drm/i915/i915_gem.c b/drivers/gpu/drm/i915/i915_gem.c > index 1567911..c54668c 100644 > --- a/drivers/gpu/drm/i915/i915_gem.c > +++ b/drivers/gpu/drm/i915/i915_gem.c > @@ -3877,9 +3877,13 @@ i915_gem_object_pin(struct drm_i915_gem_object *obj, > uint32_t alignment, > unsigned flags) > { > + struct drm_i915_private *dev_priv = obj->base.dev->dev_private; > struct i915_vma *vma; > int ret; > > + if (WARN_ON(vm == &dev_priv->mm.aliasing_ppgtt->base)) > + return -ENODEV; > + > if (WARN_ON(flags & (PIN_GLOBAL | PIN_MAPPABLE) && !i915_is_ggtt(vm))) > return -EINVAL; > > -- > 1.9.2 > > _______________________________________________ > Intel-gfx mailing list > Intel-gfx@lists.freedesktop.org > http://lists.freedesktop.org/mailman/listinfo/intel-gfx -- Daniel Vetter Software Engineer, Intel Corporation +41 (0) 79 365 57 48 - http://blog.ffwll.ch