On Wed, Mar 21, 2018 at 10:26:24AM -0700, jeff.mc...@intel.com wrote: > From: Jeff McGee <jeff.mc...@intel.com> > > Engine reset is fast. A context switch interrupt may be generated just > prior to the reset such that the top half handler is racing with reset > post-processing. The handler may set the irq_posted bit again after > the reset code has cleared it to start fresh. Then the re-enabled > tasklet will read the CSB head and tail from MMIO, which will be at > the hardware reset values of 0 and 7 respectively, given that no > actual CSB event has occurred since the reset. Mayhem then ensues as > the tasklet starts processing invalid CSB entries. > > We can handle this corner case without adding any new synchronization > between the irq top half and the reset work item. The tasklet can > just skip CSB processing if the tail is not sane. > > Signed-off-by: Jeff McGee <jeff.mc...@intel.com> > --- If I drop this patch and substitute https://patchwork.freedesktop.org/patch/211831/ I will see irq_posted get set after reset which causes the first tasklet run to re-process a previous CSB event and hit GEM_BUG_ON that nothing was active. -Jeff _______________________________________________ Intel-gfx mailing list Intel-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/intel-gfx
- [Intel-gfx] [RFC 4/8] drm/i915: Add a wait_for routine with m... jeff . mcgee
- [Intel-gfx] ✗ Fi.CI.BAT: failure for Force preemption Patchwork
- Re: [Intel-gfx] [RFC 0/8] Force preemption Chris Wilson
- Re: [Intel-gfx] [RFC 0/8] Force preemption Chris Wilson
- [Intel-gfx] [PATCH] force-preempt-reset Chris Wilson
- [Intel-gfx] ✗ Fi.CI.BAT: failure for force-preempt-r... Patchwork
- Re: [Intel-gfx] [RFC 0/8] Force preemption Chris Wilson
- [Intel-gfx] [RFC 0/8] Force preemption jeff . mcgee
- [Intel-gfx] [RFC 3/8] drm/i915: Move engine reset prepar... jeff . mcgee
- [Intel-gfx] [RFC 7/8] drm/i915: Skip CSB processing on i... jeff . mcgee
- Re: [Intel-gfx] [RFC 7/8] drm/i915: Skip CSB process... Jeff McGee
- Re: [Intel-gfx] [RFC 7/8] drm/i915: Skip CSB pro... Chris Wilson
- Re: [Intel-gfx] [RFC 7/8] drm/i915: Skip CSB... Chris Wilson
- [Intel-gfx] [RFC 6/8] drm/i915: Fix loop on CSB processi... jeff . mcgee
- Re: [Intel-gfx] [RFC 6/8] drm/i915: Fix loop on CSB ... Jeff McGee
- Re: [Intel-gfx] [RFC 6/8] drm/i915: Fix loop on ... Chris Wilson
- Re: [Intel-gfx] [RFC 6/8] drm/i915: Fix loop... Jeff McGee
- Re: [Intel-gfx] [RFC 6/8] drm/i915: Fix... Chris Wilson
- [Intel-gfx] [RFC 1/8] drm/i915/execlists: Refactor out c... jeff . mcgee
- [Intel-gfx] [RFC 5/8] drm/i915/execlists: Flush pending ... jeff . mcgee
- [Intel-gfx] [RFC 8/8] drm/i915: Force preemption to comp... jeff . mcgee