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

[email protected]
Newsgroups org.freedesktop.lists.dri-devel,dev.linux.lists.linux-sunxi
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 callbacks causes unconditional probe failure.
--

--- Patch [15]: [PATCH v10 15/69] drm/bridge: Add bridge ops for source-side 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 = drm_bridge_connector_hdmi_funcs;

		bridge_connector->hdmi_funcs.vendor = bridge_connector->bridge_hdmi->vendor;
		bridge_connector->hdmi_funcs.product = bridge_connector->bridge_hdmi->product;

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?

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/[email protected]?part=15
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.