All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] soc: imx: gpcv2: Synchronously suspend MIX domains
@ 2021-10-16 21:05 Marek Vasut
  2021-10-17 19:40 ` Lucas Stach
  2021-11-21  2:24 ` Shawn Guo
  0 siblings, 2 replies; 4+ messages in thread
From: Marek Vasut @ 2021-10-16 21:05 UTC (permalink / raw)
  To: linux-arm-kernel
  Cc: Marek Vasut, Frieder Schrempf, Lucas Stach, NXP Linux Team,
	Peng Fan, Shawn Guo

In case the following power domain sequence happens, iMX8M Mini always hangs:
  gpumix:on -> gpu:on -> gpu:off -> gpu:on
This is likely due to another quirk of the GPC block. This situation can be
prevented by always synchronously powering off both the domain and MIX domain.
Make it so. This turns the aforementioned sequence into:
  gpumix:on -> gpu:on -> gpu:off -> gpumix:off -> gpumix:on -> gpu:on

Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Frieder Schrempf <frieder.schrempf@kontron.de>
Cc: Lucas Stach <l.stach@pengutronix.de>
Cc: NXP Linux Team <linux-imx@nxp.com>
Cc: Peng Fan <peng.fan@nxp.com>
Cc: Shawn Guo <shawnguo@kernel.org>
---
 drivers/soc/imx/gpcv2.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/soc/imx/gpcv2.c b/drivers/soc/imx/gpcv2.c
index b8d52d8d29db..e757044ab751 100644
--- a/drivers/soc/imx/gpcv2.c
+++ b/drivers/soc/imx/gpcv2.c
@@ -377,7 +377,7 @@ static int imx_pgc_power_down(struct generic_pm_domain *genpd)
 		}
 	}
 
-	pm_runtime_put(domain->dev);
+	pm_runtime_put_sync_suspend(domain->dev);
 
 	return 0;
 
-- 
2.33.0


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH] soc: imx: gpcv2: Synchronously suspend MIX domains
  2021-10-16 21:05 [PATCH] soc: imx: gpcv2: Synchronously suspend MIX domains Marek Vasut
@ 2021-10-17 19:40 ` Lucas Stach
  2021-10-18 12:11   ` Marek Vasut
  2021-11-21  2:24 ` Shawn Guo
  1 sibling, 1 reply; 4+ messages in thread
From: Lucas Stach @ 2021-10-17 19:40 UTC (permalink / raw)
  To: Marek Vasut, linux-arm-kernel
  Cc: Frieder Schrempf, NXP Linux Team, Peng Fan, Shawn Guo

Am Samstag, dem 16.10.2021 um 23:05 +0200 schrieb Marek Vasut:
> In case the following power domain sequence happens, iMX8M Mini always hangs:
>   gpumix:on -> gpu:on -> gpu:off -> gpu:on
> This is likely due to another quirk of the GPC block. This situation can be
> prevented by always synchronously powering off both the domain and MIX domain.
> Make it so. This turns the aforementioned sequence into:
>   gpumix:on -> gpu:on -> gpu:off -> gpumix:off -> gpumix:on -> gpu:on
> 
Did you test this with the reset sequence fixed? 2b2f106eb552 (Revert
"soc: imx: gpcv2: move reset assert after requesting domain power up")
in Shawns tree.

I don't like that this is slowing down the power-down sequence and I'm
not sure if it's required for the other domains, or if this is again a
GPU domain specific issue. However, if it's fixing a hang that isn't
solved by the proper reset sequence, I would say better safe than
sorry, and we can always optimize this later if possible.

Under the assumption that it's required even with the proper reset
sequence:
Acked-by: Lucas Stach <l.stach@pengutronix.de>

> Signed-off-by: Marek Vasut <marex@denx.de>
> Cc: Frieder Schrempf <frieder.schrempf@kontron.de>
> Cc: Lucas Stach <l.stach@pengutronix.de>
> Cc: NXP Linux Team <linux-imx@nxp.com>
> Cc: Peng Fan <peng.fan@nxp.com>
> Cc: Shawn Guo <shawnguo@kernel.org>
> ---
>  drivers/soc/imx/gpcv2.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/soc/imx/gpcv2.c b/drivers/soc/imx/gpcv2.c
> index b8d52d8d29db..e757044ab751 100644
> --- a/drivers/soc/imx/gpcv2.c
> +++ b/drivers/soc/imx/gpcv2.c
> @@ -377,7 +377,7 @@ static int imx_pgc_power_down(struct generic_pm_domain *genpd)
>  		}
>  	}
>  
> -	pm_runtime_put(domain->dev);
> +	pm_runtime_put_sync_suspend(domain->dev);
>  
>  	return 0;
>  



_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] soc: imx: gpcv2: Synchronously suspend MIX domains
  2021-10-17 19:40 ` Lucas Stach
@ 2021-10-18 12:11   ` Marek Vasut
  0 siblings, 0 replies; 4+ messages in thread
From: Marek Vasut @ 2021-10-18 12:11 UTC (permalink / raw)
  To: Lucas Stach, linux-arm-kernel
  Cc: Frieder Schrempf, NXP Linux Team, Peng Fan, Shawn Guo

On 10/17/21 9:40 PM, Lucas Stach wrote:
> Am Samstag, dem 16.10.2021 um 23:05 +0200 schrieb Marek Vasut:
>> In case the following power domain sequence happens, iMX8M Mini always hangs:
>>    gpumix:on -> gpu:on -> gpu:off -> gpu:on
>> This is likely due to another quirk of the GPC block. This situation can be
>> prevented by always synchronously powering off both the domain and MIX domain.
>> Make it so. This turns the aforementioned sequence into:
>>    gpumix:on -> gpu:on -> gpu:off -> gpumix:off -> gpumix:on -> gpu:on
>>
> Did you test this with the reset sequence fixed? 2b2f106eb552 (Revert
> "soc: imx: gpcv2: move reset assert after requesting domain power up")
> in Shawns tree.

It is also in next, so yes.

> I don't like that this is slowing down the power-down sequence and I'm
> not sure if it's required for the other domains, or if this is again a
> GPU domain specific issue.

That's why I CCed NXP, they might provide clarification.

> However, if it's fixing a hang that isn't
> solved by the proper reset sequence, I would say better safe than
> sorry, and we can always optimize this later if possible.

I have this feeling we will be optimizing them until we end up keeping 
them on all the time, because of the constant quirks ... I hope I am 
wrong about this.

> Under the assumption that it's required even with the proper reset
> sequence:
> Acked-by: Lucas Stach <l.stach@pengutronix.de>

[...]

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] soc: imx: gpcv2: Synchronously suspend MIX domains
  2021-10-16 21:05 [PATCH] soc: imx: gpcv2: Synchronously suspend MIX domains Marek Vasut
  2021-10-17 19:40 ` Lucas Stach
@ 2021-11-21  2:24 ` Shawn Guo
  1 sibling, 0 replies; 4+ messages in thread
From: Shawn Guo @ 2021-11-21  2:24 UTC (permalink / raw)
  To: Marek Vasut
  Cc: linux-arm-kernel, Frieder Schrempf, Lucas Stach, NXP Linux Team,
	Peng Fan

On Sat, Oct 16, 2021 at 11:05:47PM +0200, Marek Vasut wrote:
> In case the following power domain sequence happens, iMX8M Mini always hangs:
>   gpumix:on -> gpu:on -> gpu:off -> gpu:on
> This is likely due to another quirk of the GPC block. This situation can be
> prevented by always synchronously powering off both the domain and MIX domain.
> Make it so. This turns the aforementioned sequence into:
>   gpumix:on -> gpu:on -> gpu:off -> gpumix:off -> gpumix:on -> gpu:on
> 
> Signed-off-by: Marek Vasut <marex@denx.de>
> Cc: Frieder Schrempf <frieder.schrempf@kontron.de>
> Cc: Lucas Stach <l.stach@pengutronix.de>
> Cc: NXP Linux Team <linux-imx@nxp.com>
> Cc: Peng Fan <peng.fan@nxp.com>
> Cc: Shawn Guo <shawnguo@kernel.org>

Applied, thanks.

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2021-11-21  2:25 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-10-16 21:05 [PATCH] soc: imx: gpcv2: Synchronously suspend MIX domains Marek Vasut
2021-10-17 19:40 ` Lucas Stach
2021-10-18 12:11   ` Marek Vasut
2021-11-21  2:24 ` Shawn Guo

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.