All of lore.kernel.org
 help / color / mirror / Atom feed
From: Chris Wilson <chris@chris-wilson.co.uk>
Cc: intel-gfx@lists.freedesktop.org
Subject: Re: [PATCH 2/2] drm/i915: Warn if ring tail is not qword aligned
Date: Mon, 26 Nov 2012 17:46:48 +0000	[thread overview]
Message-ID: <eeac1e$54n7s8@AZSMGA002.ch.intel.com> (raw)
In-Reply-To: <20121126174016.GB20128@intel.com>

[-- Attachment #1: Type: text/plain, Size: 1209 bytes --]

On Mon, 26 Nov 2012 19:40:16 +0200, Ville Syrjälä <ville.syrjala@linux.intel.com> wrote:
> On Mon, Nov 26, 2012 at 04:25:47PM +0000, Chris Wilson wrote:
> > On Mon, 26 Nov 2012 14:48:19 +0200, ville.syrjala@linux.intel.com wrote:
> > > From: Ville Syrjälä <ville.syrjala@linux.intel.com>
> > > 
> > > Ringbuffer tail pointer must be qword aligned. Warn if someone
> > > makes a mistake and forgets to pad the ring when the commands
> > > inserted into the ring don't align to qword naturally.
> > 
> > The assertion should be that we wrote precisely the number of dwords we
> > declared in intel_ring_begin(). Which is one of the important factors to
> > check whenever reviewing such code. This assertion (which should be a
> > BUG_ON) is no substitute for such review.
> 
> Yeah. I was considering adding some reserved_space field to the ring,
> populate it in ring_begin(), and and make sure it was correctly
> consumed at ring_advance(). If you think that sounds good, I can cook
> up a patch for it.

To be honest, I was thinking of a firing squad for the author and
reviewers of any such patch that gets intel_ring_begin()..end() wrong.
-Chris

-- 
Chris Wilson, Intel Open Source Technology Centre

[-- Attachment #2: Type: text/plain, Size: 159 bytes --]

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx

  reply	other threads:[~2012-11-26 17:47 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-11-26 12:48 [PATCH 0/2] drm/i915: Ring buffer stuff ville.syrjala
2012-11-26 12:48 ` [PATCH 1/2] drm/i915: Don't allow ring tail to reach the same cacheline as head ville.syrjala
2012-11-26 16:28   ` Chris Wilson
2012-11-26 18:02     ` Ville Syrjälä
2012-11-26 20:24       ` Chris Wilson
2012-11-26 12:48 ` [PATCH 2/2] drm/i915: Warn if ring tail is not qword aligned ville.syrjala
2012-11-26 15:55   ` Daniel Vetter
2012-11-26 16:25   ` Chris Wilson
2012-11-26 17:40     ` Ville Syrjälä
2012-11-26 17:46       ` Chris Wilson [this message]
2012-11-26 18:09         ` Ville Syrjälä
2012-11-27  6:04           ` Ben Widawsky

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='eeac1e$54n7s8@AZSMGA002.ch.intel.com' \
    --to=chris@chris-wilson.co.uk \
    --cc=intel-gfx@lists.freedesktop.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.