From: Ronald Claveau <linux-kernel-dev@aliel.fr>
To: sashiko-reviews@lists.linux.dev
Cc: devicetree@vger.kernel.org, linux-amlogic@lists.infradead.org,
linux-phy@lists.infradead.org, dri-devel@lists.freedesktop.org,
robh@kernel.org, conor+dt@kernel.org, neil.armstrong@linaro.org,
vkoul@kernel.org, olteanv@gmail.com
Subject: Re: [PATCH v3 04/11] phy: amlogic: Add Meson HDMI TX PHY driver
Date: Mon, 23 Nov 2026 12:27:19 +0100 [thread overview]
Message-ID: <e782f0e1-18d2-4772-b04b-61a35eae7a7e@aliel.fr> (raw)
In-Reply-To: <sashiko-outbox-227322@kernel.org>
On 11/21/26 20:43, sashiko-bot@kernel.org wrote:
> Thank you for your contribution! Sashiko AI review found 1 potential
> issue to consider:
> - [Medium] phy: amlogic: phy-meson-hdmi-tx: min_rate 25175000 rejects
> valid DMT modes
> --
>
> commit c8d7adccab22985446c5dd65967a17a727629973
> Author: Ronald Claveau <linux-kernel-dev@aliel.fr>
>
> phy: amlogic: Add Meson HDMI TX PHY driver
>
> This commit adds a generic PHY driver for the Amlogic Meson HDMI TX PHY on
> GXBB, GXL, GXM, and G12A SoCs, along with a legacy creation helper for
> device trees without a phys property.
>
>> diff --git a/drivers/phy/amlogic/phy-meson-hdmi-tx.c b/drivers/phy/amlogic/phy-meson-hdmi-tx.c
>> new file mode 100644
>> index 0000000000000..872d244de8fb7
>> --- /dev/null
>> +++ b/drivers/phy/amlogic/phy-meson-hdmi-tx.c
> [ ... ]
>> +/* GXBB */
>> +static const struct meson_hdmi_phy_rate gxbb_rates[] = {
>> + /* 5.94Gbps, 3.7125Gbps */
>> + { 371250000, 0x33353245, 0x2100115b },
>> + /* 2.97Gbps */
>> + { 297000000, 0x33634283, 0xb000115b },
>> + /* 1.485Gbps, down to 251.75Mbps */
>> + { 25175000, 0x33632122, 0x2000115b },
>> +};
>> +
>> +/* GXL / GXM */
>> +static const struct meson_hdmi_phy_rate gxl_rates[] = {
>> + /* 5.94Gbps, 3.7125Gbps */
>> + { 371250000, 0x333d3282, 0x2136315b },
>> + /* 2.97Gbps */
>> + { 297000000, 0x33303382, 0x2036315b },
>> + /* 1.485Gbps */
>> + { 148500000, 0x33303362, 0x2016315b },
>> + /* 742.5Mbps, down to 251.75Mbps */
>> + { 25175000, 0x33604142, 0x0016315b },
>> +};
>> +
>> +/* G12A */
>> +static const struct meson_hdmi_phy_rate g12a_rates[] = {
>> + /* 5.94Gbps, 3.7125Gbps */
>> + { 371250000, 0x37eb65c4, 0x2ab0ff3b, 0x0000080b },
>> + /* 2.97Gbps */
>> + { 297000000, 0x33eb6262, 0x2ab0ff3b, 0x00000003 },
>> + /* 1.485Gbps, down to 251.75Mbps */
>> + { 25175000, 0x33eb4242, 0x2ab0ff3b, 0x00000003 },
>> +};
> [ ... ]
>> +static const struct meson_hdmi_phy_rate *
>> +meson_hdmi_phy_find_rate(const struct meson_hdmi_phy_data *data, u64 rate)
>> +{
>> + unsigned int i;
>> +
>> + if (rate > data->max_rate)
>> + return NULL;
>> +
>> + for (i = 0; i < data->num_rates; i++)
>> + if (rate >= data->rates[i].min_rate)
>> + return &data->rates[i];
>> +
>> + return NULL;
>> +}
>
> [Severity: Medium]
> Does setting min_rate to 25175000 in the lowest entries of gxbb_rates[],
> gxl_rates[], and g12a_rates[] cause a regression for valid display modes
> below 25.175 MHz?
>
> In drivers/gpu/drm/meson/meson_dw_hdmi.c, meson_hdmi_phy_setup_mode() used
> an unconditional else branch with no lower frequency bound for the lowest
> band ("742.5Mbps, and below" on GXL/GXM, and "1.485Gbps, and below" on GXBB
> and G12A). Meanwhile, meson_encoder_hdmi_mode_valid() accepts non-VIC DMT
> modes down to 15.9 MHz via meson_vclk_dmt_supported_freq() without calling
> phy_validate(). Any mode between 15.9 MHz and 25.174 MHz (such as
> 640x480@60Hz CVT reduced-blanking at 23.75 MHz, or a 640x480 EDID detailed
> timing descriptor whose 10 kHz step encodes 25.175 MHz as 25170 kHz) passes
> mode validation and atomic_check, then fails with -EINVAL in
> dw_hdmi_phy_init() -> phy_configure() during atomic_enable, aborting HDMI
> PHY power-on.
>
I've tested 15.9 MHz ok on a small screen with EDID. I will change the
minimal value accordingly.
--
Best regards,
Ronald
_______________________________________________
linux-amlogic mailing list
linux-amlogic@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-amlogic
next prev parent reply other threads:[~2026-11-23 11:27 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-21 19:21 [PATCH v3 00/11] phy/drm: amlogic: Extract Meson HDMI TX PHY into a dedicated driver Ronald Claveau via B4 Relay
2026-11-21 19:21 ` [PATCH v3 01/11] dt-bindings: soc: amlogic: meson-gx-hhi-sysctrl: Fix compatible matching in conditionals Ronald Claveau via B4 Relay
2026-11-21 19:21 ` [PATCH v3 02/11] dt-bindings: phy: amlogic: Add Meson HDMI TX PHY binding Ronald Claveau via B4 Relay
2026-11-21 19:26 ` sashiko-bot
2026-11-23 8:06 ` neil.armstrong
2026-11-23 10:20 ` Ronald Claveau
2026-11-21 19:21 ` [PATCH v3 03/11] dt-bindings: soc: amlogic: meson-gx-hhi-sysctrl: Add hdmi-phy child node Ronald Claveau via B4 Relay
2026-11-21 19:21 ` [PATCH v3 04/11] phy: amlogic: Add Meson HDMI TX PHY driver Ronald Claveau via B4 Relay
2026-11-21 19:43 ` sashiko-bot
2026-11-23 11:27 ` Ronald Claveau [this message]
2026-11-21 19:21 ` [PATCH v3 05/11] dt-bindings: display: amlogic,meson-dw-hdmi: Add phys Ronald Claveau via B4 Relay
2026-11-21 19:21 ` [PATCH v3 06/11] pmdomain: amlogic: meson-ee-pwrc: power up memories for boot-enabled domains Ronald Claveau via B4 Relay
2026-11-21 19:21 ` [PATCH v3 07/11] drm/meson: dw-hdmi: Drop manual HHI clock and memory PD setup Ronald Claveau via B4 Relay
2026-11-21 19:21 ` [PATCH v3 08/11] drm/meson: dw-hdmi: Use the generic PHY framework for the HDMI TX PHY Ronald Claveau via B4 Relay
2026-11-21 19:37 ` sashiko-bot
2026-11-23 11:34 ` Ronald Claveau
2026-11-21 19:21 ` [PATCH v3 09/11] arm64: dts: amlogic: Add HDMI TX PHY node for G12 Ronald Claveau via B4 Relay
2026-11-21 19:21 ` [PATCH v3 10/11] arm64: dts: amlogic: Add HDMI TX PHY node for GXBB Ronald Claveau via B4 Relay
2026-11-21 19:21 ` [PATCH v3 11/11] arm64: dts: amlogic: Add HDMI TX PHY node for GXL Ronald Claveau via B4 Relay
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=e782f0e1-18d2-4772-b04b-61a35eae7a7e@aliel.fr \
--to=linux-kernel-dev@aliel.fr \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=dri-devel@lists.freedesktop.org \
--cc=linux-amlogic@lists.infradead.org \
--cc=linux-phy@lists.infradead.org \
--cc=neil.armstrong@linaro.org \
--cc=olteanv@gmail.com \
--cc=robh@kernel.org \
--cc=sashiko-reviews@lists.linux.dev \
--cc=vkoul@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
all inboxes | Powered by JetHome®