[PATCH] pmdomain: samsung: Fix splash-screen handover by enforcing a sync_state

Ulf Hansson posted 1 patch 2 months, 3 weeks ago
drivers/pmdomain/samsung/exynos-pm-domains.c | 9 +++++++++
1 file changed, 9 insertions(+)
[PATCH] pmdomain: samsung: Fix splash-screen handover by enforcing a sync_state
Posted by Ulf Hansson 2 months, 3 weeks ago
It's has been reported that some Samsung platforms fails to boot with
genpd's new sync_state support.

Typically the problem exists for platforms where bootloaders are turning on
the splash-screen and handing it over to be managed by the kernel. However,
at this point, it's not clear how to correctly solve the problem.

Although, to make the platforms boot again, let's add a temporary hack in
the samsung power-domain provider driver, which enforces a sync_state that
allows the power-domains to be reset before consumer devices starts to be
attached.

Reported-by: Marek Szyprowski <m.szyprowski@samsung.com>
Link: https://lore.kernel.org/all/212a1a56-08a5-48a5-9e98-23de632168d0@samsung.com
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
---
 drivers/pmdomain/samsung/exynos-pm-domains.c | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/drivers/pmdomain/samsung/exynos-pm-domains.c b/drivers/pmdomain/samsung/exynos-pm-domains.c
index 9b502e8751d1..5d478bb37ad6 100644
--- a/drivers/pmdomain/samsung/exynos-pm-domains.c
+++ b/drivers/pmdomain/samsung/exynos-pm-domains.c
@@ -147,6 +147,15 @@ static int exynos_pd_probe(struct platform_device *pdev)
 				parent.np, child.np);
 	}
 
+	/*
+	 * Some Samsung platforms with bootloaders turning on the splash-screen
+	 * and handing it over to the kernel, requires the power-domains to be
+	 * reset during boot. As a temporary hack to manage this, let's enforce
+	 * a sync_state.
+	 */
+	if (!ret)
+		of_genpd_sync_state(np);
+
 	pm_runtime_enable(dev);
 	return ret;
 }
-- 
2.43.0
Re: [PATCH] pmdomain: samsung: Fix splash-screen handover by enforcing a sync_state
Posted by Ulf Hansson 2 months, 3 weeks ago
On Fri, 11 Jul 2025 at 13:47, Ulf Hansson <ulf.hansson@linaro.org> wrote:
>
> It's has been reported that some Samsung platforms fails to boot with
> genpd's new sync_state support.
>
> Typically the problem exists for platforms where bootloaders are turning on
> the splash-screen and handing it over to be managed by the kernel. However,
> at this point, it's not clear how to correctly solve the problem.
>
> Although, to make the platforms boot again, let's add a temporary hack in
> the samsung power-domain provider driver, which enforces a sync_state that
> allows the power-domains to be reset before consumer devices starts to be
> attached.
>
> Reported-by: Marek Szyprowski <m.szyprowski@samsung.com>
> Link: https://lore.kernel.org/all/212a1a56-08a5-48a5-9e98-23de632168d0@samsung.com
> Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>

Marek, Krzysztof thanks for reviewing and testing!

I have applied for this for next!

Kind regards
Uffe

> ---
>  drivers/pmdomain/samsung/exynos-pm-domains.c | 9 +++++++++
>  1 file changed, 9 insertions(+)
>
> diff --git a/drivers/pmdomain/samsung/exynos-pm-domains.c b/drivers/pmdomain/samsung/exynos-pm-domains.c
> index 9b502e8751d1..5d478bb37ad6 100644
> --- a/drivers/pmdomain/samsung/exynos-pm-domains.c
> +++ b/drivers/pmdomain/samsung/exynos-pm-domains.c
> @@ -147,6 +147,15 @@ static int exynos_pd_probe(struct platform_device *pdev)
>                                 parent.np, child.np);
>         }
>
> +       /*
> +        * Some Samsung platforms with bootloaders turning on the splash-screen
> +        * and handing it over to the kernel, requires the power-domains to be
> +        * reset during boot. As a temporary hack to manage this, let's enforce
> +        * a sync_state.
> +        */
> +       if (!ret)
> +               of_genpd_sync_state(np);
> +
>         pm_runtime_enable(dev);
>         return ret;
>  }
> --
> 2.43.0
>
Re: [PATCH] pmdomain: samsung: Fix splash-screen handover by enforcing a sync_state
Posted by Krzysztof Kozlowski 2 months, 3 weeks ago
On 11/07/2025 13:47, Ulf Hansson wrote:
> It's has been reported that some Samsung platforms fails to boot with
> genpd's new sync_state support.
> 
> Typically the problem exists for platforms where bootloaders are turning on
> the splash-screen and handing it over to be managed by the kernel. However,
> at this point, it's not clear how to correctly solve the problem.
> 
> Although, to make the platforms boot again, let's add a temporary hack in
> the samsung power-domain provider driver, which enforces a sync_state that
> allows the power-domains to be reset before consumer devices starts to be
> attached.
> 
> Reported-by: Marek Szyprowski <m.szyprowski@samsung.com>
> Link: https://lore.kernel.org/all/212a1a56-08a5-48a5-9e98-23de632168d0@samsung.com
> Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
> ---

Acked-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>

Best regards,
Krzysztof
Re: [PATCH] pmdomain: samsung: Fix splash-screen handover by enforcing a sync_state
Posted by Marek Szyprowski 2 months, 3 weeks ago
On 11.07.2025 13:47, Ulf Hansson wrote:
> It's has been reported that some Samsung platforms fails to boot with
> genpd's new sync_state support.
>
> Typically the problem exists for platforms where bootloaders are turning on
> the splash-screen and handing it over to be managed by the kernel. However,
> at this point, it's not clear how to correctly solve the problem.
>
> Although, to make the platforms boot again, let's add a temporary hack in
> the samsung power-domain provider driver, which enforces a sync_state that
> allows the power-domains to be reset before consumer devices starts to be
> attached.
>
> Reported-by: Marek Szyprowski <m.szyprowski@samsung.com>
> Link: https://lore.kernel.org/all/212a1a56-08a5-48a5-9e98-23de632168d0@samsung.com
> Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>

This fixes the issue and seems to be a good workaround for now. Thanks!

Tested-by: Marek Szyprowski <m.szyprowski@samsung.com>

I will work on the proper fix in 2 weeks after getting back from holidays.


> ---
>   drivers/pmdomain/samsung/exynos-pm-domains.c | 9 +++++++++
>   1 file changed, 9 insertions(+)
>
> diff --git a/drivers/pmdomain/samsung/exynos-pm-domains.c b/drivers/pmdomain/samsung/exynos-pm-domains.c
> index 9b502e8751d1..5d478bb37ad6 100644
> --- a/drivers/pmdomain/samsung/exynos-pm-domains.c
> +++ b/drivers/pmdomain/samsung/exynos-pm-domains.c
> @@ -147,6 +147,15 @@ static int exynos_pd_probe(struct platform_device *pdev)
>   				parent.np, child.np);
>   	}
>   
> +	/*
> +	 * Some Samsung platforms with bootloaders turning on the splash-screen
> +	 * and handing it over to the kernel, requires the power-domains to be
> +	 * reset during boot. As a temporary hack to manage this, let's enforce
> +	 * a sync_state.
> +	 */
> +	if (!ret)
> +		of_genpd_sync_state(np);
> +
>   	pm_runtime_enable(dev);
>   	return ret;
>   }

Best regards
-- 
Marek Szyprowski, PhD
Samsung R&D Institute Poland