Re: [PATCH v10 15/69] drm/bridge: Add bridge ops for source-side HDMI 2.0 scrambling

[email protected] Fri, 31 Jul 2026 18:09:45 +0000
Newsgroups dev.linux.lists.linux-sunxi,org.freedesktop.lists.dri-devel
Message-ID <[email protected]>
Thank you for your contribution! Sashiko AI review found 1 potential issue(=
s) to consider:
- [Medium] Missing API implementation for bridge HDMI 2.0 scrambler callbac=
ks causes unconditional probe failure.
--

--- Patch [15]: [PATCH v10 15/69] drm/bridge: Add bridge ops for source-sid=
e HDMI 2.0 scrambling ---
commit 5577332c0f45e627e54f1e2997be97e38fdecf40
Author: Cristian Ciocaltea <[email protected]>

drm/bridge: Add bridge ops for source-side HDMI 2.0 scrambling

This commit adds hdmi_scrambler_enable() and hdmi_scrambler_disable()
callbacks to struct drm_bridge_funcs. These allow bridges to enable or
disable source-side scrambling and high TMDS clock ratios for modes
exceeding 340 MHz.

> diff --git a/include/drm/drm_bridge.h b/include/drm/drm_bridge.h
> index 5a5a25995471c..77b3ffe692304 100644
> --- a/include/drm/drm_bridge.h
> +++ b/include/drm/drm_bridge.h
[ ... ]
> +	/**
> +	 * @hdmi_scrambler_enable:
> +	 *
> +	 * Enable source-side scrambling and the high TMDS clock ratio for the
> +	 * mode currently being applied.
[ ... ]
> +	 * Returns:
> +	 * 0 on success, a negative error code otherwise.
> +	 */
> +	int (*hdmi_scrambler_enable)(struct drm_bridge *bridge);
> +
> +	/**
> +	 * @hdmi_scrambler_disable:
> +	 *
> +	 * Disable source-side scrambling and the high TMDS clock ratio.
[ ... ]
> +	 * Returns:
> +	 * 0 on success, a negative error code otherwise.
> +	 */
> +	int (*hdmi_scrambler_disable)(struct drm_bridge *bridge);

[Severity: Medium]
Are these newly added callbacks being hooked up to the DRM connector
infrastructure?

Looking at drm_bridge_connector_init() in drm_bridge_connector.c, it
initializes hdmi_funcs but doesn't seem to map these new bridge callbacks:

		bridge_connector->hdmi_funcs =3D drm_bridge_connector_hdmi_funcs;

		bridge_connector->hdmi_funcs.vendor =3D bridge_connector->bridge_hdmi->ve=
ndor;
		bridge_connector->hdmi_funcs.product =3D bridge_connector->bridge_hdmi->p=
roduct;

If a bridge advertises HDMI_VERSION_2_0, will drmm_connector_hdmi_init()
fail with -EINVAL during probe because the connector's hdmi_funcs are
missing these required scrambler callbacks?

--=20
Sashiko AI review =C2=B7 https://sashiko.dev/#/patchset/20260731-dw-hdmi-qp=
[email protected]?part=3D15