Re: [PATCH v4] drm/i915: Advance ring->head fully when idle

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, Apr 07, 2017 at 10:25:13AM +0300, Joonas Lahtinen wrote:
> On to, 2017-04-06 at 18:00 +0100, Chris Wilson wrote:
> > When we retire the last request on the ring, before we ever access that
> > ring again we know it will be completely idle and so we can advance the
> > ring->head fully to the end (i.e. ring->tail) and not just to the start
> > of the breadcrumb. This allows us to skip re-emitting the breadcrumb
> > after resetting the GPU if the ring was entirely idle. This prevents us
> > from overwriting a seqno wraparound by re-executing a stale breadcrumb,
> > i.e.
> > 	submit_request(1)
> > 	intel_engine_init_global_seqno(0)
> > 	i915_reset()
> > would then leave 1 in the HWS, but the next request to execute would
> > also be with seqno 1. The sanity checks upon submission detect this as a
> > timewarp and explode. By setting the ring as empty, upon reset the HWS
> > is left as 0, leaving it consistent with the timeline.
> > 
> > v2: Fix check for deleting last element of list. We know that this
> > request is always the first element of the ring, so only if next
> > points back to the start will this be the only request in flight.
> > v3: Remove opencoding of list_is_last()
> > v4: Move the block to its own function for some clarity.
> > 
> > Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=100144
> > Testcase: igt/gem_exec_whisper/hang-*
> > Signed-off-by: Chris Wilson <chris@xxxxxxxxxxxxxxxxxx>
> > Cc: Mika Kuoppala <mika.kuoppala@xxxxxxxxx>
> 
> Reviewed-by: Joonas Lahtinen <joonas.lahtinen@xxxxxxxxxxxxxxx>

Thanks for the review, and pushed. One more mysterious reset fix done.
-Chris

-- 
Chris Wilson, Intel Open Source Technology Centre
_______________________________________________
Intel-gfx mailing list
Intel-gfx@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/intel-gfx




[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]
  Powered by Linux