Skip to content

Commit 61b94d5

Browse files
author
AngeloGioacchino Del Regno
committed
arm64: dts: mediatek: mt8195: Fix PM suspend/resume with venc clocks
Before suspending the LARBs we're making sure that any operation is done: this never happens because we are unexpectedly unclocking the LARB20 before executing the suspend handler for the MediaTek Smart Multimedia Interface (SMI) and the cause of this is incorrect clocks on this LARB. Fix this issue by changing the Local Arbiter 20 (used by the video encoder secondary core) apb clock to CLK_VENC_CORE1_VENC; furthermore, in order to make sure that both the PM resume and video encoder operation is stable, add the CLK_VENC(_CORE1)_LARB clock to the VENC (main core) and VENC_CORE1 power domains, as this IP cannot communicate with the rest of the system (the AP) without local arbiter clocks being operational. Cc: stable@vger.kernel.org Fixes: 3b5838d ("arm64: dts: mt8195: Add iommu and smi nodes") Fixes: 2b51519 ("arm64: dts: mt8195: Add power domains controller") Reviewed-by: Alexandre Mergnat <amergnat@baylibre.com> Link: https://lore.kernel.org/r/20230706095841.109315-1-angelogioacchino.delregno@collabora.com Signed-off-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
1 parent b85ea95 commit 61b94d5

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

arch/arm64/boot/dts/mediatek/mt8195.dtsi

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -627,6 +627,8 @@
627627

628628
power-domain@MT8195_POWER_DOMAIN_VENC_CORE1 {
629629
reg = <MT8195_POWER_DOMAIN_VENC_CORE1>;
630+
clocks = <&vencsys_core1 CLK_VENC_CORE1_LARB>;
631+
clock-names = "venc1-larb";
630632
mediatek,infracfg = <&infracfg_ao>;
631633
#power-domain-cells = <0>;
632634
};
@@ -689,6 +691,8 @@
689691

690692
power-domain@MT8195_POWER_DOMAIN_VENC {
691693
reg = <MT8195_POWER_DOMAIN_VENC>;
694+
clocks = <&vencsys CLK_VENC_LARB>;
695+
clock-names = "venc0-larb";
692696
mediatek,infracfg = <&infracfg_ao>;
693697
#power-domain-cells = <0>;
694698
};
@@ -2665,7 +2669,7 @@
26652669
reg = <0 0x1b010000 0 0x1000>;
26662670
mediatek,larb-id = <20>;
26672671
mediatek,smi = <&smi_common_vpp>;
2668-
clocks = <&vencsys_core1 CLK_VENC_CORE1_LARB>,
2672+
clocks = <&vencsys_core1 CLK_VENC_CORE1_VENC>,
26692673
<&vencsys_core1 CLK_VENC_CORE1_GALS>,
26702674
<&vppsys0 CLK_VPP0_GALS_VDO0_VDO1_VENCSYS_CORE1>;
26712675
clock-names = "apb", "smi", "gals";

0 commit comments

Comments
 (0)