[Intel-gfx] [PATCH 8/8] drm/i915: Don't disable interrupts and pretend a lock as been acquired in __timeline_mark_lock().
Sebastian Andrzej Siewior
bigeasy at linutronix.de
Wed Oct 6 06:58:57 UTC 2021
On 2021-10-05 21:16:17 [+0200], Peter Zijlstra wrote:
> > -static inline void intel_context_mark_active(struct intel_context *ce)
> > +static inline void intel_context_mark_active(struct intel_context *ce,
> > + bool timeline_mutex_needed)
> > {
> > - lockdep_assert_held(&ce->timeline->mutex);
> > + if (timeline_mutex_needed)
> > + lockdep_assert_held(&ce->timeline->mutex);
> > ++ce->active_count;
> > }
>
> Chris, might it be possible to write that something like:
>
> lockdep_assert(lockdep_is_held(&ce->timeline->mutex) ||
> engine_is_parked(ce));
>
> instead?
This looks indeed way better given Torvald's yelling in similar cases.
> Otherwise,
>
> Acked-by: Peter Zijlstra (Intel) <peterz at infradead.org>
Sebastian
More information about the Intel-gfx
mailing list