From: Brady Norander <brady.norander@mainlining.org>
To: AngeloGioacchino Del Regno
<angelogioacchino.delregno@collabora.com>,
Dmitry Osipenko <dmitry.osipenko@collabora.com>,
Ulf Hansson <ulfh@kernel.org>,
Matthias Brugger <matthias.bgg@gmail.com>
Cc: linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org,
linux-arm-kernel@lists.infradead.org,
linux-mediatek@lists.infradead.org
Subject: Re: [PATCH v1] pmdomain: mediatek: Fix MT8183 hang on boot
Date: Mon, 27 Jul 2026 13:38:53 -0400 [thread overview]
Message-ID: <847c99d4-6fae-4984-b6d9-e1f8bf46b300@mainlining.org> (raw)
In-Reply-To: <dd1e30ae-46fd-4083-a306-98e2d23be120@collabora.com>
On 7/27/26 06:57, AngeloGioacchino Del Regno wrote:
> On 7/25/26 07:11, Brady Norander wrote:
>> On 7/22/26 09:27, Dmitry Osipenko wrote:
>>> Depending on firmware, part of the MFG domains may be left ON at boot
>>> leaving only some MFG cores powered, to let the ACP to prefetch the GPU
>>> region when the display controller is brought up. This doesn't play well
>>> with an eventual delay in probing Panfrost 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 this from
>>> happening, the sync_state() functionality 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.
>>
>> I also saw this same issue on my MT8192 Hayato Chromebook, and I also
>> saw an issue on my MT8183 and MT8186 Chromebooks where the audio was
>> broken. I fixed all of those issues by setting the
>> GENPD_FLAG_NO_STAY_ON flag on all domains. I held off from submitting
>> that change as I was unsure if it was the "correct" way to handle it,
>> but perhaps it is. Either way, this issue is not specific to only MT8183.
>
> Audio is something a bit different I believe.
>
> For MFG on MT8183 specifically (and potentially same generation or even
> slightly
> older) there's an issue that is very specific and described in the
> description
> of this commit.
>
I do believe that the issue I'm seeing on MT8192 is very similar to the
issue described on MT8183. On my MT8192 Hayato, I get the following
sync_state warnings due to these two display components not having
drivers which bind to them:
[ 25.828186] mtk-power-controller 10006000.syscon:power-controller:
sync_state() pending due to 1400d000.postmask
[ 25.838380] mtk-power-controller 10006000.syscon:power-controller:
sync_state() pending due to 1400e000.dither
This device boots just fine up until I reach the point where my display
manager starts, where I get a full SoC hang. If I disable my display
manager from starting at boot, the device boots to a shell just fine.
While MT8192 doesn't have ACP to prefetch anything from the GPU, the
display manager (which uses 3D accel) still appears to trigger an AXI
stall (I don't know how to verify this is actually what happens, but it
seems likely) and I would assume the bootloader also leaves the MFG
domains partially enabled on MT8192 based on this behavior.
> So, specifically for audio, I think that there may be something else
> that is
> wrong if you're seeing such a behavior - as in, some dependencies may be
> missing
> from somewhere (some devicetree node), or something else.
>
The audio issues I see on MT8183 and MT8186 also seem to have the same
root cause, the bootloader leaving domains partially enabled. On my
MT8183 krane I get these warnings:
[ 21.705672] mtk-power-controller 10006000.syscon:power-controller:
sync_state() pending due to 14005000.dma-controller
[ 21.705677] mtk-power-controller 10006000.syscon:power-controller:
sync_state() pending due to 14006000.mdp3-wdma
[ 21.705688] mtk-power-controller 10006000.syscon:power-controller:
sync_state() pending due to 14012000.dither
And I get this error when attempting to play audio:
[ 217.282793] mt8183-audio 11220000.audio-controller:mt8183-afe-pcm:
mtk_afe_pcm_pointer hw_ptr err
In both the MT8192 GPU case and the MT8183/8186 audio case, the issue
was fixed with the following diff to not use the sync_state system to
keep domains powered on:
diff --git a/drivers/pmdomain/mediatek/mtk-pm-domains.c
b/drivers/pmdomain/mediatek/mtk-pm-domains.c
index 9c9323c8c93a..b0868e24e241 100644
--- a/drivers/pmdomain/mediatek/mtk-pm-domains.c
+++ b/drivers/pmdomain/mediatek/mtk-pm-domains.c
@@ -639,6 +639,7 @@ generic_pm_domain *scpsys_add_one_domain(struct
scpsys *scpsys, struct device_no
pd->genpd.power_off = scpsys_power_off;
pd->genpd.power_on = scpsys_power_on;
+ pd->genpd.flags |= GENPD_FLAG_NO_STAY_ON;
if (MTK_SCPD_CAPS(pd, MTK_SCPD_ACTIVE_WAKEUP))
pd->genpd.flags |= GENPD_FLAG_ACTIVE_WAKEUP;
What isn't clear to me is why leaving display domains powered on is
preventing audio from working. Maybe there is some dependency that isn't
clear to me? The other thing which isn't clear to me is why I never
experienced the boot hang on MT8183. Either way, I'm experiencing issues
on multiple SoCs which are fixed by allowing the domains to power off
and back on.
> In any case, I'm always open for discussion, of course.
prev parent reply other threads:[~2026-07-27 17:39 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-07-22 13:27 [PATCH v1] pmdomain: mediatek: Fix MT8183 hang on boot Dmitry Osipenko
2026-07-22 14:31 ` AngeloGioacchino Del Regno
2026-07-24 15:01 ` Ulf Hansson
2026-07-27 11:04 ` AngeloGioacchino Del Regno
2026-07-27 16:48 ` Ulf Hansson
2026-07-25 5:11 ` Brady Norander
2026-07-27 10:57 ` AngeloGioacchino Del Regno
2026-07-27 17:38 ` Brady Norander [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=847c99d4-6fae-4984-b6d9-e1f8bf46b300@mainlining.org \
--to=brady.norander@mainlining.org \
--cc=angelogioacchino.delregno@collabora.com \
--cc=dmitry.osipenko@collabora.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mediatek@lists.infradead.org \
--cc=linux-pm@vger.kernel.org \
--cc=matthias.bgg@gmail.com \
--cc=ulfh@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox