Re: [PATCH 8/8] drm/i915: Don't disable interrupts and pretend a lock as been acquired in __timeline_mark_lock().

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxxxxx>

Sebastian



[Index of Archives]     [AMD Graphics]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux