From: sashiko-bot@kernel.org
To: "AngeloGioacchino Del Regno" <angelogioacchino.delregno@collabora.com>
Cc: devicetree@vger.kernel.org, dri-devel@lists.freedesktop.org,
robh@kernel.org, conor+dt@kernel.org
Subject: Re: [PATCH v5 09/11] drm/mediatek: mtk_dsi: Enable PM Runtime on probe
Date: Wed, 15 Jul 2026 12:16:10 +0000 [thread overview]
Message-ID: <20260715121611.420601F000E9@smtp.kernel.org> (raw)
In-Reply-To: <20260715114916.19690-10-angelogioacchino.delregno@collabora.com>
Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [Critical] Enabling PM runtime causes a kernel panic because the DSI device is never resumed, leaving its power domain off during register access.
--
--- Patch [9]: [PATCH v5 09/11] drm/mediatek: mtk_dsi: Enable PM Runtime on probe ---
commit a4d6ef16908de6080f4fae3e792889c6f09b7a22
Author: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
drm/mediatek: mtk_dsi: Enable PM Runtime on probe
This commit enables PM runtime for the Mediatek DSI device during probe.
It assumes the display pipeline's power-on functions will handle resuming
and suspending the DSI device to manage its power domains.
> diff --git a/drivers/gpu/drm/mediatek/mtk_dsi.c b/drivers/gpu/drm/mediatek/mtk_dsi.c
> index 4d8a02cbee385..dc0c4e867179c 100644
> --- a/drivers/gpu/drm/mediatek/mtk_dsi.c
> +++ b/drivers/gpu/drm/mediatek/mtk_dsi.c
> @@ -1733,6 +1733,10 @@ static int mtk_dsi_probe(struct platform_device *pdev)
> if (ret)
> return dev_err_probe(&pdev->dev, ret, "Failed to request DSI irq\n");
>
> + ret = devm_pm_runtime_enable(dev);
> + if (ret)
> + return ret;
[Severity: Critical]
Will this cause a kernel panic when the DSI registers are accessed later?
The commit message indicates that mtk_ddp_comp_power_on() will handle
resuming the DSI device. However, looking at the display initialization,
mtk_crtc_atomic_enable() only powers on the first component in the pipeline:
drivers/gpu/drm/mediatek/mtk_crtc.c:mtk_crtc_atomic_enable() {
...
struct mtk_ddp_comp *comp = mtk_crtc->ddp_comp[0];
...
ret = mtk_ddp_comp_power_on(comp);
...
}
Since ddp_comp[0] is typically an OVL or RDMA component rather than the DSI,
the DSI device is never resumed and remains in the RPM_SUSPENDED state
with its power domain off.
When mtk_dsi_poweron() is subsequently called, it attempts to access the
suspended hardware registers:
drivers/gpu/drm/mediatek/mtk_dsi.c:mtk_dsi_poweron() {
...
mtk_dsi_enable(dsi);
/* Bypass shadow and force commit only if the register is present */
if (data->reg_adv[DSI_SHADOW_DEBUG])
writel(FORCE_COMMIT | BYPASS_SHADOW,
dsi->regs + data->reg_adv[DSI_SHADOW_DEBUG]);
mtk_dsi_reset_engine(dsi);
mtk_dsi_phy_timconfig(dsi);
...
}
Does mtk_dsi_poweron() or an earlier path need to call
pm_runtime_resume_and_get() directly before accessing these registers to
prevent a synchronous external abort?
> +
> ret = mipi_dsi_host_register(&dsi->host);
> if (ret < 0)
> return dev_err_probe(dev, ret, "Failed to register DSI host\n");
--
Sashiko AI review · https://sashiko.dev/#/patchset/20260715114916.19690-1-angelogioacchino.delregno@collabora.com?part=9
next prev parent reply other threads:[~2026-07-15 12:16 UTC|newest]
Thread overview: 25+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-07-15 11:49 [PATCH v5 00/11] drm/mediatek: Add DSC, WDMA, MT8189/96 DSI support AngeloGioacchino Del Regno
2026-07-15 11:49 ` [PATCH v5 01/11] dt-bindings: display: mediatek: dsc: Add MT8196 compatible AngeloGioacchino Del Regno
2026-07-15 11:49 ` [PATCH v5 02/11] drm/mediatek: Implement Display Stream Compression support AngeloGioacchino Del Regno
2026-07-15 12:02 ` sashiko-bot
2026-07-15 12:08 ` AngeloGioacchino Del Regno
2026-07-15 11:49 ` [PATCH v5 03/11] dt-bindings: display: mediatek: dsi: Document MT8189 and MT8196 AngeloGioacchino Del Regno
2026-07-15 11:49 ` [PATCH v5 04/11] drm/mediatek: mtk_dsi: Cleanup encoder if reset fails during bind AngeloGioacchino Del Regno
2026-07-15 11:49 ` [PATCH v5 05/11] drm/mediatek: mtk_dsi: Enable interrupt at component bind time AngeloGioacchino Del Regno
2026-07-15 12:04 ` sashiko-bot
2026-07-15 12:08 ` AngeloGioacchino Del Regno
2026-07-15 11:49 ` [PATCH v5 06/11] drm/mediatek: mtk_dsi: Transfer register offsets to per-SoC const AngeloGioacchino Del Regno
2026-07-15 11:49 ` [PATCH v5 07/11] drm/mediatek: mtk_dsi: Add support for MT8189 AngeloGioacchino Del Regno
2026-07-15 12:07 ` sashiko-bot
2026-07-15 12:12 ` AngeloGioacchino Del Regno
2026-07-15 11:49 ` [PATCH v5 08/11] drm/mediatek: mtk_dsi: Add support for MT8196 AngeloGioacchino Del Regno
2026-07-15 12:08 ` sashiko-bot
2026-07-15 12:16 ` AngeloGioacchino Del Regno
2026-07-15 11:49 ` [PATCH v5 09/11] drm/mediatek: mtk_dsi: Enable PM Runtime on probe AngeloGioacchino Del Regno
2026-07-15 12:16 ` sashiko-bot [this message]
2026-07-15 12:21 ` AngeloGioacchino Del Regno
2026-07-15 11:49 ` [PATCH v5 10/11] dt-bindings: display: mediatek: wdma: Add compatibles for more SoCs AngeloGioacchino Del Regno
2026-07-15 12:15 ` sashiko-bot
2026-07-15 12:19 ` AngeloGioacchino Del Regno
2026-07-15 11:49 ` [PATCH v5 11/11] drm/mediatek: Add Write DMA (WDMA) Engine for Writeback support AngeloGioacchino Del Regno
2026-07-15 12:28 ` sashiko-bot
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=20260715121611.420601F000E9@smtp.kernel.org \
--to=sashiko-bot@kernel.org \
--cc=angelogioacchino.delregno@collabora.com \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=dri-devel@lists.freedesktop.org \
--cc=robh@kernel.org \
--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