Re: [PATCH 03/10] drm/i915: kill waiting_seqno

Ben Widawsky
2012-04-22T17:49:24Z

On Sun, 22 Apr 2012 14:46:05 +0100
Chris Wilson <chris@chris-wilson.co.uk> wrote:

> On Fri, 20 Apr 2012 18:23:25 -0700, Ben Widawsky <ben@bwidawsk.net>
> wrote:
> > diff --git a/drivers/gpu/drm/i915/i915_irq.c
> > b/drivers/gpu/drm/i915/i915_irq.c index cf0e9f0..52eb9ed 100644
> > --- a/drivers/gpu/drm/i915/i915_irq.c
> > +++ b/drivers/gpu/drm/i915/i915_irq.c
> > @@ -1846,11 +1846,9 @@ static bool i915_hangcheck_ring_idle(struct
> > intel_ring_buffer *ring, bool *err)
>
> So ring->waiting_seqno was also in effect checking that the ring was
> initialised here. Inappropriately, I might add.
>
> Anyway we need:
>
> if (ring->obj == NULL)
> return true;
>
> > if (list_empty(&ring->request_list) ||
> > i915_seqno_passed(ring->get_seqno(ring),
> > ring_last_seqno(ring))) { /* Issue a wake-up to catch stuck h/w. */
> > - if (ring->waiting_seqno &&
> > waitqueue_active(&ring->irq_queue)) {
> > - DRM_ERROR("Hangcheck timer elapsed... %s
> > idle [waiting on %d, at %d], missed IRQ?\n",
> > - ring->name,
> > - ring->waiting_seqno,
> > - ring->get_seqno(ring));
> > + if (waitqueue_active(&ring->irq_queue)) {
> > + DRM_ERROR("Hangcheck timer elapsed... %s
> > idle\n",
> > + ring->name);
> > wake_up_all(&ring->irq_queue);
> > *err = true;
> > }
>

Got it. Thanks.