[Intel-gfx] [PATCH] drm/i915: Clear scanline waits before disabling the pipe.

Chris Wilson chris at chris-wilson.co.uk
Sun Aug 8 20:54:59 CEST 2010


On Sun, 08 Aug 2010 11:34:01 -0700, Eric Anholt <eric at anholt.net> wrote:
> On Sun,  8 Aug 2010 12:01:38 +0100, Chris Wilson <chris at chris-wilson.co.uk> wrote:
> > If we disable the pipe and the GPU is currently waiting on a scanline
> > WAIT_FOR_EVENT, the GPU will hang. Fortunately, there is a magic bit
> > which we can write on i915+ to break this wait before disabling the
> > pipe.
> 
> At one point I thought we were taking the lock and idling the GPU before
> a modeset, which would handle this problem, right?  This doesn't seem
> reliable if we aren't, as we may just have not reached the MI_WAIT_FOR_EVENT
> in the ring yet.

Hear, hear. I do think this is still racy, but Jesse thought the hardware
would do the right thing is could just break the wait and disable the
pipe before it had a chance to stall...

Actually, I'm not even convinced that the hardware does the right thing if
a wait for scanline is executed on a disabled pipe - my headless g45 with
a fake output is broken with page-flipping/video.

Hmm, might be a worthy addition to hangcheck though to just reset the wait.
-- 
Chris Wilson, Intel Open Source Technology Centre



More information about the Intel-gfx mailing list