[Intel-gfx] [PATCH v2] drm/i915/gt: execlists->active is serialised by the tasklet
Tvrtko Ursulin
tvrtko.ursulin at linux.intel.com
Wed Oct 9 16:59:09 UTC 2019
On 09/10/2019 17:32, Chris Wilson wrote:
> Quoting Chris Wilson (2019-10-09 17:09:06)
>> The active/pending execlists is no longer protected by the
>> engine->active.lock, but is serialised by the tasklet instead. Update
>> the locking around the debug and stats to follow suit.
>>
>> v2: local_bh_disable() to prevent recursing into the tasklet in case we
>> trigger a softirq (Tvrtko)
>>
>> Fixes: df403069029d ("drm/i915/execlists: Lift process_csb() out of the irq-off spinlock")
>> Signed-off-by: Chris Wilson <chris at chris-wilson.co.uk>
>> Cc: Mika Kuoppala <mika.kuoppala at linux.intel.com>
>> Cc: Tvrtko Ursulin <tvrtko.ursulin at intel.com>
>> ---
>> drivers/gpu/drm/i915/gt/intel_engine.h | 14 ++++++++++++++
>> drivers/gpu/drm/i915/gt/intel_engine_cs.c | 16 +++++++---------
>> drivers/gpu/drm/i915/i915_gem.h | 6 ++++++
>> 3 files changed, 27 insertions(+), 9 deletions(-)
>>
>> diff --git a/drivers/gpu/drm/i915/gt/intel_engine.h b/drivers/gpu/drm/i915/gt/intel_engine.h
>> index d624752f2a92..fa770d3ca208 100644
>> --- a/drivers/gpu/drm/i915/gt/intel_engine.h
>> +++ b/drivers/gpu/drm/i915/gt/intel_engine.h
>> @@ -136,6 +136,20 @@ execlists_active(const struct intel_engine_execlists *execlists)
>> return READ_ONCE(*execlists->active);
>> }
>>
>> +static inline void
>> +execlists_active_lock(struct intel_engine_execlists *execlists)
>
> execlists_active_bh_lock() to include the clue about bh_disable?
Makes sense. Or execlists_active_lock_bh to match the spin_lock_bh.
Reviewed-by: Tvrtko Ursulin <tvrtko.ursulin at intel.com>
Regards,
Tvrtko
>> +{
>> + local_bh_disable(); /* prevent local softirq and lock recursion */
>> + tasklet_lock(&execlists->tasklet);
>> +}
> _______________________________________________
> Intel-gfx mailing list
> Intel-gfx at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/intel-gfx
>
More information about the Intel-gfx
mailing list