[Intel-gfx] [PATCH 1/5] drm/i915: Cleanup instdone state

Chris Wilson chris at chris-wilson.co.uk
Wed Aug 15 11:14:08 CEST 2012


On Tue, 14 Aug 2012 14:35:13 -0700, Ben Widawsky <ben at bwidawsk.net> wrote:
> Clear the cached instdone state to match what we expect from hardware
> and prevent us from comparing stale values.
> 
> Actually, clearing the state is not the same as setting idle state.
> There would be a known state of idle (ie. all units are done), but since
> it differs for every platform, we can just set 0, and let the hangcheck
> progress as normal.
> 
> By putting the clear into add_request we are essentially initializing
> the cached instdone to a known state before we start the hangcheck
> timer.
> 
> v2: clear instdone in more place (Chris)
> Rewrote the commit message
> 
> References: https://bugs.freedesktop.org/show_bug.cgi?id=52429
> Tested-by: Guang A Yang <guang.a.yang at intel.com>
> Signed-off-by: Ben Widawsky <ben at bwidawsk.net>

So if hangcheck is already running and we add a new request, we still
clear the "stale" state. This means that we may take an extra tick after
a new request for hangcheck to raise an error. Not a big deal and it
keeps the code clean. Though possibly deserves a comment?

Reviewed-by: Chris Wilson <chris at chris-wilson.co.uk>
-Chris

-- 
Chris Wilson, Intel Open Source Technology Centre



More information about the Intel-gfx mailing list