]> git.proxmox.com Git - mirror_ubuntu-hirsute-kernel.git/commit
drm/panfrost: Fix job timeout handling
authorBoris Brezillon <boris.brezillon@collabora.com>
Fri, 2 Oct 2020 12:25:06 +0000 (14:25 +0200)
committerSteven Price <steven.price@arm.com>
Thu, 8 Oct 2020 09:52:02 +0000 (10:52 +0100)
commit1a11a88cfd9a97e13be8bc880c4795f9844fbbec
treee8eef6e0315e32a038a478d7c8bb2d3c53966bbb
parent9073d4ed8da47ce53f5447a18ff39cd64d4aee71
drm/panfrost: Fix job timeout handling

If more than two jobs end up timeout-ing concurrently, only one of them
(the one attached to the scheduler acquiring the lock) is fully handled.
The other one remains in a dangling state where it's no longer part of
the scheduling queue, but still blocks something in scheduler, leading
to repetitive timeouts when new jobs are queued.

Let's make sure all bad jobs are properly handled by the thread
acquiring the lock.

v3:
- Add Steven's R-b
- Don't take the sched_lock when stopping the schedulers

v2:
- Fix the subject prefix
- Stop the scheduler before returning from panfrost_job_timedout()
- Call cancel_delayed_work_sync() after drm_sched_stop() to make sure
  no timeout handlers are in flight when we reset the GPU (Steven Price)
- Make sure we release the reset lock before restarting the
  schedulers (Steven Price)

Fixes: f3ba91228e8e ("drm/panfrost: Add initial panfrost driver")
Cc: <stable@vger.kernel.org>
Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Steven Price <steven.price@arm.com>
Signed-off-by: Steven Price <steven.price@arm.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20201002122506.1374183-1-boris.brezillon@collabora.com
drivers/gpu/drm/panfrost/panfrost_job.c