drm/panfrost: Make sure job interrupts are masked before resetting
authorBoris Brezillon <boris.brezillon@collabora.com>
Wed, 30 Jun 2021 06:27:45 +0000 (08:27 +0200)
committerBoris Brezillon <boris.brezillon@collabora.com>
Thu, 1 Jul 2021 06:53:33 +0000 (08:53 +0200)
commit1d0cab5461d73c3b8d592e5324fcb05e63cf25ef
tree488f6a79080bfb1eb2e06d9b87e513b2d73c0ed5
parenta11c4711238ad39761cc0e04f3e8aa7b28fe1923
drm/panfrost: Make sure job interrupts are masked before resetting

This is not yet needed because we let active jobs be killed during by
the reset and we don't really bother making sure they can be restarted.
But once we start adding soft-stop support, controlling when we deal
with the remaining interrrupts and making sure those are handled before
the reset is issued gets tricky if we keep job interrupts active.

Let's prepare for that and mask+flush job IRQs before issuing a reset.

v4:
* Add a comment explaining why we WARN_ON(!job) in the irq handler
* Keep taking the job_lock when evicting stalled jobs

v3:
* New patch

Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Steven Price <steven.price@arm.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20210630062751.2832545-11-boris.brezillon@collabora.com
drivers/gpu/drm/panfrost/panfrost_job.c