Ben Widawsky <ben at bwidawsk.net> writes: > On Sat, Apr 20, 2013 at 11:43:51AM -0700, Ben Widawsky wrote: >> On Thu, Apr 04, 2013 at 06:32:37PM +0300, Mika Kuoppala wrote: >> > Instead of relying in acthd, track ring seqno progression >> > to detect if ring has hung. >> > >> > v2: put hangcheck stuff inside struct (Chris Wilson) >> > >> > Signed-off-by: Mika Kuoppala <mika.kuoppala at intel.com> >> >> This patch really scares me. I think we don't want to ever stop using >> ACTHD. AFAICT, ACTHD is aways something we want to track in regards to >> the GPU not making progress. (unless we're worried about cycles in the >> CS, but there, seqno would equally not help us track progress). >> >> The two danger cases are: >> an infinite loop in a shader >> never called MI_BATCH_BUFFER_END >> >> And for both, *I think* ACTHD won't change. > > I'm wrong. I was confusing HEAD with ACTHD. ACTHD is supposed to show > the address of either the batch, or the ring. HEAD is something we could > use instead though. Just a thought. Yes, i confirmed this with my test case. ACTHD will change inside the ring and also inside the batchbuffer. The reason I chose seqnos is because that is the least hw (gen) dependant way to measure the if progress is being made. And such most close of what userspace sees as progress. If batch doesn't get retired for whatever reason, reset will happen. This way we can detect hangs, looped batchbuffers and infinite, or more precisely too long loops, inside shaders. I will need to update the commit message to reflect the fact that with this patch, the batch needs to complete in 3 second time window. -Mika >> >> I believe what the patch really wants is to stop using instdone, but >> continue to use ACTHD as a fallback. >> >> I think if you can keep ACTHD around, I'd be willing to r-b this. >> >> Discussion moved to IRC. >> >> >> [snip] >> -- >> Ben Widawsky, Intel Open Source Technology Center >> _______________________________________________ >> Intel-gfx mailing list >> Intel-gfx at lists.freedesktop.org >> http://lists.freedesktop.org/mailman/listinfo/intel-gfx > > -- > Ben Widawsky, Intel Open Source Technology Center