[PATCH v8 03/39] drm/display: bridge_connector: Pass HDMI capabilities through caps struct

Cristian Ciocaltea cristian.ciocaltea at collabora.com
Fri Jul 3 12:55:09 PDT 2026


On 7/3/26 5:19 PM, Dmitry Baryshkov wrote:
> On Thu, Jul 02, 2026 at 05:46:16PM +0300, Cristian Ciocaltea wrote:
>> Switch drm_bridge_connector_init() to
>> drmm_connector_hdmi_init_with_caps(), collecting the bridge's HDMI
>> properties into a stack drm_connector_hdmi_caps so future HDMI 2.x
>> capabilities can be plumbed without growing the argument list.
>>
>> Introduce struct drm_bridge::supported_hdmi_ver to let bridges declare
>> the HDMI specification version they are conformant with, and forward it
>> to the connector layer through the new caps struct so HDMI 2.x features
>> can be gated on real source capability rather than guesswork.
> 
> And it's left uninitialized by the bridges, which doesn't mean anything.
> If you don't want to touch all bridge drivers in one commit, please
> provide some migration path and hopefully get rid of it by the end of
> the series. 

Sure, one question though: at the end of the migration, would it be fine to
stick with drmm_connector_hdmi_init_with_caps() and just drop
drmm_connector_hdmi_init()?  Otherwise I'll rename it back.

> At least, there should be a drm_warn() if the version in
> unsspecified.

I’ll double-check if any use cases remain that can't be covered by this series.

>>
>> Signed-off-by: Cristian Ciocaltea <cristian.ciocaltea at collabora.com>
>> ---
>>  drivers/gpu/drm/display/drm_bridge_connector.c | 29 ++++++++++++++------------
>>  include/drm/drm_bridge.h                       |  6 ++++++
>>  2 files changed, 22 insertions(+), 13 deletions(-)
>>
>> diff --git a/drivers/gpu/drm/display/drm_bridge_connector.c b/drivers/gpu/drm/display/drm_bridge_connector.c
>> index 92f8a2d7aab4..796069dbf1a1 100644
>> --- a/drivers/gpu/drm/display/drm_bridge_connector.c
>> +++ b/drivers/gpu/drm/display/drm_bridge_connector.c
>> @@ -823,8 +823,10 @@ struct drm_connector *drm_bridge_connector_init(struct drm_device *drm,
>>  	struct drm_connector *connector;
>>  	struct i2c_adapter *ddc = NULL;
>>  	struct drm_bridge *panel_bridge __free(drm_bridge_put) = NULL;
>> -	unsigned int supported_formats = BIT(DRM_OUTPUT_COLOR_FORMAT_RGB444);
>> -	unsigned int max_bpc = 8;
>> +	struct drm_connector_hdmi_caps caps = {
>> +		.supported_formats = BIT(DRM_OUTPUT_COLOR_FORMAT_RGB444),
>> +		.max_bpc = 8,
>> +	};
> 
> I'm really not sure that we need separate caps. But if we do, it would
> make sense to embed it as is in the drm_bridge instead of having the
> scattered fields.

Ack.

> 
>>  	bool support_hdcp = false;
>>  	int connector_type;
>>  	int ret;
>> diff --git a/include/drm/drm_bridge.h b/include/drm/drm_bridge.h
>> index 18f3db367dc1..2d8b5e4c64ba 100644
>> --- a/include/drm/drm_bridge.h
>> +++ b/include/drm/drm_bridge.h
>> @@ -1176,6 +1176,12 @@ struct drm_bridge {
>>  	 */
>>  	const char *product;
>>  
>> +	/**
>> +	 * @supported_hdmi_ver: HDMI version the bridge is conformant with.
>> +	 * This is only relevant if @DRM_BRIDGE_OP_HDMI is set.
>> +	 */
>> +	enum hdmi_version supported_hdmi_ver;
>> +
>>  	/**
>>  	 * @supported_formats: Bitmask of @drm_output_color_format listing
>>  	 * supported output formats. This is only relevant if
>>
>> -- 
>> 2.54.0
>>
> 



More information about the linux-arm-kernel mailing list