From: sashiko-bot@kernel.org
To: "Dario Binacchi" <dario.binacchi@amarulasolutions.com>
Cc: imx@lists.linux.dev, Frank.Li@kernel.org
Subject: Re: [PATCH v3 3/4] pmdomain: imx8m-blk-ctrl: Keep the domains left on by the bootloader
Date: Sun, 22 Nov 2026 16:09:13 +0000 [thread overview]
Message-ID: <sashiko-outbox-228085@kernel.org> (raw)
In-Reply-To: <20261122155514.10289-4-dario.binacchi@amarulasolutions.com>
Thank you for your contribution! Sashiko AI review found 1 potential
issue to consider:
- [High] pmdomain: imx8m-blk-ctrl: bus domain powered without notifier
in probe()
--
commit f992fc5ceac2e326f3584945dd2bae1b81d7e7b6
Author: Dario Binacchi <dario.binacchi@amarulasolutions.com>
pmdomain: imx8m-blk-ctrl: Keep the domains left on by the bootloader
This patch reads the blk-ctrl registers during probe on i.MX8MN DISP
blk-ctrl to detect domains left on by the bootloader and registers them
as active with runtime PM and interconnect references held.
> diff --git a/drivers/pmdomain/imx/imx8m-blk-ctrl.c b/drivers/pmdomain/imx/imx8m-blk-ctrl.c
> index 7d6735728d8c6..99d75bfb69e9b 100644
> --- a/drivers/pmdomain/imx/imx8m-blk-ctrl.c
> +++ b/drivers/pmdomain/imx/imx8m-blk-ctrl.c
[ ... ]
> @@ -250,6 +322,17 @@ static int imx8m_blk_ctrl_probe(struct platform_device *pdev)
> "failed to attach power domain \"bus\"\n");
> }
>
> + if (bc_data->boot_state_readable) {
> + /* Keep the bus domain on while the state is read */
> + ret = pm_runtime_resume_and_get(bc->bus_power_dev);
> + if (ret < 0) {
> + dev_err_probe(dev, ret,
> + "failed to power up bus domain\n");
> + dev_pm_domain_detach(bc->bus_power_dev, true);
> + return ret;
> + }
> + }
> +
[ ... ]
> @@ -347,6 +444,9 @@ static int imx8m_blk_ctrl_probe(struct platform_device *pdev)
> if (ret)
> goto cleanup_notifier;
>
> + if (bc_data->boot_state_readable)
> + pm_runtime_put(bc->bus_power_dev);
> +
> return 0;
>
> cleanup_notifier:
> @@ -356,9 +456,13 @@ static int imx8m_blk_ctrl_probe(struct platform_device *pdev)
> cleanup_pds:
> for (i--; i >= 0; i--) {
> pm_genpd_remove(&bc->domains[i].genpd);
> + imx8m_blk_ctrl_put_boot_on(&bc->domains[i]);
> dev_pm_domain_detach(bc->domains[i].power_dev, true);
> }
>
> + if (bc_data->boot_state_readable)
> + pm_runtime_put_sync(bc->bus_power_dev);
> +
> dev_pm_domain_detach(bc->bus_power_dev, true);
>
> return ret;
[Severity: High]
Does resuming bc->bus_power_dev here before dev_pm_genpd_add_notifier()
skip imx8mn_disp_power_notifier(GENPD_NOTIFY_ON) when the bootloader
leaves DISPMIX powered off?
When pgc_dispmix is initially off, powering up bc->bus_power_dev without
bc->power_nb registered leaves the DISPMIX bus clock (BLK_CLK_EN BIT(8))
gated and bus reset (BLK_SFT_RSTN BIT(8)) asserted for the GPC ADB400
power-up handshake. Because the temporary reference is only dropped at
the end of imx8m_blk_ctrl_probe() via asynchronous pm_runtime_put(), any
consumer domain that powers on after of_genpd_add_provider_onecell() or
devm_of_platform_populate() while bc->bus_power_dev is still active will
not trigger GENPD_NOTIFY_ON either, leaving the display bus in reset.
Similarly, on the probe failure paths, bc->power_nb is either not yet
registered or already removed at cleanup_notifier before
imx8m_blk_ctrl_put_boot_on() and pm_runtime_put_sync(bc->bus_power_dev)
power down the bus domain, skipping GENPD_NOTIFY_PRE_OFF and causing the
GPC ADB400 power-down handshake to time out.
Could dev_pm_genpd_add_notifier() be registered before
pm_runtime_resume_and_get(bc->bus_power_dev) and removed after
pm_runtime_put_sync(bc->bus_power_dev) in the error path, matching
imx8m_blk_ctrl_remove()?
--
Sashiko AI review · https://sashiko.dev/#/patchset/20261122155514.10289-1-dario.binacchi@amarulasolutions.com?part=3
next prev parent reply other threads:[~2026-11-22 16:09 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-22 15:55 [PATCH v3 0/4] pmdomain: imx: Keep the domains left on by the bootloader Dario Binacchi
2026-11-22 15:55 ` [PATCH v3 1/4] pmdomain: imx8m-blk-ctrl: Remove the power notifier on probe failure Dario Binacchi
2026-11-22 15:55 ` [PATCH v3 2/4] pmdomain: imx: gpcv2: Keep the domains left on by the bootloader Dario Binacchi
2026-11-22 15:55 ` [PATCH v3 3/4] pmdomain: imx8m-blk-ctrl: " Dario Binacchi
2026-11-22 16:09 ` sashiko-bot [this message]
2026-11-22 15:55 ` [PATCH v3 4/4] pmdomain: imx8m-blk-ctrl: Hold boot-on domain clocks until sync_state Dario Binacchi
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=sashiko-outbox-228085@kernel.org \
--to=sashiko-bot@kernel.org \
--cc=Frank.Li@kernel.org \
--cc=dario.binacchi@amarulasolutions.com \
--cc=imx@lists.linux.dev \
--cc=sashiko-reviews@lists.linux.dev \
/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