All of lore.kernel.org
 help / color / mirror / Atom feed
From: Chris Wilson <chris@chris-wilson.co.uk>
To: Mika Kuoppala <mika.kuoppala@linux.intel.com>,
	intel-gfx@lists.freedesktop.org
Subject: Re: [PATCH 3/3] drm/i915: Assert the csb tail is within bounds
Date: Tue, 27 Nov 2018 17:48:18 +0000	[thread overview]
Message-ID: <154334089801.11623.4351202884206840470@skylake-alporthouse-com> (raw)
In-Reply-To: <20181127173845.17403-3-mika.kuoppala@linux.intel.com>

Quoting Mika Kuoppala (2018-11-27 17:38:45)
> Make sure that the tail we get from hardware fits
> within the bounds dictated by our count of csb entries.
> 
> Cc: Chris Wilson <chris@chris-wilson.co.uk>
> Cc: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
> Signed-off-by: Mika Kuoppala <mika.kuoppala@linux.intel.com>
> ---
>  drivers/gpu/drm/i915/intel_lrc.c | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/drivers/gpu/drm/i915/intel_lrc.c b/drivers/gpu/drm/i915/intel_lrc.c
> index 107244ab09ef..1a34e91c1305 100644
> --- a/drivers/gpu/drm/i915/intel_lrc.c
> +++ b/drivers/gpu/drm/i915/intel_lrc.c
> @@ -888,6 +888,7 @@ static void process_csb(struct intel_engine_cs *engine)
>          */
>         head = execlists->csb_head;
>         tail = READ_ONCE(*execlists->csb_write);
> +       GEM_DEBUG_BUG_ON(tail >= execlists->csb_entries);
>         GEM_TRACE("%s cs-irq head=%d, tail=%d\n", engine->name, head, tail);

Apply the assert after the debug trace.
-Chris
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

  reply	other threads:[~2018-11-27 17:48 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-11-27 17:38 [PATCH 1/3] drm/i915: Prepare for larger CSB status FIFO size Mika Kuoppala
2018-11-27 17:38 ` [PATCH 2/3] drm/i915/icl: Switch to using 12 deep CSB status FIFO Mika Kuoppala
2018-11-27 17:38 ` [PATCH 3/3] drm/i915: Assert the csb tail is within bounds Mika Kuoppala
2018-11-27 17:48   ` Chris Wilson [this message]
2018-11-27 17:46 ` [PATCH 1/3] drm/i915: Prepare for larger CSB status FIFO size Chris Wilson
2018-11-27 18:43 ` ✓ Fi.CI.BAT: success for series starting with [1/3] " Patchwork
2018-11-27 19:00 ` [PATCH 1/3] " Daniele Ceraolo Spurio
2018-11-28  1:16 ` ✓ Fi.CI.IGT: success for series starting with [1/3] " Patchwork

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=154334089801.11623.4351202884206840470@skylake-alporthouse-com \
    --to=chris@chris-wilson.co.uk \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=mika.kuoppala@linux.intel.com \
    /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.