From: Alexandre Mergnat <amergnat@baylibre.com>
To: Chun-Kuang Hu <chunkuang.hu@kernel.org>,
Philipp Zabel <p.zabel@pengutronix.de>,
Maarten Lankhorst <maarten.lankhorst@linux.intel.com>,
Maxime Ripard <mripard@kernel.org>,
Thomas Zimmermann <tzimmermann@suse.de>,
David Airlie <airlied@gmail.com>, Rob Herring <robh@kernel.org>,
Krzysztof Kozlowski <krzk+dt@kernel.org>,
Conor Dooley <conor+dt@kernel.org>,
Matthias Brugger <matthias.bgg@gmail.com>,
AngeloGioacchino Del Regno
<angelogioacchino.delregno@collabora.com>,
Jitao Shi <jitao.shi@mediatek.com>, CK Hu <ck.hu@mediatek.com>,
Catalin Marinas <catalin.marinas@arm.com>,
Will Deacon <will@kernel.org>, Simona Vetter <simona@ffwll.ch>,
Simona Vetter <simona.vetter@ffwll.ch>
Cc: 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,
Alexandre Mergnat <amergnat@baylibre.com>
Subject: [PATCH v6 2/6] drm/mediatek: dsi: Improves the DSI lane setup robustness
Date: Thu, 09 Jan 2025 11:37:55 +0100 [thread overview]
Message-ID: <20231023-display-support-v6-2-c6af4f34f4d8@baylibre.com> (raw)
In-Reply-To: <20231023-display-support-v6-0-c6af4f34f4d8@baylibre.com>
Currently, mtk_dsi_lane_ready (which setup the DSI lane) is triggered
before mtk_dsi_poweron. lanes_ready flag toggle to true during
mtk_dsi_lane_ready function, and the DSI module is set up during
mtk_dsi_poweron.
Later, during panel driver init, mtk_dsi_lane_ready is triggered but does
nothing because lanes are considered ready. Unfortunately, when the panel
driver try to communicate, the DSI returns a timeout.
The solution found here is to put lanes_ready flag to false after the DSI
module setup into mtk_dsi_poweron to init the DSI lanes after the power /
setup of the DSI module.
Signed-off-by: Alexandre Mergnat <amergnat@baylibre.com>
---
drivers/gpu/drm/mediatek/mtk_dsi.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/drivers/gpu/drm/mediatek/mtk_dsi.c b/drivers/gpu/drm/mediatek/mtk_dsi.c
index e61b9bc68e9a..dcf0d93881b5 100644
--- a/drivers/gpu/drm/mediatek/mtk_dsi.c
+++ b/drivers/gpu/drm/mediatek/mtk_dsi.c
@@ -724,6 +724,8 @@ static int mtk_dsi_poweron(struct mtk_dsi *dsi)
mtk_dsi_config_vdo_timing(dsi);
mtk_dsi_set_interrupt_enable(dsi);
+ dsi->lanes_ready = false;
+
return 0;
err_disable_engine_clk:
clk_disable_unprepare(dsi->engine_clk);
--
2.25.1
next prev parent reply other threads:[~2025-01-09 10:41 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-01-09 10:37 [PATCH v6 0/6] Add display support for the MT8365-EVK board amergnat
2025-01-09 10:37 ` [PATCH v6 1/6] dt-bindings: display: mediatek: dpi: add power-domains example amergnat
2025-01-09 10:37 ` Alexandre Mergnat [this message]
2025-01-09 10:37 ` [PATCH v6 3/6] drm/mediatek: add MT8365 SoC support amergnat
2025-01-09 10:37 ` [PATCH v6 4/6] arm64: defconfig: enable display support for mt8365-evk Alexandre Mergnat
2025-01-09 11:06 ` AngeloGioacchino Del Regno
2025-01-10 7:38 ` Krzysztof Kozlowski
2025-01-10 9:47 ` Alexandre Mergnat
2025-01-10 11:32 ` Krzysztof Kozlowski
2025-01-09 10:37 ` [PATCH v6 5/6] arm64: dts: mediatek: add display blocks support for the MT8365 SoC Alexandre Mergnat
2025-01-09 11:06 ` AngeloGioacchino Del Regno
2025-01-09 10:37 ` [PATCH v6 6/6] arm64: dts: mediatek: add display support for mt8365-evk Alexandre Mergnat
2025-01-09 11:06 ` AngeloGioacchino Del Regno
2025-01-09 11:17 ` Sjoerd Simons
2025-01-09 14:40 ` [PATCH v6 0/6] Add display support for the MT8365-EVK board Rob Herring (Arm)
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=20231023-display-support-v6-2-c6af4f34f4d8@baylibre.com \
--to=amergnat@baylibre.com \
--cc=airlied@gmail.com \
--cc=angelogioacchino.delregno@collabora.com \
--cc=catalin.marinas@arm.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=jitao.shi@mediatek.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=simona.vetter@ffwll.ch \
--cc=simona@ffwll.ch \
--cc=tzimmermann@suse.de \
--cc=will@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