Re: [PATCH 06/10] drm/panthor: Prepare the scheduler logic for FW events in IRQ context

From: Boris Brezillon

Date: Mon May 04 2026 - 05:41:25 EST


On Fri, 1 May 2026 14:47:59 +0100
Steven Price <steven.price@xxxxxxx> wrote:

> On 29/04/2026 10:38, Boris Brezillon wrote:
> > Add a specific spinlock for events processing, and force processing
> > of events in the panthor_sched_report_fw_events() path rather than
> > deferring it to a work item. We also fast-track fence signalling by
> > making the job completion logic IRQ-safe.
> >
> > Signed-off-by: Boris Brezillon <boris.brezillon@xxxxxxxxxxxxx>
>
> I think there's some locking problems here. With some AI help I found
> the following path:
>
> * panthor_job_irq_handler()
> * panthor_sched_report_fw_events()
> * [takes events_lock]
> * sched_process_csg_irq_locked()
> * csg_slot_process_progress_timer_event_locked()
> * lockdep_assert_held(&sched->lock);

Oops, this one should check that events_lock is held instead. I'll fix
that.