Re: [PATCH v3] drm/i915: Add null state batch to active list

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, May 21, 2014 at 04:00:40PM +0100, Chris Wilson wrote:
> On Wed, May 21, 2014 at 04:54:55PM +0200, Daniel Vetter wrote:
> > On Wed, May 21, 2014 at 05:02:56PM +0300, Mika Kuoppala wrote:
> > > for proper refcounting to take place as we use
> > > i915_add_request() for it.
> > > 
> > > i915_add_request() also takes the context for the request
> > > from ring->last_context so move the null state batch
> > > submission after the ring context has been set.
> > > 
> > > v2: we need to check for correct ring now (Ville Syrjälä)
> > > v3: no need to expose i915_gem_move_object_to_active (Chris Wilson)
> > > 
> > > Cc: Ville Syrjälä <ville.syrjala@xxxxxxxxxxxxxxx>
> > > Cc: Chris Wilson <chris@xxxxxxxxxxxxxxxxxx>
> > > Cc: Damien Lespiau <damien.lespiau@xxxxxxxxx>
> > > Signed-off-by: Mika Kuoppala <mika.kuoppala@xxxxxxxxx>
> > 
> > Merged with Ville's irc r-b, thanks for the quick fix.
> 
> Pity, it still contains some code that I'd rather not start
> cargo-culting.

Using vmas more as first-class objects I support. Mika can you please
resend? I'll keep v3 for now to avoid blocking people.
-Daniel

> > > -	ret = i915_add_request(ring, &seqno);
> > > +	vma = i915_gem_obj_to_ggtt(so->obj);
> > > +	if (vma == NULL) {
> > > +		ret = -ENOSPC;
> > > +		goto out;
> > > +	}
> 
> We use the GGTT vma much earlier, so this is suspect.
> 
> > > +
> > > +	i915_vma_move_to_active(vma, ring);
> > > +
> > > +	ret = __i915_add_request(ring, NULL, so->obj, NULL);
> > > +	if (ret)
> > > +		i915_gem_object_move_to_inactive(so->obj);
> 
> As is move-to-inactive here. The only way add-request can fail is via an
> EIO, and that will have triggered the move-to-inactive already - which
> should nicely catch a BUG or two.
> -Chris
> 
> -- 
> Chris Wilson, Intel Open Source Technology Centre

-- 
Daniel Vetter
Software Engineer, Intel Corporation
+41 (0) 79 365 57 48 - http://blog.ffwll.ch
_______________________________________________
Intel-gfx mailing list
Intel-gfx@xxxxxxxxxxxxxxxxxxxxx
http://lists.freedesktop.org/mailman/listinfo/intel-gfx





[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]
  Powered by Linux