From: Daniel Vetter <daniel@ffwll.ch>
To: Chris Wilson <chris@chris-wilson.co.uk>,
Daniel Vetter <daniel@ffwll.ch>,
Mika Kuoppala <mika.kuoppala@linux.intel.com>,
intel-gfx@lists.freedesktop.org, miku@iki.fi
Subject: Re: [PATCH v3] drm/i915: Add null state batch to active list
Date: Wed, 21 May 2014 17:17:59 +0200 [thread overview]
Message-ID: <20140521151759.GL14357@phenom.ffwll.local> (raw)
In-Reply-To: <20140521150040.GA28410@nuc-i3427.alporthouse.com>
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@linux.intel.com>
> > > Cc: Chris Wilson <chris@chris-wilson.co.uk>
> > > Cc: Damien Lespiau <damien.lespiau@intel.com>
> > > Signed-off-by: Mika Kuoppala <mika.kuoppala@intel.com>
> >
> > 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
next prev parent reply other threads:[~2014-05-21 15:18 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-05-21 12:08 [PATCH] drm/i915: Add null state batch to active list Mika Kuoppala
2014-05-21 12:22 ` Ville Syrjälä
2014-05-21 12:59 ` [PATCH v2] " Mika Kuoppala
2014-05-21 13:06 ` [PATCH] " Chris Wilson
2014-05-21 14:02 ` [PATCH v3] " Mika Kuoppala
2014-05-21 14:54 ` Daniel Vetter
2014-05-21 15:00 ` Chris Wilson
2014-05-21 15:17 ` Daniel Vetter [this message]
2014-05-21 16:01 ` [PATCH v4] " Mika Kuoppala
2014-05-22 12:10 ` Daniel Vetter
2014-05-21 15:29 ` [PATCH v3] " Volkin, Bradley D
2014-05-22 13:34 ` Mika Kuoppala
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20140521151759.GL14357@phenom.ffwll.local \
--to=daniel@ffwll.ch \
--cc=chris@chris-wilson.co.uk \
--cc=intel-gfx@lists.freedesktop.org \
--cc=mika.kuoppala@linux.intel.com \
--cc=miku@iki.fi \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox