From: Chris Wilson <chris@chris-wilson.co.uk>
To: Mika Kuoppala <mika.kuoppala@linux.intel.com>
Cc: intel-gfx@lists.freedesktop.org, miku@iki.fi
Subject: Re: [PATCH 4/7] drm/i915: add batch bo to i915_add_request()
Date: Wed, 12 Jun 2013 11:09:50 +0100 [thread overview]
Message-ID: <20130612100950.GC32648@cantiga.alporthouse.com> (raw)
In-Reply-To: <1371029734-10355-4-git-send-email-mika.kuoppala@intel.com>
On Wed, Jun 12, 2013 at 12:35:31PM +0300, Mika Kuoppala wrote:
> In order to track down a batch buffer and context which
> caused the ring to hang, store reference to bo into the request struct.
> Request can also cause gpu to hang after the batch in the flush section
> in the ring. To detect this add start of the flush portion offset into the
> request.
>
> Signed-off-by: Mika Kuoppala <mika.kuoppala@intel.com>
> ---
> @@ -2041,8 +2043,10 @@ int __i915_add_request(struct intel_ring_buffer *ring,
>
> request->seqno = intel_ring_get_seqno(ring);
> request->ring = ring;
> + request->head = request_start;
> request->tail = request_ring_position;
> request->ctx = ring->last_context;
> + request->batch_obj = obj;
This could do with a comment explaining the lifetimes of the request vs
batch_obj, and so justifying why we do not need a reference count.
/* Whilst this request exists, batch_obj will be on the
* active_list, and so will hold the active reference. Only when this
* request is retired will the the batch_obj be moved onto the
* inactive_list and lose its active reference. Hence we do not need
* to explicitly hold another reference here.
*/
-Chris
--
Chris Wilson, Intel Open Source Technology Centre
next prev parent reply other threads:[~2013-06-12 10:09 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-06-12 9:35 [PATCH 1/7] drm/i915: add struct i915_ctx_hang_stats Mika Kuoppala
2013-06-12 9:35 ` [PATCH 2/7] drm/i915: add i915_gem_context_get_hang_stats() Mika Kuoppala
2013-06-12 9:35 ` [PATCH 3/7] drm/i915: change i915_add_request to macro Mika Kuoppala
2013-06-12 9:35 ` [PATCH 4/7] drm/i915: add batch bo to i915_add_request() Mika Kuoppala
2013-06-12 10:09 ` Chris Wilson [this message]
2013-06-12 12:01 ` Mika Kuoppala
2013-06-12 9:35 ` [PATCH 5/7] drm/i915: store ring hangcheck action Mika Kuoppala
2013-06-12 9:35 ` [PATCH 6/7] drm/i915: find guilty batch buffer on ring resets Mika Kuoppala
2013-06-12 10:17 ` Chris Wilson
2013-06-12 12:13 ` Mika Kuoppala
2013-06-12 9:35 ` [PATCH 7/7] drm/i915: refuse to submit more batchbuffers from guilty context Mika Kuoppala
2013-06-12 10:33 ` [PATCH 1/7] drm/i915: add struct i915_ctx_hang_stats Chris Wilson
2013-06-12 21:13 ` Ben Widawsky
2013-06-12 22:44 ` Chris Wilson
2013-06-13 9:53 ` Daniel Vetter
2013-06-13 20:59 ` Daniel Vetter
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=20130612100950.GC32648@cantiga.alporthouse.com \
--to=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