Skip to contentSkip to conversation

iMX8M Mini suspend/resume hanging on imx8m_blk_ctrl_power_on()

DISCUSSION vitor 3 participants 5 messages Apr 4, 2024 – May 8, 2024 Arm i.MX and Layerscape

lore
Share & tools
lore
author
#1 lore raw

Hi,

Quoted 9 lines · vitor

Greetings,

I'm trying to suspend/resume our Verdin iMX8M Mini with VPU IP using the latest 6.9.0-rc2 Kernel. While the system can suspend without issues, it hangs on the resume routine. After some investigation, I can
see the Kernel hanging on imx8m_blk_ctrl_power_on()[1] while resuming the hantro-vpu power domain.

Quoted 6 lines

Any hint about that?

[1]
https://elixir.bootlin.com/linux/v6.9-rc2/source/drivers/pmdomain/imx
/imx8m-blk-ctrl.c#L101

Looking at other child nodes of the pgc node, pgc_vpu_[g1|g2|h1] seems to be nested into pgc_vpumix.

After applying the following changes to imx8mm.dtsi, the suspend/resume is working.

@@ -739,16 +739,19 @@ pgc_vpumix: power-domain@6 {
	pgc_vpu_g1: power-domain@7 {
		#power-domain-cells = <0>;
		reg = <IMX8MM_POWER_DOMAIN_VPUG1>;
+		power-domains = <&pgc_vpumix>;
	};

	pgc_vpu_g2: power-domain@8 {
		#power-domain-cells = <0>;
		reg = <IMX8MM_POWER_DOMAIN_VPUG2>;
+		power-domains = <&pgc_vpumix>;
	};

	pgc_vpu_h1: power-domain@9 {
		#power-domain-cells = <0>;
		reg = <IMX8MM_POWER_DOMAIN_VPUH1>;
+		power-domains = <&pgc_vpumix>;
	};

I will prepare the patch to send in the next couple of days.

Regards,
Vitor Soares

#2 lore raw
Quoted 20 lines · vitor

Hi,

Quoted 15 lines · vitor

Greetings,

I'm trying to suspend/resume our Verdin iMX8M Mini with VPU IP using the latest 6.9.0-rc2 Kernel. While the system can suspend without issues, it hangs on the resume routine. After some investigation, I can
see the Kernel hanging on imx8m_blk_ctrl_power_on()[1] while resuming the hantro-vpu power domain.

Any hint about that?

[1]
https://elixir.bootlin.com/linux/v6.9-rc2/source/drivers/pmdomain/imx
/imx8m-blk-ctrl.c#L101

+ Lucas

Quoted 3 lines

Looking at other child nodes of the pgc node, pgc_vpu_[g1|g2|h1] seems to be nested into pgc_vpumix.

On the surface, that's how it appears and it would be consistent with how the GPU's work with the GPC's for each GPU calling the gpumix. However, the VPU's all reference the vpu_blk_ctrl which itself references the vpumix.

Lucas,

You seem to know this driver pretty well. Do you expect the G1, G2, and H1 PGC's to all reference the vpumix, or do you expect the vpu_blk_ctrl to enable/disable the vpumix?

Quoted 24 lines

After applying the following changes to imx8mm.dtsi, the suspend/resume is working.

(quoted diff) +3 -0
@@ -739,16 +739,19 @@ pgc_vpumix: power-domain@6 {
        pgc_vpu_g1: power-domain@7 {
                #power-domain-cells = <0>;
                reg = <IMX8MM_POWER_DOMAIN_VPUG1>;
+               power-domains = <&pgc_vpumix>;
        };
 
        pgc_vpu_g2: power-domain@8 {
                #power-domain-cells = <0>;
                reg = <IMX8MM_POWER_DOMAIN_VPUG2>;
+               power-domains = <&pgc_vpumix>;
        };
 
        pgc_vpu_h1: power-domain@9 {
                #power-domain-cells = <0>;
                reg = <IMX8MM_POWER_DOMAIN_VPUH1>;
+               power-domains = <&pgc_vpumix>;
        };
 
 
Quoted 1 line

I will prepare the patch to send in the next couple of days.

Please CC me when post the patch, and I can run some tests on my hardware.

thanks

adam

Quoted 4 lines

Regards,
Vitor Soares

#3 lore raw

Hi Adam,

Am Mittwoch, dem 08.05.2024 um 12:30 -0500 schrieb Adam Ford:

Quoted 32 lines · vitor
Quoted 20 lines

Hi,

Quoted 15 lines · vitor

Greetings,

I'm trying to suspend/resume our Verdin iMX8M Mini with VPU IP using the latest 6.9.0-rc2 Kernel. While the system can suspend without issues, it hangs on the resume routine. After some investigation, I can
see the Kernel hanging on imx8m_blk_ctrl_power_on()[1] while resuming the hantro-vpu power domain.

Any hint about that?

[1]
https://elixir.bootlin.com/linux/v6.9-rc2/source/drivers/pmdomain/imx
/imx8m-blk-ctrl.c#L101

+ Lucas

Quoted 3 lines

Looking at other child nodes of the pgc node, pgc_vpu_[g1|g2|h1] seems to be nested into pgc_vpumix.

On the surface, that's how it appears and it would be consistent with how the GPU's work with the GPC's for each GPU calling the gpumix. However, the VPU's all reference the vpu_blk_ctrl which itself references the vpumix.

Quoted 6 lines

Lucas,

You seem to know this driver pretty well. Do you expect the G1, G2, and H1 PGC's to all reference the vpumix, or do you expect the vpu_blk_ctrl to enable/disable the vpumix?

Nope, that's incorrect, as discussed here:
https://lore.kernel.org/all/[email protected]/

Quoted 26 lines
Quoted 26 lines

After applying the following changes to imx8mm.dtsi, the suspend/resume is working.

(quoted diff) +3 -0
@@ -739,16 +739,19 @@ pgc_vpumix: power-domain@6 {
        pgc_vpu_g1: power-domain@7 {
                #power-domain-cells = <0>;
                reg = <IMX8MM_POWER_DOMAIN_VPUG1>;
+               power-domains = <&pgc_vpumix>;
        };
 
        pgc_vpu_g2: power-domain@8 {
                #power-domain-cells = <0>;
                reg = <IMX8MM_POWER_DOMAIN_VPUG2>;
+               power-domains = <&pgc_vpumix>;
        };
 
        pgc_vpu_h1: power-domain@9 {
                #power-domain-cells = <0>;
                reg = <IMX8MM_POWER_DOMAIN_VPUH1>;
+               power-domains = <&pgc_vpumix>;
        };
 
 
Quoted 3 lines
Quoted 1 line

I will prepare the patch to send in the next couple of days.

Please CC me when post the patch, and I can run some tests on my hardware.

The correct patch is already out:
https://lore.kernel.org/all/[email protected]/

Regards,
Lucas

#4 lore raw
Quoted 36 lines · Lucas Stach

Hi Adam,

Am Mittwoch, dem 08.05.2024 um 12:30 -0500 schrieb Adam Ford:

Quoted 32 lines · vitor
Quoted 20 lines

Hi,

Quoted 15 lines · vitor

Greetings,

I'm trying to suspend/resume our Verdin iMX8M Mini with VPU IP using the latest 6.9.0-rc2 Kernel. While the system can suspend without issues, it hangs on the resume routine. After some investigation, I can
see the Kernel hanging on imx8m_blk_ctrl_power_on()[1] while resuming the hantro-vpu power domain.

Any hint about that?

[1]
https://elixir.bootlin.com/linux/v6.9-rc2/source/drivers/pmdomain/imx
/imx8m-blk-ctrl.c#L101

+ Lucas

Quoted 3 lines

Looking at other child nodes of the pgc node, pgc_vpu_[g1|g2|h1] seems to be nested into pgc_vpumix.

On the surface, that's how it appears and it would be consistent with how the GPU's work with the GPC's for each GPU calling the gpumix. However, the VPU's all reference the vpu_blk_ctrl which itself references the vpumix.

Quoted 8 lines
Quoted 6 lines

Lucas,

You seem to know this driver pretty well. Do you expect the G1, G2, and H1 PGC's to all reference the vpumix, or do you expect the vpu_blk_ctrl to enable/disable the vpumix?

Nope, that's incorrect, as discussed here:
https://lore.kernel.org/all/[email protected]/

That's what I thought.

Quoted 27 lines
Quoted 27 lines
Quoted 27 lines

After applying the following changes to imx8mm.dtsi, the suspend/resume is working.

(quoted diff) +3 -0
@@ -739,16 +739,19 @@ pgc_vpumix: power-domain@6 {
        pgc_vpu_g1: power-domain@7 {
                #power-domain-cells = <0>;
                reg = <IMX8MM_POWER_DOMAIN_VPUG1>;
+               power-domains = <&pgc_vpumix>;
        };
 
        pgc_vpu_g2: power-domain@8 {
                #power-domain-cells = <0>;
                reg = <IMX8MM_POWER_DOMAIN_VPUG2>;
+               power-domains = <&pgc_vpumix>;
        };
 
        pgc_vpu_h1: power-domain@9 {
                #power-domain-cells = <0>;
                reg = <IMX8MM_POWER_DOMAIN_VPUH1>;
+               power-domains = <&pgc_vpumix>;
        };
 
 
Quoted 6 lines
Quoted 3 lines
Quoted 1 line

I will prepare the patch to send in the next couple of days.

Please CC me when post the patch, and I can run some tests on my hardware.

The correct patch is already out:
https://lore.kernel.org/all/[email protected]/

Thanks.

Quoted 3 lines

Regards,
Lucas