From: sashiko-bot@kernel.org
To: "Robert Mader" <robert.mader@collabora.com>
Cc: dri-devel@lists.freedesktop.org
Subject: Re: [PATCH v1 3/4] drm/i915: Add DRIVER_PLANE_COLOR_PIPELINE driver feature
Date: Tue, 30 Jun 2026 08:57:36 +0000 [thread overview]
Message-ID: <20260630085736.E50921F000E9@smtp.kernel.org> (raw)
In-Reply-To: <20260630084229.529682-4-robert.mader@collabora.com>
Thank you for your contribution! Sashiko AI review found 2 potential issue(s) to consider:
- [High] The i915 driver API contract violation: fails to ignore legacy pre-blend color operations (COLOR_ENCODING and COLOR_RANGE) when the DRM_CLIENT_CAP_PLANE_COLOR_PIPELINE capability is set.
- [Medium] The DRIVER_PLANE_COLOR_PIPELINE feature flag is missing for the Xe driver, making the plane color pipeline capability unavailable despite shared and implemented support.
--
commit be3a060691e463c76013f01322ae2330b3817960
Author: Robert Mader <robert.mader@collabora.com>
drm/i915: Add DRIVER_PLANE_COLOR_PIPELINE driver feature
Which is now required for DRM_CLIENT_CAP_PLANE_COLOR_PIPELINE.
> diff --git a/drivers/gpu/drm/i915/i915_driver.c b/drivers/gpu/drm/i915/i915_driver.c
> index f0105c5b49a71..139848bf903cb 100644
> --- a/drivers/gpu/drm/i915/i915_driver.c
> +++ b/drivers/gpu/drm/i915/i915_driver.c
> @@ -1860,7 +1860,7 @@ static const struct drm_driver i915_drm_driver = {
> .driver_features =
> DRIVER_GEM |
> DRIVER_RENDER | DRIVER_MODESET | DRIVER_ATOMIC | DRIVER_SYNCOBJ |
> - DRIVER_SYNCOBJ_TIMELINE,
> + DRIVER_SYNCOBJ_TIMELINE | DRIVER_PLANE_COLOR_PIPELINE,
[Severity: High]
Does enabling this feature reveal a logic bug where legacy color properties
aren't ignored when the client uses plane color pipelines?
When a client uses DRM_CLIENT_CAP_PLANE_COLOR_PIPELINE and configures a color
pipeline on a plane with a YUV framebuffer, the driver unconditionally copies
legacy UAPI properties to the hardware state in
drivers/gpu/drm/i915/display/intel_plane.c:
intel_plane_copy_uapi_to_hw_state() {
...
plane_state->hw.color_encoding = from_plane_state->uapi.color_encoding;
plane_state->hw.color_range = from_plane_state->uapi.color_range;
...
}
This leads to the hardware input CSC being programmed using the legacy
color_encoding in drivers/gpu/drm/i915/display/skl_universal_plane.c:
icl_program_input_csc() {
...
const u16 *csc = input_csc_matrix[plane_state->hw.color_encoding];
...
}
Will this cause a hidden YUV-to-RGB conversion to be applied, violating the
explicit color pipeline contract?
[Severity: Medium]
Since the Xe driver shares the i915 display stack and fully implements plane
color pipelines, does it also need this driver feature flag?
Userspace attempting to set DRM_CLIENT_CAP_PLANE_COLOR_PIPELINE on Xe hardware
will currently get -EOPNOTSUPP because the feature is missing in
drivers/gpu/drm/xe/display/xe_display.c:
xe_display_driver_set_hooks() {
...
driver->driver_features |= DRIVER_MODESET | DRIVER_ATOMIC;
...
}
Should DRIVER_PLANE_COLOR_PIPELINE be added to xe_display_driver_set_hooks()
as well?
> .release = i915_driver_release,
> .open = i915_driver_open,
> .postclose = i915_driver_postclose,
--
Sashiko AI review · https://sashiko.dev/#/patchset/20260630084229.529682-1-robert.mader@collabora.com?part=3
next prev parent reply other threads:[~2026-06-30 8:57 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
2026-06-30 8:42 ` [PATCH v1 3/4] drm/i915: " Robert Mader
2026-06-30 8:57 ` sashiko-bot [this message]
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=20260630085736.E50921F000E9@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