On Fri, 2 Oct 2020 09:10:32 +0200 Boris Brezillon <boris.brezillon@xxxxxxxxxxxxx> wrote: > @@ -392,19 +411,41 @@ static void panfrost_job_timedout(struct drm_sched_job *sched_job) > job_read(pfdev, JS_TAIL_LO(js)), > sched_job); > > + /* Scheduler is already stopped, nothing to do. */ > + if (!panfrost_scheduler_stop(&pfdev->js->queue[js], sched_job)) > + return; > + > if (!mutex_trylock(&pfdev->reset_lock)) > return; > > + mutex_lock(&pfdev->sched_lock); Oops, sched_lock shouldn't be acquired here, I switched to a per-queue lock instead.