[PATCH v2] drm/panfrost: Fix job timeout handling

Boris Brezillon boris.brezillon at collabora.com
Fri Oct 2 12:06:29 UTC 2020


On Fri,  2 Oct 2020 09:10:32 +0200
Boris Brezillon <boris.brezillon at collabora.com> 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.


More information about the dri-devel mailing list