Re: [PATCH v1 0/4] drm: Guard DRM_CLIENT_CAP_PLANE_COLOR_PIPELINE behind driver feature

From: Robert Mader

Date: Wed Jul 01 2026 - 12:24:33 EST


Hey Maarten,

On 01.07.26 16:26, Maarten Lankhorst wrote:
Hey,


On 7/1/26 15:32, Robert Mader wrote:
Hi Maarten,

On 01.07.26 12:41, Maarten Lankhorst wrote:
Hello,

All you have to do is iterate over all planes at runtime until
one is found that has the pipeline property attached, it's not
a performance sensitive area and no locking is required for
testing if plane->color_pipeline_property is NULL.
that's correct - I checked that before and while the amount of code changes necessary to support such a "check-planes-with-cap-enabled-and-reinitialize-without-cap-otherwise" is not big (AFAICS it should be possible with under 100 lines in Weston), it would need to be replicated in various Wayland compositors and lots of apps with native DRM backend (drm_info, Gstreamer KMS sink, MPV, Kodi etc.). The small change proposed here seems like a more elegant solution to me.

In a previous chat Pekka and Simon seemed to agree, quoting: "< emersion> pq, you mean the cap is advertised regardless of driver support? that sounds like a bug".
You misunderstand my comment, I meant this from the kernel side.

Ouch, you are right - and iterating over all planes in `drm_setclientcap()` with `drm_for_each_plane()` indeed looks like the much easier and cleaner solution. Will send out a v2 doing that and ditching the new cap again.

Thanks!

--
Robert Mader
Consultant Software Developer

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