[PATCH v5 03/11] drm/connector: add CEC-related fields
Dmitry Baryshkov
dmitry.baryshkov at oss.qualcomm.com
Tue Apr 15 09:10:06 UTC 2025
On 14/04/2025 17:52, Maxime Ripard wrote:
> Hi,
>
> On Mon, Apr 07, 2025 at 06:11:00PM +0300, Dmitry Baryshkov wrote:
>> +/**
>> + * struct drm_connector_cec - DRM Connector CEC-related structure
>> + */
>> +struct drm_connector_cec {
>> + /**
>> + * @mutex: protects all fields in this structure.
>> + */
>> + struct mutex mutex;
>> +
>> + /**
>> + * @funcs: CEC Control Functions
>> + */
>> + const struct drm_connector_cec_funcs *funcs;
>> +
>> + /**
>> + * @data: CEC implementation-specific data
>> + */
>> + void *data;
>
> Is there a reason we don't just skip that data? The only user I'm seeing
> so far are the helpers, and they only put the cec_adapter pointer in
> there.
>
> Can't we pass the connector to CEC and make the adapter part of drm_connector_cec?
It will be either cec_notifier or cec_adapter +
drm_connector_hdmi_cec_funcs. Initially I sketched a union here, but
then I thought that a void pointer makes more sense. It allows us to
make CEC data helper-specific. For example, cec-pin might store platform
callbacks here. DP CEC might need to store AUX pointer, etc.
--
With best wishes
Dmitry
More information about the dri-devel
mailing list