dri-devel Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Robert Mader <robert.mader@collabora.com>
To: dri-devel@lists.freedesktop.org
Subject: Re: [PATCH v1 1/4] drm: Guard DRM_CLIENT_CAP_PLANE_COLOR_PIPELINE behind driver feature
Date: Tue, 30 Jun 2026 10:47:13 +0200	[thread overview]
Message-ID: <7f28f870-6792-4820-9dcd-ccb2a731edd9@collabora.com> (raw)
In-Reply-To: <20260630084229.529682-2-robert.mader@collabora.com>

On 30.06.26 10:42, 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 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.

Sorry, forgot to append a change here. This would be

* Driver supports plane color pipelines.

in v2 (unless somebody requests another change).

> +	 */
> +	DRIVER_PLANE_COLOR_PIPELINE	= BIT(10),
>   
>   	/* IMPORTANT: Below are all the legacy flags, add new ones above. */
>   

-- 
Robert Mader
Consultant Software Developer

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


  reply	other threads:[~2026-06-30  8:47 UTC|newest]

Thread overview: 17+ 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 ` [PATCH v1 1/4] " Robert Mader
2026-06-30  8:47   ` Robert Mader [this message]
2026-06-30 16:57   ` Melissa Wen
2026-07-01  7:35     ` Robert Mader
2026-07-01  8:09       ` Robert Mader
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:58   ` sashiko-bot
2026-06-30  8:42 ` [PATCH v1 3/4] drm/i915: " Robert Mader
2026-06-30  8:57   ` sashiko-bot
2026-06-30  8:42 ` [PATCH v1 4/4] drm/vkms: " Robert Mader
2026-06-30  8:57   ` sashiko-bot
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=7f28f870-6792-4820-9dcd-ccb2a731edd9@collabora.com \
    --to=robert.mader@collabora.com \
    --cc=dri-devel@lists.freedesktop.org \
    /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