Skip to content

Commit 2fa42fd

Browse files
committed
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: 2718d91 ("drm/panthor: Add the FW logical block") Signed-off-by: Boris Brezillon <[email protected]> Reviewed-by: Liviu Dudau <[email protected]> Reviewed-by: Steven Price <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
1 parent 8bdbd8b commit 2fa42fd

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

drivers/gpu/drm/panthor/panthor_fw.c

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1083,10 +1083,11 @@ int panthor_fw_post_reset(struct panthor_device *ptdev)
10831083
if (!ret)
10841084
goto out;
10851085

1086-
/* Force a disable, so we get a fresh boot on the next
1087-
* panthor_fw_start() call.
1086+
/* Forcibly reset the MCU and force a slow reset, so we get a
1087+
* fresh boot on the next panthor_fw_start() call.
10881088
*/
1089-
gpu_write(ptdev, MCU_CONTROL, MCU_CONTROL_DISABLE);
1089+
panthor_fw_stop(ptdev);
1090+
ptdev->fw->fast_reset = false;
10901091
drm_err(&ptdev->base, "FW fast reset failed, trying a slow reset");
10911092
}
10921093

0 commit comments

Comments
 (0)