dri-devel Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: sashiko-bot@kernel.org
To: "Robert Mader" <robert.mader@collabora.com>
Cc: dri-devel@lists.freedesktop.org
Subject: Re: [PATCH v1 2/4] drm/amdgpu: Add DRIVER_PLANE_COLOR_PIPELINE driver feature
Date: Tue, 30 Jun 2026 08:58:02 +0000	[thread overview]
Message-ID: <20260630085802.ACA671F000E9@smtp.kernel.org> (raw)
In-Reply-To: <20260630084229.529682-3-robert.mader@collabora.com>

Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [High] Unconditional advertisement of DRIVER_PLANE_COLOR_PIPELINE breaks legacy YUV-to-RGB conversion on pre-DCN 3.0 hardware.
--

commit 0f146a9591dc47b975ea73aa0e04b2950fb4ede5
Author: Robert Mader <robert.mader@collabora.com>

drm/amdgpu: Add DRIVER_PLANE_COLOR_PIPELINE driver feature

Adds the DRIVER_PLANE_COLOR_PIPELINE feature to the AMDGPU kms driver
structure to satisfy requirements for DRM_CLIENT_CAP_PLANE_COLOR_PIPELINE.

> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c
> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c
> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c
> @@ -3092,7 +3092,7 @@ static const struct drm_driver amdgpu_kms_driver = {
>  	    DRIVER_ATOMIC |
>  	    DRIVER_GEM |
>  	    DRIVER_RENDER | DRIVER_MODESET | DRIVER_SYNCOBJ |
> -	    DRIVER_SYNCOBJ_TIMELINE,
> +	    DRIVER_SYNCOBJ_TIMELINE | DRIVER_PLANE_COLOR_PIPELINE,

[Severity: High]
Does advertising this feature unconditionally break legacy YUV-to-RGB conversion
on pre-DCN 3.0 hardware?

When a DRM client enables DRM_CLIENT_CAP_PLANE_COLOR_PIPELINE based on this
flag, the DRM core hides the legacy COLOR_ENCODING and COLOR_RANGE properties.

However, looking at dm_plane_init_colorops(), the actual COLOR_PIPELINE
property is only initialized for newer hardware:

drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_plane.c:dm_plane_init_colorops()
    ...
    if (dc->ctx->dce_version >= DCN_VERSION_3_0) {
        ret = amdgpu_dm_initialize_default_pipeline(plane, &pipelines[len]);
    ...

If the replacement COLOR_PIPELINE property is not attached on older hardware
(like Polaris or Vega), and the legacy properties are hidden, userspace will
have no way to configure YUV-to-RGB conversion. 

Should this capability only be exposed when the underlying hardware actually
supports and attaches the new pipeline properties?

>  	.open = amdgpu_driver_open_kms,
>  	.postclose = amdgpu_driver_postclose_kms,
>  	.ioctls = amdgpu_ioctls_kms,

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/20260630084229.529682-1-robert.mader@collabora.com?part=2

  reply	other threads:[~2026-06-30  8:58 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
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 [this message]
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=20260630085802.ACA671F000E9@smtp.kernel.org \
    --to=sashiko-bot@kernel.org \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=robert.mader@collabora.com \
    --cc=sashiko-reviews@lists.linux.dev \
    /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