Devicetree
 help / color / mirror / Atom feed
From: sashiko-bot@kernel.org
To: "AngeloGioacchino Del Regno" <angelogioacchino.delregno@collabora.com>
Cc: conor+dt@kernel.org, robh@kernel.org,
	dri-devel@lists.freedesktop.org, devicetree@vger.kernel.org
Subject: Re: [PATCH v9 05/13] drm/mediatek: mtk_dsi: Enable interrupt at component bind time
Date: Wed, 16 Sep 2026 11:20:42 +0000	[thread overview]
Message-ID: <20260916112043.056C71F0089D@smtp.kernel.org> (raw)
In-Reply-To: <20260916110825.102631-6-angelogioacchino.delregno@collabora.com>

Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [High] drm/mediatek: mtk_dsi: IRQ enablement in bind leaves hardware unclocked
--

commit 341145986d590feda3b9b8dd572d45aaa3bc1404
Author: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>

drm/mediatek: mtk_dsi: Enable interrupt at component bind time

This patch changes the DSI interrupt to be requested with IRQF_NO_AUTOEN
during probe, deferring its enablement to the component bind phase.
It aims to prevent interrupt storms or premature hardware resets before
the display controller is fully bound and ready.

> diff --git a/drivers/gpu/drm/mediatek/mtk_dsi.c b/drivers/gpu/drm/mediatek/mtk_dsi.c
> index 28ba532210ff5..6ac6daa61e684 100644
> --- a/drivers/gpu/drm/mediatek/mtk_dsi.c
> +++ b/drivers/gpu/drm/mediatek/mtk_dsi.c
[ ... ]
> @@ -1101,6 +1102,8 @@ static int mtk_dsi_bind(struct device *dev, struct device *master, void *data)
>  		return ret;
>  	}
>  
> +	enable_irq(dsi->irq);

[Severity: High]
Does enabling the IRQ here leave the hardware vulnerable to unclocked MMIO
reads if an interrupt fires before power-on?

The hardware clocks (engine_clk, digital_clk) are not enabled until
mtk_dsi_poweron() is called. If an interrupt fires immediately after this
enable_irq() call, or during any power-off state where mtk_dsi_poweroff() has
been called (since disable_irq() is only in mtk_dsi_unbind()), the interrupt
handler mtk_dsi_irq() will execute:

mtk_dsi_irq() {
    ...
    status = readl(dsi->regs + DSI_INTSTA) & flag;
    ...
}

On MediaTek SoCs, reading unclocked APB/AHB registers like DSI_INTSTA can
cause a bus hang resulting in a synchronous external abort (kernel panic).

Could this happen consistently if the bootloader asserts the interrupt, or
randomly during suspend/DPMS off if a spurious interrupt occurs?

> +
>  	return 0;
>  }

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/20260916110825.102631-1-angelogioacchino.delregno@collabora.com?part=5

  reply	other threads:[~2026-09-16 11:20 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-09-16 11:08 [PATCH v9 00/13] drm/mediatek: Add DSC, WDMA, MT8189/96 DSI support AngeloGioacchino Del Regno
2026-09-16 11:08 ` [PATCH v9 01/13] dt-bindings: display: mediatek: dsc: Add MT8196 compatible AngeloGioacchino Del Regno
2026-09-16 11:08 ` [PATCH v9 02/13] drm/mediatek: Implement Display Stream Compression support AngeloGioacchino Del Regno
2026-09-16 11:22   ` sashiko-bot
2026-09-19  6:52   ` Chaoyi Chen
2026-09-21 10:05     ` AngeloGioacchino Del Regno
2026-09-16 11:08 ` [PATCH v9 03/13] dt-bindings: display: mediatek: dsi: Document MT8189 and MT8196 AngeloGioacchino Del Regno
2026-09-16 11:08 ` [PATCH v9 04/13] drm/mediatek: mtk_dsi: Cleanup encoder if reset fails during bind AngeloGioacchino Del Regno
2026-09-16 11:08 ` [PATCH v9 05/13] drm/mediatek: mtk_dsi: Enable interrupt at component bind time AngeloGioacchino Del Regno
2026-09-16 11:20   ` sashiko-bot [this message]
2026-09-16 11:08 ` [PATCH v9 06/13] drm/mediatek: mtk_dsi: Transfer register offsets to per-SoC const AngeloGioacchino Del Regno
2026-09-16 11:08 ` [PATCH v9 07/13] drm/mediatek: mtk_dsi: Move max link rate parameter to platform data AngeloGioacchino Del Regno
2026-09-16 11:08 ` [PATCH v9 08/13] drm/mediatek: mtk_dsi: Add support for MT8189 AngeloGioacchino Del Regno
2026-09-16 11:08 ` [PATCH v9 09/13] drm/mediatek: mtk_dsi: Add support for SRAM QoS setting AngeloGioacchino Del Regno
2026-09-16 11:20   ` sashiko-bot
2026-09-16 11:08 ` [PATCH v9 10/13] drm/mediatek: mtk_dsi: Add support for MT8196 AngeloGioacchino Del Regno
2026-09-16 11:08 ` [PATCH v9 11/13] drm/mediatek: mtk_dsi: Enable PM Runtime on probe AngeloGioacchino Del Regno
2026-09-16 11:28   ` sashiko-bot
2026-09-16 11:08 ` [PATCH v9 12/13] dt-bindings: display: mediatek: wdma: Add compatibles for more SoCs AngeloGioacchino Del Regno
2026-09-16 11:08 ` [PATCH v9 13/13] drm/mediatek: Add Write DMA (WDMA) Engine for Writeback support AngeloGioacchino Del Regno
2026-09-16 11:22   ` 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=20260916112043.056C71F0089D@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