Re: [PATCH v9 03/61] drm/connector: Add drmm_connector_hdmi_init() with new signature

From: Cristian Ciocaltea

Date: Fri Jul 31 2026 - 11:13:43 EST


Hi Dmitry,

On 7/30/26 5:19 PM, Dmitry Baryshkov wrote:
> On Thu, Jul 23, 2026 at 04:34:52AM +0300, Cristian Ciocaltea wrote:
>> In preparation for providing HDMI 2.x source capabilities, move the
>> vendor, product, supported_formats and max_bpc parameters out of the
>> init function into struct drm_connector_hdmi_funcs, and add new
>> supported_hdmi_ver and supported_tmds_char_rate fields there as well.
>
> I really don't like the idea of putting data into the functions. The
> data might be mutable, it might depend on the particular platform, etc.
> while funcs are typically static. Even for the drm_bridge case we have
> two separate structures: static funcs and changeable drm_bridge
> instance.
>
> I'd suggest populating that data in the drm_connector before calling
> drmm_connector_hdmi_init(). The only exception would be vendor / product
> since they use strtomem_pad() to ensure them being properly initialized.
> I'd suggest leaving those two as is.

I don't have a strong preference between the two approaches (functions vs.
connector). Let's wait for Maxime to confirm that he agrees with your
suggestion, so that we can hopefully reach consensus before the final round of
API-related changes.

Meanwhile, I plan to submit v10 addressing several findings reported by Sashiko
and see whether anything else remains outstanding.

Thanks,
Cristian