From: Robert Mader <robert.mader@collabora.com>
To: dri-devel@lists.freedesktop.org
Cc: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>,
Maxime Ripard <mripard@kernel.org>,
Thomas Zimmermann <tzimmermann@suse.de>,
David Airlie <airlied@gmail.com>, Simona Vetter <simona@ffwll.ch>,
linux-kernel@vger.kernel.org, amd-gfx@lists.freedesktop.org,
intel-gfx@lists.freedesktop.org,
Harry Wentland <harry.wentland@amd.com>,
Daniel Stone <daniels@collabora.com>,
Chaitanya Kumar Borah <chaitanya.kumar.borah@intel.com>,
Uma Shankar <uma.shankar@intel.com>,
Louis Chauvet <louis.chauvet@bootlin.com>,
Melissa Wen <mwen@igalia.com>, Simon Ser <contact@emersion.fr>,
Pekka Paalanen <pekka.paalanen@collabora.com>,
Leandro Ribeiro <leandro.ribeiro@collabora.com>,
Robert Mader <robert.mader@collabora.com>
Subject: [PATCH v1 1/4] drm: Guard DRM_CLIENT_CAP_PLANE_COLOR_PIPELINE behind driver feature
Date: Tue, 30 Jun 2026 10:42:26 +0200 [thread overview]
Message-ID: <20260630084229.529682-2-robert.mader@collabora.com> (raw)
In-Reply-To: <20260630084229.529682-1-robert.mader@collabora.com>
The client cap is currently advertised unconditionally, even for drivers that do
not support plane color pipelines. If clients supporting the later, like Wayland
compositors and drm_info, enable the client cap on sich drivers they will be
left without both color pipeline and the legacy properties COLOR_ENCODING and
COLOR_RANGE, effectively breaking YUV->RGB conversion support.
Add a new driver feature and guard the client cap behind it, allowing
plane color pipeline and legacy YUV->RGB support to co-exist.
Signed-off-by: Robert Mader <robert.mader@collabora.com>
---
drivers/gpu/drm/drm_ioctl.c | 2 ++
include/drm/drm_drv.h | 6 ++++++
2 files changed, 8 insertions(+)
diff --git a/drivers/gpu/drm/drm_ioctl.c b/drivers/gpu/drm/drm_ioctl.c
index ff193155129e..96fda92e31b9 100644
--- a/drivers/gpu/drm/drm_ioctl.c
+++ b/drivers/gpu/drm/drm_ioctl.c
@@ -374,6 +374,8 @@ drm_setclientcap(struct drm_device *dev, void *data, struct drm_file *file_priv)
file_priv->supports_virtualized_cursor_plane = req->value;
break;
case DRM_CLIENT_CAP_PLANE_COLOR_PIPELINE:
+ if (!drm_core_check_feature(dev, DRIVER_PLANE_COLOR_PIPELINE))
+ return -EOPNOTSUPP;
if (!file_priv->atomic)
return -EINVAL;
if (req->value > 1)
diff --git a/include/drm/drm_drv.h b/include/drm/drm_drv.h
index e09559495c5b..108ddd2c8d30 100644
--- a/include/drm/drm_drv.h
+++ b/include/drm/drm_drv.h
@@ -116,6 +116,12 @@ enum drm_driver_feature {
* the cursor planes to work correctly).
*/
DRIVER_CURSOR_HOTSPOT = BIT(9),
+ /**
+ * @DRIVER_PLANE_COLOR_PIPELINE:
+ *
+ * Driver supports PLANE_COLOR_PIPELINE.
+ */
+ DRIVER_PLANE_COLOR_PIPELINE = BIT(10),
/* IMPORTANT: Below are all the legacy flags, add new ones above. */
--
2.54.0
next prev parent reply other threads:[~2026-06-30 8:43 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-06-30 8:42 [PATCH v1 0/4] drm: Guard DRM_CLIENT_CAP_PLANE_COLOR_PIPELINE behind driver feature Robert Mader
2026-06-30 8:42 ` Robert Mader [this message]
2026-06-30 16:57 ` [PATCH v1 1/4] " Melissa Wen
[not found] ` <9eb18964-fcca-4fce-9fb9-f36d762ac23e@collabora.com>
[not found] ` <267deaf4-55ec-492d-8646-e16a9b4bfb65@collabora.com>
2026-07-01 8:28 ` Borah, Chaitanya Kumar
2026-06-30 8:42 ` [PATCH v1 2/4] drm/amdgpu: Add DRIVER_PLANE_COLOR_PIPELINE " Robert Mader
2026-06-30 8:42 ` [PATCH v1 3/4] drm/i915: " Robert Mader
2026-06-30 8:42 ` [PATCH v1 4/4] drm/vkms: " Robert Mader
2026-07-01 10:41 ` [PATCH v1 0/4] drm: Guard DRM_CLIENT_CAP_PLANE_COLOR_PIPELINE behind " Maarten Lankhorst
2026-07-01 13:32 ` Robert Mader
2026-07-01 14:26 ` Maarten Lankhorst
2026-07-01 16:10 ` Robert Mader
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20260630084229.529682-2-robert.mader@collabora.com \
--to=robert.mader@collabora.com \
--cc=airlied@gmail.com \
--cc=amd-gfx@lists.freedesktop.org \
--cc=chaitanya.kumar.borah@intel.com \
--cc=contact@emersion.fr \
--cc=daniels@collabora.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=harry.wentland@amd.com \
--cc=intel-gfx@lists.freedesktop.org \
--cc=leandro.ribeiro@collabora.com \
--cc=linux-kernel@vger.kernel.org \
--cc=louis.chauvet@bootlin.com \
--cc=maarten.lankhorst@linux.intel.com \
--cc=mripard@kernel.org \
--cc=mwen@igalia.com \
--cc=pekka.paalanen@collabora.com \
--cc=simona@ffwll.ch \
--cc=tzimmermann@suse.de \
--cc=uma.shankar@intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox