Re: [PATCH v2] pmdomain: mediatek: Fix mt8183 hang on boot
Ulf Hansson <[email protected]> Tue, 4 Aug 2026 16:37:57 +0200
| Newsgroups | org.infradead.lists.linux-mediatek,org.infradead.lists.linux-arm-kernel,org.kernel.vger.linux-kernel,org.kernel.vger.linux-pm |
|---|---|
| Message-ID | <CAPx+jO--DskGufFZyhObH_t+H_idykV0gBPqPC6=g5uFUAJeRQ@mail.gmail.com> |
On Wed, Jul 29, 2026 at 3:00=E2=80=AFPM Dmitry Osipenko <[email protected]> wrote: > > Depending on firmware, part of the MFG domains may be partially left ON > at boot time with kernel detecting PD as ON, while it's OFF. > > Some of MFG cores may be left powered after bootloader, to let the ACP to > prefetch the GPU region when the display controller is brought up for a > continuous splash animation performed by downstream stack. > > This doesn't play well with an eventual delay in probing upstream Panfros= t > driver when the display controller is fully set up, as that would make > genpd's sync_state() to power off the domain while ACP tries to prefetch: > this is causing an AXI stall, effectively freezing the AP indefinitely. > > In order to prevent trouble from happening, the sync_state() functionalit= y > must be obliterated on all of the MFG domains: while this guarantees a > power leakage if the bootloader boots the kernel with MFG PDs partially > powered on, this is the only way to ensure stable operation of the SoC > during boot on devices with such firmware because, of course, those will > never officially receive a firmware update. > > Fixes Kappa Chromebook hanging during system boot. > > Fixes: 0e789b491ba0 ("pmdomain: core: Leave powered-on genpds on until sy= nc_state") > Fixes: 13a4b7fb6260 ("pmdomain: core: Leave powered-on genpds on until la= te_initcall_sync") > Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collab= ora.com> > Signed-off-by: Dmitry Osipenko <[email protected]> Applied for fixes and by adding a stable tag, thanks! Kind regards Uffe > --- > > v2 - Expanded commit message with more clarification about kernel wrongly > detecting PD state left after bootloader. > > drivers/pmdomain/mediatek/mt8183-pm-domains.h | 7 +++++-- > 1 file changed, 5 insertions(+), 2 deletions(-) > > diff --git a/drivers/pmdomain/mediatek/mt8183-pm-domains.h b/drivers/pmdo= main/mediatek/mt8183-pm-domains.h > index 3742782a2702..5e33b8628e85 100644 > --- a/drivers/pmdomain/mediatek/mt8183-pm-domains.h > +++ b/drivers/pmdomain/mediatek/mt8183-pm-domains.h > @@ -47,7 +47,7 @@ static const struct scpsys_domain_data scpsys_domain_da= ta_mt8183[] =3D { > .pwr_sta2nd_offs =3D 0x0184, > .sram_pdn_bits =3D 0, > .sram_pdn_ack_bits =3D 0, > - .caps =3D MTK_SCPD_DOMAIN_SUPPLY, > + .caps =3D MTK_SCPD_DOMAIN_SUPPLY | MTK_SCPD_KEEP_DEFAULT_= OFF, > }, > [MT8183_POWER_DOMAIN_MFG] =3D { > .name =3D "mfg", > @@ -57,7 +57,7 @@ static const struct scpsys_domain_data scpsys_domain_da= ta_mt8183[] =3D { > .pwr_sta2nd_offs =3D 0x0184, > .sram_pdn_bits =3D GENMASK(8, 8), > .sram_pdn_ack_bits =3D GENMASK(12, 12), > - .caps =3D MTK_SCPD_DOMAIN_SUPPLY, > + .caps =3D MTK_SCPD_DOMAIN_SUPPLY | MTK_SCPD_KEEP_DEFAULT_= OFF, > }, > [MT8183_POWER_DOMAIN_MFG_CORE0] =3D { > .name =3D "mfg_core0", > @@ -67,6 +67,7 @@ static const struct scpsys_domain_data scpsys_domain_da= ta_mt8183[] =3D { > .pwr_sta2nd_offs =3D 0x0184, > .sram_pdn_bits =3D GENMASK(8, 8), > .sram_pdn_ack_bits =3D GENMASK(12, 12), > + .caps =3D MTK_SCPD_KEEP_DEFAULT_OFF, > }, > [MT8183_POWER_DOMAIN_MFG_CORE1] =3D { > .name =3D "mfg_core1", > @@ -76,6 +77,7 @@ static const struct scpsys_domain_data scpsys_domain_da= ta_mt8183[] =3D { > .pwr_sta2nd_offs =3D 0x0184, > .sram_pdn_bits =3D GENMASK(8, 8), > .sram_pdn_ack_bits =3D GENMASK(12, 12), > + .caps =3D MTK_SCPD_KEEP_DEFAULT_OFF, > }, > [MT8183_POWER_DOMAIN_MFG_2D] =3D { > .name =3D "mfg_2d", > @@ -85,6 +87,7 @@ static const struct scpsys_domain_data scpsys_domain_da= ta_mt8183[] =3D { > .pwr_sta2nd_offs =3D 0x0184, > .sram_pdn_bits =3D GENMASK(8, 8), > .sram_pdn_ack_bits =3D GENMASK(12, 12), > + .caps =3D MTK_SCPD_KEEP_DEFAULT_OFF, > .bp_cfg =3D { > BUS_PROT_WR(INFRA, > MT8183_TOP_AXI_PROT_EN_1_MFG, > -- > 2.54.0 >