[PATCH v3 04/11] phy: amlogic: Add Meson HDMI TX PHY driver

sashiko-bot at kernel.org sashiko-bot at kernel.org
Sat Nov 21 11:43:16 PST 2026


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 at 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 at 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.

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/20261121-meson-drm-create-hdmitx-phy-v3-0-f8f471788076@aliel.fr?part=4



More information about the linux-phy mailing list