drm/panthor: Fix the FW reset logic
Subsystems (3)
Boris Brezillon
maintainerPATCH 1/1 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.
--- drivers/gpu/drm/panthor/panthor_fw.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-)
drivers/gpu/drm/panthor/panthor_fw.c +4 -3
@@ -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" ); }
Signature · 1 line
2.44.0
Quoted 7 lines · Boris Brezillon
In the
post_resetfunction, if the fast reset didn't succeed, we are not clearing thefast_resetflag, which prevents firmware sections from being reloaded. While at it, usepanthor_fw_stop()instead of manually writing DISABLE to theMCU_CONTROLregister.Fixes 2718d91816ee ("drm/panthor: Add the FW logical block")Signed-off-by Boris Brezillon <[email protected]>
Quoted 26 lines
--- drivers/gpu/drm/panthor/panthor_fw.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-)drivers/gpu/drm/panthor/panthor_fw.c +4
-3@@ -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" ); }Signature · 1 line
2.44.0
Signature · 8 lines
====================
| I would like to |
| fix the world, |
| but they're not |
| giving me the |
\ source code! /
---------------
¯\_(ツ)_/¯Quoted 7 lines · Boris Brezillon
In the
post_resetfunction, if the fast reset didn't succeed, we are not clearing thefast_resetflag, which prevents firmware sections from being reloaded. While at it, usepanthor_fw_stop()instead of manually writing DISABLE to theMCU_CONTROLregister.Fixes 2718d91816ee ("drm/panthor: Add the FW logical block")Signed-off-by Boris Brezillon <[email protected]>
Quoted 23 lines
--- drivers/gpu/drm/panthor/panthor_fw.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-)drivers/gpu/drm/panthor/panthor_fw.c +4
-3@@ -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" ); }
Quoted 7 lines · On Tue, 30 Apr 2024 13:37:27 +0200 Boris Brezillon…
In the
post_resetfunction, if the fast reset didn't succeed, we are not clearing thefast_resetflag, which prevents firmware sections from being reloaded. While at it, usepanthor_fw_stop()instead of manually writing DISABLE to theMCU_CONTROLregister.Fixes 2718d91816ee ("drm/panthor: Add the FW logical block")Signed-off-by Boris Brezillon <[email protected]>
Queued to drm-misc-next-fixes.
Quoted 23 lines
--- drivers/gpu/drm/panthor/panthor_fw.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-)drivers/gpu/drm/panthor/panthor_fw.c +4
-3@@ -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" ); }