From: sashiko-bot@kernel.org
To: "AngeloGioacchino Del Regno" <angelogioacchino.delregno@collabora.com>
Cc: conor+dt@kernel.org, devicetree@vger.kernel.org,
dri-devel@lists.freedesktop.org, robh@kernel.org
Subject: Re: [PATCH v4 09/12] drm/mediatek: mtk_dp: Move max link rate to SoC specific data
Date: Thu, 09 Jul 2026 11:53:27 +0000 [thread overview]
Message-ID: <20260709115328.024BE1F00A3D@smtp.kernel.org> (raw)
In-Reply-To: <20260709113148.49090-10-angelogioacchino.delregno@collabora.com>
Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
Pre-existing issues:
- [High] For eDP, mode validation and bus format negotiation incorrectly use the SoC's hardware maximum link rate rather than considering the board's device tree limit and the sink's DPCD capabilities.
--
--- Patch [9]: [PATCH v4 09/12] drm/mediatek: mtk_dp: Move max link rate to SoC specific data ---
commit 77698e671819e17e65d99b3fb9908f2be60bc613
Author: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
drm/mediatek: mtk_dp: Move max link rate to SoC specific data
This commit moves the hardware maximum link rate from static initialization
to SoC-specific data to prepare for supporting MT8196 eDP IP which has a
higher maximum link rate.
> diff --git a/drivers/gpu/drm/mediatek/mtk_dp.c b/drivers/gpu/drm/mediatek/mtk_dp.c
> index e2a6001fc0ccc..ea970a9bfe936 100644
> --- a/drivers/gpu/drm/mediatek/mtk_dp.c
> +++ b/drivers/gpu/drm/mediatek/mtk_dp.c
[ ... ]
> @@ -1469,7 +1470,7 @@ static void mtk_dp_initialize_priv_data(struct mtk_dp *mtk_dp)
> {
> bool plugged_in = (mtk_dp->bridge.type == DRM_MODE_CONNECTOR_eDP);
>
> - mtk_dp->train_info.link_rate = DP_LINK_BW_5_4;
> + mtk_dp->train_info.link_rate = mtk_dp->data->hw_max_link_rate;
[Severity: High]
This isn't a bug introduced by this patch, but does this blind initialization
cause mode validation to falsely accept unsupported high-bandwidth modes?
Because mtk_dp_bridge_mode_valid() and
mtk_dp_bridge_atomic_get_input_bus_fmts() are called before atomic_enable()
during mode enumeration, they evaluate available bandwidth using this
un-negotiated train_info.link_rate:
mtk_dp_bridge_mode_valid() {
...
u32 rate = drm_dp_bw_code_to_link_rate(mtk_dp->train_info.link_rate) *
lane_count_min;
...
}
For eDP connections, actual link training is deferred until
mtk_dp_bridge_atomic_enable(). Using the un-negotiated rate here ignores the
board's device tree limit (max-linkrate-mhz) and the sink's DPCD capabilities.
Can this result in configuring a display mode that exceeds the actual link
bandwidth, leading to link training failures or black screens, and failing
to fall back to bandwidth-saving formats like YUV422?
> mtk_dp->train_info.lane_count = mtk_dp->max_lanes;
> mtk_dp->train_info.cable_plugged_in = plugged_in;
>
--
Sashiko AI review · https://sashiko.dev/#/patchset/20260709113148.49090-1-angelogioacchino.delregno@collabora.com?part=9
next prev parent reply other threads:[~2026-07-09 11:53 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-07-09 11:31 [PATCH v4 00/12] drm: MediaTek DisplayPort cleanups and MT8196 eDP AngeloGioacchino Del Regno
2026-07-09 11:31 ` [PATCH v4 01/12] dt-bindings: display: mediatek: dp: Deprecate nvmem efuse data AngeloGioacchino Del Regno
2026-07-09 11:31 ` [PATCH v4 02/12] dt-bindings: display: mediatek: dp: Add compatible for MT8196 eDP AngeloGioacchino Del Regno
2026-07-09 11:31 ` [PATCH v4 03/12] drm/mediatek: mtk_dp: Call pm_runtime_put_sync() in removal path AngeloGioacchino Del Regno
2026-07-09 11:42 ` sashiko-bot
2026-07-09 11:31 ` [PATCH v4 04/12] drm/mediatek: mtk_dp: Fix hdmi codec and phy driver unregistration AngeloGioacchino Del Regno
2026-07-09 11:48 ` sashiko-bot
2026-07-09 11:31 ` [PATCH v4 05/12] drm/mediatek: mtk_dp: Clarify SMC eDP/DP video unmute commands AngeloGioacchino Del Regno
2026-07-09 11:31 ` [PATCH v4 06/12] drm/mediatek: mtk_dp: Rework register offsets for proper PHY usage AngeloGioacchino Del Regno
2026-07-09 11:31 ` [PATCH v4 07/12] drm/mediatek: mtk_dp: Use PHY API for PHY power sequences AngeloGioacchino Del Regno
2026-07-09 11:53 ` sashiko-bot
2026-07-09 11:31 ` [PATCH v4 08/12] drm/mediatek: mtk_dp: Add support for PHY from devicetree AngeloGioacchino Del Regno
2026-07-09 11:31 ` [PATCH v4 09/12] drm/mediatek: mtk_dp: Move max link rate to SoC specific data AngeloGioacchino Del Regno
2026-07-09 11:53 ` sashiko-bot [this message]
2026-07-09 11:31 ` [PATCH v4 10/12] drm/mediatek: mtk_dp: Add support for HotPlug Detection in DP AUX AngeloGioacchino Del Regno
2026-07-09 12:00 ` sashiko-bot
2026-07-09 12:05 ` AngeloGioacchino Del Regno
2026-07-09 11:31 ` [PATCH v4 11/12] drm/mediatek: mtk_dp: Add support for eDP1.5 IPs and MT8196 SoC AngeloGioacchino Del Regno
2026-07-09 12:11 ` sashiko-bot
2026-07-09 12:17 ` AngeloGioacchino Del Regno
2026-07-09 11:31 ` [PATCH v4 12/12] drm/mediatek: mtk_dp: Clarify XTAL freq and Debounce registers AngeloGioacchino Del Regno
2026-07-09 11:57 ` 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=20260709115328.024BE1F00A3D@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