summaryrefslogtreecommitdiffstats
path: root/drivers/gpu
diff options
context:
space:
mode:
authorBoris Brezillon <boris.brezillon@collabora.com>2024-04-30 13:37:27 +0200
committerBoris Brezillon <boris.brezillon@collabora.com>2024-05-02 20:40:54 +0200
commit2fa42fd910c4ede1ae9c18d535b425046fa49351 (patch)
tree8739b3874e583d14ef8d159c85de1644490958b3 /drivers/gpu
parent8bdbd8b5580b46c8cae365567f5bf6cc956e6512 (diff)
downloadlinux-2fa42fd910c4ede1ae9c18d535b425046fa49351.tar.gz
linux-2fa42fd910c4ede1ae9c18d535b425046fa49351.tar.bz2
linux-2fa42fd910c4ede1ae9c18d535b425046fa49351.zip
drm/panthor: Fix the FW reset logic
In the post_reset function, if the fast reset didn't succeed, we are not clearing the fast_reset flag, which prevents firmware sections from being reloaded. While at it, use panthor_fw_stop() instead of manually writing DISABLE to the MCU_CONTROL register. Fixes: 2718d91816ee ("drm/panthor: Add the FW logical block") Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com> Reviewed-by: Liviu Dudau <liviu.dudau@arm.com> Reviewed-by: Steven Price <steven.price@arm.com> Link: https://patchwork.freedesktop.org/patch/msgid/20240430113727.493155-1-boris.brezillon@collabora.com
Diffstat (limited to 'drivers/gpu')
-rw-r--r--drivers/gpu/drm/panthor/panthor_fw.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/drivers/gpu/drm/panthor/panthor_fw.c b/drivers/gpu/drm/panthor/panthor_fw.c
index 181395e2859a..fedf9627453f 100644
--- a/drivers/gpu/drm/panthor/panthor_fw.c
+++ b/drivers/gpu/drm/panthor/panthor_fw.c
@@ -1083,10 +1083,11 @@ int panthor_fw_post_reset(struct panthor_device *ptdev)
if (!ret)
goto out;
- /* Force a disable, so we get a fresh boot on the next
- * panthor_fw_start() call.
+ /* Forcibly reset the MCU and force a slow reset, so we get a
+ * fresh boot on the next panthor_fw_start() call.
*/
- gpu_write(ptdev, MCU_CONTROL, MCU_CONTROL_DISABLE);
+ panthor_fw_stop(ptdev);
+ ptdev->fw->fast_reset = false;
drm_err(&ptdev->base, "FW fast reset failed, trying a slow reset");
}