From: Chaitanya Kumar Borah <chaitanya.kumar.borah@intel.com>
To: dri-devel@lists.freedesktop.org, intel-gfx@lists.freedesktop.org,
intel-xe@lists.freedesktop.org
Cc: harry.wentland@amd.com, louis.chauvet@bootlin.com,
mwen@igalia.com, contact@emersion.fr, alex.hung@amd.com,
daniels@collabora.com, uma.shankar@intel.com,
maarten.lankhorst@intel.com, pekka.paalanen@collabora.com,
pranay.samala@intel.com, swati2.sharma@intel.com,
chaitanya.kumar.borah@intel.com
Subject: [PATCH v2 12/13] drm/i915/color: Program plane YUV range correction colorop
Date: Wed, 8 Apr 2026 10:45:13 +0530 [thread overview]
Message-ID: <20260408051514.608781-13-chaitanya.kumar.borah@intel.com> (raw)
In-Reply-To: <20260408051514.608781-1-chaitanya.kumar.borah@intel.com>
Hook up the INTEL_PLANE_CB_YUV_RANGE_CORRECT colorop to plane state and
program the corresponding plane color control bits. Track the colorop
state in intel_plane_state and enable/disable YUV range correction
based on the colorop bypass state.
Signed-off-by: Chaitanya Kumar Borah <chaitanya.kumar.borah@intel.com>
---
drivers/gpu/drm/i915/display/intel_display_types.h | 1 +
drivers/gpu/drm/i915/display/intel_plane.c | 3 +++
drivers/gpu/drm/i915/display/skl_universal_plane.c | 5 ++++-
3 files changed, 8 insertions(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/i915/display/intel_display_types.h b/drivers/gpu/drm/i915/display/intel_display_types.h
index 3347bba598d9..8f942683fc5c 100644
--- a/drivers/gpu/drm/i915/display/intel_display_types.h
+++ b/drivers/gpu/drm/i915/display/intel_display_types.h
@@ -681,6 +681,7 @@ struct intel_plane_state {
struct drm_property_blob *ctm, *degamma_lut, *gamma_lut, *lut_3d;
enum drm_colorop_fixed_matrix_type csc_ff_type; /* For SDR plane */
bool csc_ff_enable;
+ bool yuv_range_correct;
} hw;
struct i915_vma *ggtt_vma;
diff --git a/drivers/gpu/drm/i915/display/intel_plane.c b/drivers/gpu/drm/i915/display/intel_plane.c
index 3ef43db8d5d7..0ef06a42f2ac 100644
--- a/drivers/gpu/drm/i915/display/intel_plane.c
+++ b/drivers/gpu/drm/i915/display/intel_plane.c
@@ -384,6 +384,9 @@ intel_plane_color_copy_uapi_to_hw_state(struct intel_plane_state *plane_state,
!new_colorop_state->bypass;
plane_state->hw.csc_ff_type =
new_colorop_state->fixed_matrix_type;
+ } else if (intel_colorop->id == INTEL_PLANE_CB_YUV_RANGE_CORRECT) {
+ plane_state->hw.yuv_range_correct =
+ !new_colorop_state->bypass;
} else {
blob = new_colorop_state->bypass ?
NULL : new_colorop_state->data;
diff --git a/drivers/gpu/drm/i915/display/skl_universal_plane.c b/drivers/gpu/drm/i915/display/skl_universal_plane.c
index 2234abcd1b03..560093940ae3 100644
--- a/drivers/gpu/drm/i915/display/skl_universal_plane.c
+++ b/drivers/gpu/drm/i915/display/skl_universal_plane.c
@@ -1297,9 +1297,12 @@ static u32 glk_plane_color_ctl(const struct intel_plane_state *plane_state)
plane_color_ctl |= PLANE_COLOR_YUV_RANGE_CORRECTION_DISABLE;
}
- if (!icl_is_hdr_plane(display, plane->id))
+ if (!icl_is_hdr_plane(display, plane->id)) {
plane_color_ctl |= intel_csc_ff_type_to_csc_mode(plane_state->hw.csc_ff_type,
plane_state->hw.csc_ff_enable);
+ plane_color_ctl |= plane_state->hw.yuv_range_correct ? 0 :
+ PLANE_COLOR_YUV_RANGE_CORRECTION_DISABLE;
+ }
if (plane_state->force_black)
plane_color_ctl |= PLANE_COLOR_PLANE_CSC_ENABLE;
--
2.25.1
next prev parent reply other threads:[~2026-04-08 5:40 UTC|newest]
Thread overview: 28+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-04-08 5:15 [PATCH v2 00/13] drm/i915/color: Enable SDR plane color pipeline Chaitanya Kumar Borah
2026-04-08 5:15 ` [PATCH v2 01/13] drm/colorop: Add DRM_COLOROP_FIXED_MATRIX Chaitanya Kumar Borah
2026-04-12 3:07 ` Claude review: " Claude Code Review Bot
2026-04-08 5:15 ` [PATCH v2 02/13] drm/i915/color: Add CSC on SDR plane color pipeline Chaitanya Kumar Borah
2026-04-12 3:07 ` Claude review: " Claude Code Review Bot
2026-04-08 5:15 ` [PATCH v2 03/13] drm/i915/color: Program fixed-function CSC on SDR planes Chaitanya Kumar Borah
2026-04-12 3:07 ` Claude review: " Claude Code Review Bot
2026-04-08 5:15 ` [PATCH v2 04/13] drm/i915/color: Add support for 1D LUT in " Chaitanya Kumar Borah
2026-04-12 3:07 ` Claude review: " Claude Code Review Bot
2026-04-08 5:15 ` [PATCH v2 05/13] drm/i915/color: Fix HDR pre-CSC LUT programming loop Chaitanya Kumar Borah
2026-04-12 3:07 ` Claude review: " Claude Code Review Bot
2026-04-08 5:15 ` [PATCH v2 06/13] drm/i915/color: Extract HDR pre-CSC LUT programming to helper function Chaitanya Kumar Borah
2026-04-12 3:07 ` Claude review: " Claude Code Review Bot
2026-04-08 5:15 ` [PATCH v2 07/13] drm/i915/color: Program Pre-CSC registers for SDR Chaitanya Kumar Borah
2026-04-12 3:07 ` Claude review: " Claude Code Review Bot
2026-04-08 5:15 ` [PATCH v2 08/13] drm/i915/color: Extract HDR post-CSC LUT programming to helper function Chaitanya Kumar Borah
2026-04-12 3:07 ` Claude review: " Claude Code Review Bot
2026-04-08 5:15 ` [PATCH v2 09/13] drm/i915/color: Program Plane Post CSC registers for SDR planes Chaitanya Kumar Borah
2026-04-12 3:07 ` Claude review: " Claude Code Review Bot
2026-04-08 5:15 ` [PATCH v2 10/13] drm/i915/color: Add color pipeline support " Chaitanya Kumar Borah
2026-04-12 3:07 ` Claude review: " Claude Code Review Bot
2026-04-08 5:15 ` [PATCH v2 11/13] drm/i915/color: Add YCbCr limited-to-full range color block support Chaitanya Kumar Borah
2026-04-12 3:07 ` Claude review: " Claude Code Review Bot
2026-04-08 5:15 ` Chaitanya Kumar Borah [this message]
2026-04-12 3:07 ` Claude review: drm/i915/color: Program plane YUV range correction colorop Claude Code Review Bot
2026-04-08 5:15 ` [PATCH v2 13/13] drm/i915/color: Add YUV range correction to SDR plane pipeline Chaitanya Kumar Borah
2026-04-12 3:07 ` Claude review: " Claude Code Review Bot
2026-04-12 3:07 ` Claude review: drm/i915/color: Enable SDR plane color pipeline Claude Code Review Bot
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=20260408051514.608781-13-chaitanya.kumar.borah@intel.com \
--to=chaitanya.kumar.borah@intel.com \
--cc=alex.hung@amd.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=intel-xe@lists.freedesktop.org \
--cc=louis.chauvet@bootlin.com \
--cc=maarten.lankhorst@intel.com \
--cc=mwen@igalia.com \
--cc=pekka.paalanen@collabora.com \
--cc=pranay.samala@intel.com \
--cc=swati2.sharma@intel.com \
--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