media: iris: reset AHB bridge before enabling HW mode
Subsystems (5)
Vikash Garodia
maintainerPATCH 1/1 media: iris: reset AHB bridge before enabling HW mode
When video power domain is switched from software-controlled mode to hardware-controlled mode, the core may be powered down without the AHB bridge going through the required reset sequence. This may leave the bridge FIFO in a stale state.
Reset the CPU-to-VPU AHB bridge before switching the power domain to hardware-controlled mode. This ensures that the bridge FIFO are in reset state before going for mode switch.
---
This is tested on X1E80100, and is applicable to all VPUs.
--- drivers/media/platform/qcom/iris/iris_vpu_common.c | 5 +++++ 1 file changed, 5 insertions(+)
drivers/media/platform/qcom/iris/iris_vpu_common.c +5 -0
@@ -311,6 +311,11 @@ int iris_vpu_power_on_hw(struct iris_core *core)int iris_vpu_set_hwmode (struct iris_core *core) { +writel (CORE_BRIDGE_SW_RESET |CORE_BRIDGE_HW_RESET_DISABLE , + core->reg_base +CPU_CS_AHB_BRIDGE_SYNC_RESET ); +writel (CORE_BRIDGE_HW_RESET_DISABLE , core->reg_base +CPU_CS_AHB_BRIDGE_SYNC_RESET ); +writel (0x0 , core->reg_base +CPU_CS_AHB_BRIDGE_SYNC_RESET ); +return dev_pm_genpd_set_hwmode (core->pmdomain_tbl->pd_devs[IRIS_HW_POWER_DOMAIN ], true); }
---
base-commit: 3d7783543c2646af69ad65825e810060494bea21
change-id: 20260924-vpu_hwmode_fix-e4da1cc447d0
Best regards,
Signature · 1 line
Vikash Garodia <[email protected]>
This fixes the SID override assertion I reported on the Lenovo Yoga Slim 7x. The test details are in my reply on the Link: thread.
Quoted 26 lines · Vikash Garodia
When video power domain is switched from software-controlled mode to hardware-controlled mode, the core may be powered down without the AHB bridge going through the required reset sequence. This may leave the bridge FIFO in a stale state.
Reset the CPU-to-VPU AHB bridge before switching the power domain to hardware-controlled mode. This ensures that the bridge FIFO are in reset state before going for mode switch.Reported-by Birk Skyum <[email protected]>Fixes 95a337f92f0a ("media: iris: switch to hardware mode after firmware boot")Co-developed-by Renjiang Han <[email protected]>Signed-off-by Renjiang Han <[email protected]>Signed-off-by Vikash Garodia <[email protected]>---
This is tested on X1E80100, and is applicable to all VPUs.--- drivers/media/platform/qcom/iris/iris_vpu_common.c | 5 +++++ 1 file changed, 5 insertions(+)drivers/media/platform/qcom/iris/iris_vpu_common.c +0
-0
drivers/media/platform/qcom/iris/iris_vpu_common.c int iris_vpu_power_on_hw(struct iris_core *core) · line 320
Quoted 10 lines
drivers/media/platform/qcom/iris/iris_vpu_common.c +5
-0@@ -311,6 +311,11 @@ int iris_vpu_power_on_hw(struct iris_core *core)int iris_vpu_set_hwmode (struct iris_core *core) { +writel (CORE_BRIDGE_SW_RESET |CORE_BRIDGE_HW_RESET_DISABLE , + core->reg_base +CPU_CS_AHB_BRIDGE_SYNC_RESET ); +writel (CORE_BRIDGE_HW_RESET_DISABLE , core->reg_base +CPU_CS_AHB_BRIDGE_SYNC_RESET ); +writel (0x0 , core->reg_base +CPU_CS_AHB_BRIDGE_SYNC_RESET ); +return dev_pm_genpd_set_hwmode (core->pmdomain_tbl->pd_devs[IRIS_HW_POWER_DOMAIN ], true); }