[PATCH v8 04/39] drm/connector: Add HDMI 2.0 scrambler infrastructure

Cristian Ciocaltea cristian.ciocaltea at collabora.com
Wed Jul 8 03:34:48 PDT 2026


On 7/7/26 3:30 PM, Maxime Ripard wrote:
> On Fri, Jul 03, 2026 at 11:54:33PM +0300, Cristian Ciocaltea wrote:
>>>>> -	if (caps->supported_hdmi_ver >= HDMI_VERSION_2_0)
>>>> +	if (caps->supported_hdmi_ver >= HDMI_VERSION_2_0) {
>>>> +		if (!hdmi_funcs->scrambler_enable ||
>>>> +		    !hdmi_funcs->scrambler_disable)
>>>> +			return -EINVAL;
>>>> +
>>>> +		connector->hdmi.scrambler_supported = true;
>>>>  		connector->hdmi.max_tmds_char_rate = HDMI_2_0_TMDS_CHAR_RATE_MAX_HZ;
>>>> -	else if (caps->supported_hdmi_ver >= HDMI_VERSION_1_3)
>>>> +	} else if (caps->supported_hdmi_ver >= HDMI_VERSION_1_3) {
>>>>  		connector->hdmi.max_tmds_char_rate = HDMI_1_3_TMDS_CHAR_RATE_MAX_HZ;
>>>> -	else if (caps->supported_hdmi_ver >= HDMI_VERSION_1_0)
>>>> +	} else if (caps->supported_hdmi_ver >= HDMI_VERSION_1_0) {
>>>>  		connector->hdmi.max_tmds_char_rate = HDMI_1_0_TMDS_CHAR_RATE_MAX_HZ;
>>>> +	}
>>>>  
>>>>  	if (caps->max_tmds_char_rate) {
>>>>  		if (caps->max_tmds_char_rate > connector->hdmi.max_tmds_char_rate)
>>>> +
>>>> +	/** @scdc_cb: Callback to be invoked as part of @scdc_work.
>>>> +	 *
>>>> +	 * Currently used to monitor sink-side scrambling status and retry
>>>> +	 * setup if the sink resets it.
>>>> +	 *
>>>> +	 * This is assigned by the framework when making use of
>>>> +	 * drm_connector_hdmi_enable_scrambling() helper.
>>>
>>> No such helper. 
>>
>> Right, I'll drop the reference to the helper name, as that's added later in the
>> series.
>>
>>> Also, please explain in the commit message, why do we
>>> need to keep it configurable. Why the default is not enough?
>>
>> We will need a separate callback to support HDMI 2.1, i.e. for link training
>> management.  I’ll update the commit message accordingly.
> 
> I think I'm equally confused as Dmitry here. If scdc_cb is only called
> if we're sending scrambled pixels but the monitor doesn't acknowledge it
> initially, then the only thing we need to do is "if the scrambler's
> enabled, call drm_scdc_set_scrambling()", then we don't need to set a
> callback. And even if we ever need to deal with HDMI link training, then
> we can still have the same function but with a couple of branches more.
I think I overengineered this by trying to keep the SCDC-related bits as much as
possible in drm_hdmi_helper.c.  I’ll drop this callback and move the logic into
drm_connector_hdmi_scdc_work().

Cristian



More information about the Linux-rockchip mailing list