[Intel-gfx] [PATCH 06/22] drm/i915: Hold a reference to the active HW context

Chris Wilson chris at chris-wilson.co.uk
Mon Mar 18 12:57:46 UTC 2019


Quoting Chris Wilson (2019-03-18 12:56:12)
> Quoting Tvrtko Ursulin (2019-03-18 12:54:00)
> > 
> > On 18/03/2019 09:51, Chris Wilson wrote:
> > > For virtual engines, we need to keep the HW context alive while it
> > > remains in use. For regular HW contexts, they are created and kept alive
> > > until the end of the GEM context. For simplicity, generalise the
> > > requirements and keep an active reference to each HW context.
> > 
> > Is there a functional effect from this patch? Later with veng added?
> 
> If by functional do you mean prevents the code from eating itself on
> use-after-free after the engines are freed, then yes.

A variation of this used to be inside the veng patch, but that only
applied itself to veng. After the discussion there, I felt it would be
more obvious if it was applied as a standalone patch by generalising the
requirements to all HW context.
-Chris


More information about the Intel-gfx mailing list