From: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
To: Robert Mader <robert.mader@collabora.com>,
dri-devel@lists.freedesktop.org
Cc: 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>
Subject: Re: [PATCH v3] drm: Guard DRM_CLIENT_CAP_PLANE_COLOR_PIPELINE
Date: Tue, 7 Jul 2026 10:26:52 +0200 [thread overview]
Message-ID: <a346493c-047f-4b3b-b344-39b0266348ad@linux.intel.com> (raw)
In-Reply-To: <20260703073230.19982-1-robert.mader@collabora.com>
Hey,
This probably would be useful to backport to stable, can I add those tags and merge it?
Fixes: 179ab8e7d7b3 ("drm/colorop: Introduce DRM_CLIENT_CAP_PLANE_COLOR_PIPELINE")
Cc: <stable@vger.kernel.org> # v6.19+
Kind regards,
~Maarten Lankhorst
On 7/3/26 09:32, Robert Mader wrote:
> 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 or tools like drm_info, enable the client cap on
> such drivers they will be left without both color pipeline and the legacy
> properties COLOR_ENCODING and COLOR_RANGE, effectively breaking YUV->RGB
> conversion support.
>
> Prevent that by only marking the cap supported if there are actually planes
> with color pipelines.
>
> Note: while the color pipeline replacement for the legacy properties is
> still under review (1), we can assume that it will work as a drop-in
> replacement. That means any plane on any hardware currently supporting
> the legacy properties will be able to offer a functionally equal color
> pipeline and there will be no technical reason keep using the legacy
> properties if both the driver and the client support the new API.
>
> 1: https://lore.kernel.org/dri-devel/20260623164812.81110-1-harry.wentland@amd.com/
>
> Signed-off-by: Robert Mader <robert.mader@collabora.com>
>
> ---
>
> Changes in v3:
> - Move the new check behind the existing EINVAL ones
> - Rebase on latest drm-misc-next
>
> Changes in v2:
> - Replace the driver feature with a simple check (suggested by Maarten
> Lankhorst <maarten.lankhorst@linux.intel.com>)
> - Expand the commit message slightly and change the title
> ---
> drivers/gpu/drm/drm_ioctl.c | 14 +++++++++++++-
> 1 file changed, 13 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/drm_ioctl.c b/drivers/gpu/drm/drm_ioctl.c
> index e2df4becce62..9039a39c4324 100644
> --- a/drivers/gpu/drm/drm_ioctl.c
> +++ b/drivers/gpu/drm/drm_ioctl.c
> @@ -373,13 +373,25 @@ drm_setclientcap(struct drm_device *dev, void *data, struct drm_file *file_priv)
> return -EINVAL;
> file_priv->supports_virtualized_cursor_plane = req->value;
> break;
> - case DRM_CLIENT_CAP_PLANE_COLOR_PIPELINE:
> + case DRM_CLIENT_CAP_PLANE_COLOR_PIPELINE: {
> + struct drm_plane *plane;
> + bool has_plane_with_color_pipeline = false;
> +
> if (!file_priv->atomic)
> return -EINVAL;
> if (req->value > 1)
> return -EINVAL;
> + drm_for_each_plane(plane, dev) {
> + if (plane->color_pipeline_property) {
> + has_plane_with_color_pipeline = true;
> + break;
> + }
> + }
> + if (!has_plane_with_color_pipeline)
> + return -EOPNOTSUPP;
> file_priv->plane_color_pipeline = req->value;
> break;
> + }
> default:
> return -EINVAL;
> }
next prev parent reply other threads:[~2026-07-07 8:26 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-07-03 7:32 [PATCH v3] drm: Guard DRM_CLIENT_CAP_PLANE_COLOR_PIPELINE Robert Mader
2026-07-03 8:38 ` ✓ i915.CI.BAT: success for drm: Guard DRM_CLIENT_CAP_PLANE_COLOR_PIPELINE (rev2) Patchwork
2026-07-03 11:11 ` [PATCH v3] drm: Guard DRM_CLIENT_CAP_PLANE_COLOR_PIPELINE Melissa Wen
2026-07-04 1:34 ` ✗ i915.CI.Full: failure for drm: Guard DRM_CLIENT_CAP_PLANE_COLOR_PIPELINE (rev2) Patchwork
2026-07-07 8:03 ` [PATCH v3] drm: Guard DRM_CLIENT_CAP_PLANE_COLOR_PIPELINE Borah, Chaitanya Kumar
2026-07-07 13:01 ` Maarten Lankhorst
2026-07-07 13:15 ` Robert Mader
2026-07-07 14:17 ` Maarten Lankhorst
2026-07-09 6:44 ` Borah, Chaitanya Kumar
2026-07-09 10:02 ` Maarten Lankhorst
2026-07-09 11:14 ` Robert Mader
2026-07-09 11:49 ` Maarten Lankhorst
2026-07-13 20:05 ` Harry Wentland
2026-07-07 8:26 ` Maarten Lankhorst [this message]
2026-07-07 8:31 ` 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=a346493c-047f-4b3b-b344-39b0266348ad@linux.intel.com \
--to=maarten.lankhorst@linux.intel.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=mripard@kernel.org \
--cc=mwen@igalia.com \
--cc=pekka.paalanen@collabora.com \
--cc=robert.mader@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.