Commit f9ab9c66 authored by Boris Brezillon's avatar Boris Brezillon
Browse files

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: default avatarBoris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: default avatarSteven Price <steven.price@arm.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20210630062751.2832545-13-boris.brezillon@collabora.com
parent ed7a34c5
Loading
Loading
Loading
Loading
+4 −1
Original line number Diff line number Diff line
@@ -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;
}