All of lore.kernel.org
 help / color / mirror / Atom feed
From: Mika Kuoppala <mika.kuoppala@linux.intel.com>
To: Chris Wilson <chris@chris-wilson.co.uk>, intel-gfx@lists.freedesktop.org
Subject: Re: [PATCH 2/4] drm/i915: Poison the request before	emitting commands
Date: Mon, 24 Apr 2017 15:29:48 +0300	[thread overview]
Message-ID: <87d1c22dkz.fsf@gaia.fi.intel.com> (raw)
In-Reply-To: <20170423170619.7156-2-chris@chris-wilson.co.uk>

Chris Wilson <chris@chris-wilson.co.uk> writes:

> If we poison the request before we emit commands, it should be easier to
> spot when we execute an uninitialised request.
>
> References: https://bugs.freedesktop.org/show_bug.cgi?id=100144
> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
> ---
>  drivers/gpu/drm/i915/intel_ringbuffer.c | 1 +
>  1 file changed, 1 insertion(+)
>
> diff --git a/drivers/gpu/drm/i915/intel_ringbuffer.c b/drivers/gpu/drm/i915/intel_ringbuffer.c
> index 8c874996c617..1ec98851a621 100644
> --- a/drivers/gpu/drm/i915/intel_ringbuffer.c
> +++ b/drivers/gpu/drm/i915/intel_ringbuffer.c
> @@ -1693,6 +1693,7 @@ u32 *intel_ring_begin(struct drm_i915_gem_request *req, int num_dwords)
>  
>  	GEM_BUG_ON(ring->emit > ring->size - bytes);
>  	cs = ring->vaddr + ring->emit;
> +	GEM_DEBUG_EXEC(memset(cs, POISON_INUSE, bytes));

Will more modern hardware just skipover these? If so
then perhaps more advanced solution would be to fill with bb
start into the previous address to get a guaranteed
hang on the spot.

Reviewed-by: Mika Kuoppala <mika.kuoppala@intel.com>

>  	ring->emit += bytes;
>  	ring->space -= bytes;
>  	GEM_BUG_ON(ring->space < 0);
> -- 
> 2.11.0
>
> _______________________________________________
> Intel-gfx mailing list
> Intel-gfx@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/intel-gfx
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

  reply	other threads:[~2017-04-24 12:30 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-04-23 17:06 [PATCH 1/4] drm/i915: Differentiate between sw write location into ring and last hw read Chris Wilson
2017-04-23 17:06 ` [PATCH 2/4] drm/i915: Poison the request before emitting commands Chris Wilson
2017-04-24 12:29   ` Mika Kuoppala [this message]
2017-04-24 12:50     ` Chris Wilson
2017-04-23 17:06 ` [PATCH 3/4] drm/i915: Compute the ring->space slightly less pessimistically Chris Wilson
2017-04-24 12:37   ` Mika Kuoppala
2017-04-24 12:52     ` Chris Wilson
2017-04-23 17:06 ` [PATCH 4/4] drm/i915: Include interesting seqno in the missed breadcrumb debug Chris Wilson
2017-04-24 12:52   ` Mika Kuoppala
2017-04-24 14:56     ` Chris Wilson
2017-04-23 17:24 ` ✓ Fi.CI.BAT: success for series starting with [1/4] drm/i915: Differentiate between sw write location into ring and last hw read Patchwork
2017-04-23 17:52 ` [PATCH 1/4] " Chris Wilson
2017-04-24 12:21 ` Mika Kuoppala
2017-04-24 12:32   ` Chris Wilson
2017-04-24 12:41     ` Chris Wilson
2017-04-25 13:00 ` [PATCH v2] " Chris Wilson
2017-04-25 13:50   ` Mika Kuoppala
2017-04-25 14:44     ` Chris Wilson
2017-04-25 13:19 ` ✓ Fi.CI.BAT: success for series starting with [v2] drm/i915: Differentiate between sw write location into ring and last hw read (rev2) 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=87d1c22dkz.fsf@gaia.fi.intel.com \
    --to=mika.kuoppala@linux.intel.com \
    --cc=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.