[PATCH v5 1/4] drm/bridge: Add a drm_bridge_state object

Neil Armstrong narmstrong at baylibre.com
Mon Jan 6 10:41:04 UTC 2020


On 06/01/2020 11:03, Boris Brezillon wrote:
> Hi Neil,
> 
> On Thu, 19 Dec 2019 11:11:48 +0100
> Neil Armstrong <narmstrong at baylibre.com> wrote:
> 
>> +/**
>> + * drm_atomic_helper_duplicate_bridge_state() - Default duplicate state helper
>> + * @bridge: bridge containing the state to duplicate
>> + *
>> + * Default implementation of &drm_bridge_funcs.atomic_duplicate().
>> + *
>> + * RETURNS:
>> + * a valid state object or NULL if the allocation fails.
>> + */
>> +struct drm_bridge_state *
>> +drm_atomic_helper_bridge_duplicate_state(struct drm_bridge *bridge)
>> +{
>> +	struct drm_bridge_state *new;
>> +
>> +	if (WARN_ON(!bridge->base.state))
>> +		return NULL;
>> +
>> +	new = kzalloc(sizeof(*new), GFP_KERNEL);
>> +	if (new)
>> +		__drm_atomic_helper_bridge_duplicate_state(bridge, new);
>> +
>> +	return new;
>> +}
>> +EXPORT_SYMBOL(drm_atomic_helper_bridge_duplicate_state);
> 
> IIRC, Laurent suggested to make those functions private. I'd also
> recommend changing the names to
> drm_atomic_*default*_bridge_<action>_state() and dropping the kernel doc
> header since making them static means they're no longer helper
> functions.
> 
> Regards,
> 
> Boris
> 

Ack, time for a v6 !

Neil


More information about the dri-devel mailing list