mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-05-13 05:58:24 -04:00
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
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user