summaryrefslogtreecommitdiffstats
path: root/drivers/gpu
diff options
context:
space:
mode:
authorBoris Brezillon <boris.brezillon@collabora.com>2021-06-30 08:27:47 +0200
committerBoris Brezillon <boris.brezillon@collabora.com>2021-07-01 08:53:34 +0200
commitf9ab9c66f08082a143ac529f1e479b987c2a1fa1 (patch)
tree2d3207c96194e9e81fc7adc3d176d4b811f5887a /drivers/gpu
parented7a34c57defc59227219df60ecde37dc2ad64cb (diff)
downloadlinux-f9ab9c66f08082a143ac529f1e479b987c2a1fa1.tar.bz2
drm/panfrost: Reset the GPU when the AS_ACTIVE bit is stuck
Things are unlikely to resolve until we reset the GPU. Let's not wait for other faults/timeout to happen to trigger this reset. 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-13-boris.brezillon@collabora.com
Diffstat (limited to 'drivers/gpu')
-rw-r--r--drivers/gpu/drm/panfrost/panfrost_mmu.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/drivers/gpu/drm/panfrost/panfrost_mmu.c b/drivers/gpu/drm/panfrost/panfrost_mmu.c
index 959da770295c..e0356e68e768 100644
--- a/drivers/gpu/drm/panfrost/panfrost_mmu.c
+++ b/drivers/gpu/drm/panfrost/panfrost_mmu.c
@@ -36,8 +36,11 @@ static int wait_ready(struct panfrost_device *pfdev, u32 as_nr)
ret = readl_relaxed_poll_timeout_atomic(pfdev->iomem + AS_STATUS(as_nr),
val, !(val & AS_STATUS_AS_ACTIVE), 10, 1000);
- if (ret)
+ if (ret) {
+ /* The GPU hung, let's trigger a reset */
+ panfrost_device_schedule_reset(pfdev);
dev_err(pfdev->dev, "AS_ACTIVE bit stuck\n");
+ }
return ret;
}