[PATCH RFC v2 03/20] drm: Factor out common color_pipeline property initialization code

Ariel D'Alessandro ariel.dalessandro at collabora.com
Wed Dec 10 12:19:37 PST 2025


Harry,

Following up on Nicolas' series.

On 9/29/25 5:53 AM, Harry Wentland wrote:
> 
> 
> On 2025-09-17 20:43, Nícolas F. R. A. Prado wrote:
>> In preparation for sharing the initialization code for the color
>> pipeline property between pre- and post-blend color pipelines, factor
>> out the common initialization to a separate function.
>>
>> Signed-off-by: Nícolas F. R. A. Prado <nfraprado at collabora.com>
>> ---
>>   drivers/gpu/drm/drm_crtc.c          | 44 +++++++++++++++++++++++++++ 
>> ++++++++++
>>   drivers/gpu/drm/drm_crtc_internal.h |  5 +++++
>>   drivers/gpu/drm/drm_plane.c         | 36 +++++-------------------------
>>   3 files changed, 54 insertions(+), 31 deletions(-)
>>
>> diff --git a/drivers/gpu/drm/drm_crtc.c b/drivers/gpu/drm/drm_crtc.c
>> index 
>> 46655339003db2a1b43441434839e26f61d79b4e..94e60cffd29972aa979ac2f1932be7a6a97f3ada 100644
>> --- a/drivers/gpu/drm/drm_crtc.c
>> +++ b/drivers/gpu/drm/drm_crtc.c
>> @@ -959,3 +959,47 @@ bool drm_crtc_in_clone_mode(struct drm_crtc_state 
>> *crtc_state)
>>       return hweight32(crtc_state->encoder_mask) > 1;
>>   }
>>   EXPORT_SYMBOL(drm_crtc_in_clone_mode);
>> +
>> +struct drm_property *
>> +drm_common_create_color_pipeline_property(struct drm_device *dev, 
>> struct drm_mode_object *obj,
>> +                      const struct drm_prop_enum_list *pipelines,
>> +                      int num_pipelines)
> 
> All other functions I see in drm_crtc seem to be quite crtc
> specific. Would there be a better place to put this? Possibly
> a new file if nothing else seems to fit?
> 
> Not a blocker in any way, though.
Agreed. I think drivers/gpu/drm/drm_property.c would be a better place, 
as it contains functions to create the different types of drm_property 
already.

Will submit a proposal in v3.

Thanks,
Ariel

-- 
Ariel D'Alessandro
Software Engineer

Collabora Ltd.
Platinum Building, St John's Innovation Park, Cambridge CB4 0DS, UK 
Registered in England & Wales, no. 5513718




More information about the linux-arm-kernel mailing list