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

Tvrtko Ursulin tvrtko.ursulin at linux.intel.com
Mon Mar 18 13:29:20 UTC 2019


On 18/03/2019 12:57, Chris Wilson wrote:
> 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.

Yep. Guess my previous review was too sloppy.

Reviewed-by: Tvrtko Ursulin <tvrtko.ursulin at intel.com>

Regards,

Tvrtko



More information about the Intel-gfx mailing list