[PATCH v2 07/12] drm/panfrost: Reset the GPU when the AS_ACTIVE bit is stuck
Steven Price
steven.price at arm.com
Mon Jun 21 15:11:40 UTC 2021
On 21/06/2021 14:39, Boris Brezillon wrote:
> 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 at collabora.com>
This one still haunts me... ;)
Reviewed-by: Steven Price <steven.price at arm.com>
> ---
> drivers/gpu/drm/panfrost/panfrost_mmu.c | 5 ++++-
> 1 file changed, 4 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/panfrost/panfrost_mmu.c b/drivers/gpu/drm/panfrost/panfrost_mmu.c
> index d5c624e776f1..d20bcaecb78f 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;
> }
>
More information about the dri-devel
mailing list