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

Boris Brezillon
2026-05-04T09:34:19Z

On Fri, 1 May 2026 14:47:59 +0100
Steven Price <steven.price@arm.com> 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@collabora.com>
>
> 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.