[Intel-gfx] [PATCH] drm/i915: WARN if asked to wait on an impossible future seqno
Daniel Vetter
daniel at ffwll.ch
Thu Sep 20 11:30:41 CEST 2012
On Thu, Sep 20, 2012 at 10:42 AM, Chris Wilson <chris at chris-wilson.co.uk> wrote:
> On the hunt for an indefinite __wait_seqno() the most likely cause being
> asked to wait upon a future seqno, we can lay a trap and see if anything
> gets caught.
>
> Signed-off-by: Chris Wilson <chris at chris-wilson.co.uk>
> ---
> drivers/gpu/drm/i915/i915_gem.c | 6 ++++++
> 1 file changed, 6 insertions(+)
>
> diff --git a/drivers/gpu/drm/i915/i915_gem.c b/drivers/gpu/drm/i915/i915_gem.c
> index 39de523..b2effab 100644
> --- a/drivers/gpu/drm/i915/i915_gem.c
> +++ b/drivers/gpu/drm/i915/i915_gem.c
> @@ -1118,6 +1118,12 @@ static int __wait_seqno(struct intel_ring_buffer *ring, u32 seqno,
> bool wait_forever = true;
> int ret;
>
> + if (WARN_ON(!i915_seqno_passed(list_entry(ring->request_list.prev,
> + struct drm_i915_gem_request,
> + list)->seqno,
> + seqno)))
> + return -EDEADLK;
> +
I think dumping the seqno, ring->olr, dev_priv->next_seqno and the
seqno of the last request would be good to debug any such indefinite
wait ...
-Daniel
> if (i915_seqno_passed(ring->get_seqno(ring, true), seqno))
> return 0;
>
> --
> 1.7.10.4
>
> _______________________________________________
> Intel-gfx mailing list
> Intel-gfx at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/intel-gfx
--
Daniel Vetter
Software Engineer, Intel Corporation
+41 (0) 79 365 57 48 - http://blog.ffwll.ch
More information about the Intel-gfx
mailing list