From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ben Widawsky Subject: Re: [PATCH] gem_pin: Be explicit about GGTT needs Date: Thu, 7 Nov 2013 10:11:13 -0800 Message-ID: <20131107181113.GA13403@bwidawsk.net> References: <1383797102-1906-1-git-send-email-benjamin.widawsky@intel.com> <20131107083306.GO14082@phenom.ffwll.local> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mail.bwidawsk.net (bwidawsk.net [166.78.191.112]) by gabe.freedesktop.org (Postfix) with ESMTP id E72E3112E79 for ; Thu, 7 Nov 2013 10:11:39 -0800 (PST) Content-Disposition: inline In-Reply-To: <20131107083306.GO14082@phenom.ffwll.local> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: intel-gfx-bounces+gcfxdi-intel-gfx=m.gmane.org@lists.freedesktop.org Errors-To: intel-gfx-bounces+gcfxdi-intel-gfx=m.gmane.org@lists.freedesktop.org To: Daniel Vetter Cc: Intel GFX , Ben Widawsky List-Id: intel-gfx@lists.freedesktop.org On Thu, Nov 07, 2013 at 09:33:06AM +0100, Daniel Vetter wrote: > On Wed, Nov 06, 2013 at 08:05:02PM -0800, Ben Widawsky wrote: > > This test assumes that using gem_pin will pin in the same address space > > used by execbuf. Since pin is for the global GTT only, use the existing > > flag to notify i915.ko that the exec object is special. > > > > Cc: Chris Wilson > > Signed-off-by: Ben Widawsky > > --- > > tests/gem_pin.c | 4 +++- > > 1 file changed, 3 insertions(+), 1 deletion(-) > > > > diff --git a/tests/gem_pin.c b/tests/gem_pin.c > > index 273315f..ca48a04 100644 > > --- a/tests/gem_pin.c > > +++ b/tests/gem_pin.c > > @@ -45,6 +45,8 @@ > > #define BLT_WRITE_ALPHA (1<<21) > > #define BLT_WRITE_RGB (1<<20) > > > > +#define LOCAL__EXEC_OBJ_NEEDS_GTT (1<<1) > > + > > static void exec(int fd, uint32_t handle, uint32_t offset) > > { > > struct drm_i915_gem_execbuffer2 execbuf; > > @@ -63,7 +65,7 @@ static void exec(int fd, uint32_t handle, uint32_t offset) > > gem_exec[0].relocs_ptr = (uintptr_t) gem_reloc; > > gem_exec[0].alignment = 0; > > gem_exec[0].offset = 0; > > - gem_exec[0].flags = 0; > > + gem_exec[0].flags = LOCAL__EXEC_OBJ_NEEDS_GTT; > > This only really works with the aliasing ppgtt stuff on gen6, I'd just > skip the test -it's not really useful with real ppgtt. > -Daniel It is really useful with real ppgtt. Please rethink your assertion. > > > gem_exec[0].rsvd1 = 0; > > gem_exec[0].rsvd2 = 0; > > > > -- > > 1.8.4.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 -- Ben Widawsky, Intel Open Source Technology Center