From: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
To: Roman Vivchar <rva333@protonmail.com>
Cc: chunkuang.hu@kernel.org, p.zabel@pengutronix.de,
maarten.lankhorst@linux.intel.com, mripard@kernel.org,
tzimmermann@suse.de, airlied@gmail.com, simona@ffwll.ch,
robh@kernel.org, krzk+dt@kernel.org, conor+dt@kernel.org,
matthias.bgg@gmail.com, jitao.shi@mediatek.com,
dri-devel@lists.freedesktop.org,
linux-mediatek@lists.infradead.org, devicetree@vger.kernel.org,
linux-kernel@vger.kernel.org,
linux-arm-kernel@lists.infradead.org, kernel@collabora.com,
justin.yeh@mediatek.com, jason-jh.lin@mediatek.com,
CK Hu <ck.hu@mediatek.com>
Subject: Re: [PATCH v9 05/13] drm/mediatek: mtk_dsi: Enable interrupt at component bind time
Date: Thu, 5 Nov 2026 10:00:28 +0100 [thread overview]
Message-ID: <1c0e5b1a-b1a8-42a3-8dd1-75fceee078a2@collabora.com> (raw)
In-Reply-To: <hXDHNenOxP_1Fjv3k-eSNDIFG2yGsdvlxFOCpn0SMdRImzGWQfDVFE-0px1K0-Z472dL3IuLWE5BWIQeOo_U12SjzZOeJ3FNLIxus-KoGNE=@protonmail.com>
On 11/4/26 19:56, Roman Vivchar wrote:
> On Wednesday, September 16th, 2026 at 2:08 PM, AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com> wrote:
>
>> Having the DSI interrupt enabled before actually binding the DSI
>> component to the display controller driver is both useless and
>> dangerous: the main purpose of this interrupt is to signal CMD
>> done, LP RX data ready, or VideoMode done, or to reset the HW
>> engine if this doesn't come.
>>
>> Should this interrupt come too late (during probe), the HW will
>> be reset only at the next occurrence of a timeout, which slows
>> down boot and may render artifacts to the DSI display.
>>
>> Moreover, clearing the DSI interrupt while the display controller
>> is not ready yet, may result in an interrupt storm.
>>
>> In order to prevent this from happening, request the interrupt
>> with IRQF_NO_AUTOEN, and enable it only when binding DSI to its
>> display controller component master.
>>
>> Reviewed-by: CK Hu <ck.hu@mediatek.com>
>> Signed-off-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
>
> This was necessary on mt6595, otherwise it would get stuck.
>
Yep, I guess it was getting stuck before this because your platform's bootloader
has continuous splash functionality and leaves it on while booting Linux, right?
Just a curiosity... ;-)
Cheers,
Angelo
> Acked-by: Roman Vivchar <rva333@protonmail.com>
> Tested-by: Roman Vivchar <rva333@protonmail.com> # mt6595, mt6768
>
>> ---
>> drivers/gpu/drm/mediatek/mtk_dsi.c | 24 +++++++++++++-----------
>> 1 file changed, 13 insertions(+), 11 deletions(-)
>>
>> diff --git a/drivers/gpu/drm/mediatek/mtk_dsi.c b/drivers/gpu/drm/mediatek/mtk_dsi.c
>> index 28ba532210ff..6ac6daa61e68 100644
>> --- a/drivers/gpu/drm/mediatek/mtk_dsi.c
>> +++ b/drivers/gpu/drm/mediatek/mtk_dsi.c
>> @@ -225,6 +225,7 @@ struct mtk_dsi {
>> int refcount;
>> bool enabled;
>> bool lanes_ready;
>> + int irq;
>> u32 irq_data;
>> wait_queue_head_t irq_wait_queue;
>> const struct mtk_dsi_driver_data *driver_data;
>> @@ -1101,6 +1102,8 @@ static int mtk_dsi_bind(struct device *dev, struct device *master, void *data)
>> return ret;
>> }
>>
>> + enable_irq(dsi->irq);
>> +
>> return 0;
>> }
>>
>> @@ -1109,6 +1112,8 @@ static void mtk_dsi_unbind(struct device *dev, struct device *master,
>> {
>> struct mtk_dsi *dsi = dev_get_drvdata(dev);
>>
>> + disable_irq(dsi->irq);
>> +
>> drm_encoder_cleanup(&dsi->encoder);
>> }
>>
>> @@ -1342,7 +1347,6 @@ static int mtk_dsi_probe(struct platform_device *pdev)
>> {
>> struct mtk_dsi *dsi;
>> struct device *dev = &pdev->dev;
>> - int irq_num;
>> int ret;
>>
>> dsi = devm_drm_bridge_alloc(dev, struct mtk_dsi, bridge,
>> @@ -1375,9 +1379,9 @@ static int mtk_dsi_probe(struct platform_device *pdev)
>> if (IS_ERR(dsi->phy))
>> return dev_err_probe(dev, PTR_ERR(dsi->phy), "Failed to get MIPI-DPHY\n");
>>
>> - irq_num = platform_get_irq(pdev, 0);
>> - if (irq_num < 0)
>> - return irq_num;
>> + dsi->irq = platform_get_irq(pdev, 0);
>> + if (dsi->irq < 0)
>> + return dsi->irq;
>>
>> dsi->host.ops = &mtk_dsi_ops;
>> dsi->host.dev = dev;
>> @@ -1386,17 +1390,15 @@ static int mtk_dsi_probe(struct platform_device *pdev)
>>
>> platform_set_drvdata(pdev, dsi);
>>
>> + ret = devm_request_irq(&pdev->dev, dsi->irq, mtk_dsi_irq,
>> + IRQF_NO_AUTOEN, dev_name(&pdev->dev), dsi);
>> + if (ret)
>> + return dev_err_probe(&pdev->dev, ret, "Failed to request DSI irq\n");
>> +
>> ret = mipi_dsi_host_register(&dsi->host);
>> if (ret < 0)
>> return dev_err_probe(dev, ret, "Failed to register DSI host\n");
>>
>> - ret = devm_request_irq(&pdev->dev, irq_num, mtk_dsi_irq,
>> - IRQF_TRIGGER_NONE, dev_name(&pdev->dev), dsi);
>> - if (ret) {
>> - mipi_dsi_host_unregister(&dsi->host);
>> - return dev_err_probe(&pdev->dev, ret, "Failed to request DSI irq\n");
>> - }
>> -
>> dsi->bridge.of_node = dev->of_node;
>> dsi->bridge.type = DRM_MODE_CONNECTOR_DSI;
>>
>> --
>> 2.55.0
>>
>>
>>
next prev parent reply other threads:[~2026-11-05 9:00 UTC|newest]
Thread overview: 19+ 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-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-11-04 18:56 ` Roman Vivchar
2026-11-05 9:00 ` AngeloGioacchino Del Regno [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: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-11-04 18:59 ` Roman Vivchar
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
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=1c0e5b1a-b1a8-42a3-8dd1-75fceee078a2@collabora.com \
--to=angelogioacchino.delregno@collabora.com \
--cc=airlied@gmail.com \
--cc=chunkuang.hu@kernel.org \
--cc=ck.hu@mediatek.com \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=dri-devel@lists.freedesktop.org \
--cc=jason-jh.lin@mediatek.com \
--cc=jitao.shi@mediatek.com \
--cc=justin.yeh@mediatek.com \
--cc=kernel@collabora.com \
--cc=krzk+dt@kernel.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mediatek@lists.infradead.org \
--cc=maarten.lankhorst@linux.intel.com \
--cc=matthias.bgg@gmail.com \
--cc=mripard@kernel.org \
--cc=p.zabel@pengutronix.de \
--cc=robh@kernel.org \
--cc=rva333@protonmail.com \
--cc=simona@ffwll.ch \
--cc=tzimmermann@suse.de \
/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
all inboxes | Powered by JetHome®