dri-devel Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: "Borah, Chaitanya Kumar" <chaitanya.kumar.borah@intel.com>
To: Sean Paul <sean@poorly.run>, <intel-gfx@lists.freedesktop.org>,
	<jani.nikula@linux.intel.com>
Cc: Sean Paul <seanpaul@google.com>,
	Rodrigo Vivi <rodrigo.vivi@intel.com>,
	Joonas Lahtinen <joonas.lahtinen@linux.intel.com>,
	Tvrtko Ursulin <tursulin@ursulin.net>,
	David Airlie <airlied@gmail.com>, Simona Vetter <simona@ffwll.ch>,
	<intel-xe@lists.freedesktop.org>,
	<dri-devel@lists.freedesktop.org>
Subject: Re: [PATCH v3 2/2] drm/i915/color: Fix step discontinuity in Pre-CSC Gamma LUT
Date: Mon, 1 Jun 2026 11:34:33 +0530	[thread overview]
Message-ID: <3798d16f-fe08-4a6e-8cd9-06cf7bc692ed@intel.com> (raw)
In-Reply-To: <20260528230817.2455072-2-sean@poorly.run>



On 5/29/2026 4:37 AM, Sean Paul wrote:
> From: Sean Paul <seanpaul@google.com>
> 
> Clamp Segment 2 to the last user-provided LUT entry value instead of
> hardcoding it to 1.0 (1 << 24) to fix a step discontinuity.
> 

It defintely make sense to me that the point corresponding to 1.0 should 
be programmed to the max lut value that user-space provide. I am not 
quite sure what should be the case for 3.0 and 7.0, however, I presume 
it should be harmless for now. So as of now LGTM.

Reviewed-by: Chaitanya Kumar Borah <chaitanya.kumar.borah@intel.com>

> Signed-off-by: Sean Paul <seanpaul@google.com>
> Link: https://lore.kernel.org/intel-gfx/20260521180143.2143262-1-sean@poorly.run/ #v1
> Link: https://lore.kernel.org/intel-gfx/20260525135730.1122696-2-sean@poorly.run/ #v2
> 
> Changes in v2:
> - Split out into separate patches for pre/post csc fixes
> - Dropped loop bounds fix in favor of [1]
> Changes in v3:
> - Fix stale commit message
> 
> [1]- https://lore.kernel.org/r/20260519075245.383864-1-pranay.samala@intel.com
> ---
>   drivers/gpu/drm/i915/display/intel_color.c | 5 +++--
>   1 file changed, 3 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/gpu/drm/i915/display/intel_color.c b/drivers/gpu/drm/i915/display/intel_color.c
> index 7185f3628dcf..458508bcf1f4 100644
> --- a/drivers/gpu/drm/i915/display/intel_color.c
> +++ b/drivers/gpu/drm/i915/display/intel_color.c
> @@ -3968,6 +3968,7 @@ xelpd_program_plane_pre_csc_lut(struct intel_dsb *dsb,
>   	enum plane_id plane = to_intel_plane(state->plane)->id;
>   	const struct drm_color_lut32 *pre_csc_lut = plane_state->hw.degamma_lut->data;
>   	u32 i, lut_size;
> +	u32 lut_val = 1 << 24;
>   
>   	if (icl_is_hdr_plane(display, plane)) {
>   		lut_size = 128;
> @@ -3978,7 +3979,7 @@ xelpd_program_plane_pre_csc_lut(struct intel_dsb *dsb,
>   
>   		if (pre_csc_lut) {
>   			for (i = 0; i < lut_size; i++) {
> -				u32 lut_val = drm_color_lut32_extract(pre_csc_lut[i].green, 24);
> +				lut_val = drm_color_lut32_extract(pre_csc_lut[i].green, 24);
>   
>   				intel_de_write_dsb(display, dsb,
>   						   PLANE_PRE_CSC_GAMC_DATA_ENH(pipe, plane, 0),
> @@ -3990,7 +3991,7 @@ xelpd_program_plane_pre_csc_lut(struct intel_dsb *dsb,
>   			do {
>   				intel_de_write_dsb(display, dsb,
>   						   PLANE_PRE_CSC_GAMC_DATA_ENH(pipe, plane, 0),
> -						   (1 << 24));
> +						   lut_val);
>   			} while (i++ < 130);
>   		} else {
>   			for (i = 0; i < lut_size; i++) {


  parent reply	other threads:[~2026-06-01  6:04 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-05-28 23:07 [PATCH v3 1/2] drm/i915/color: Fix step discontinuity in Post-CSC Gamma LUT Sean Paul
2026-05-28 23:07 ` [PATCH v3 2/2] drm/i915/color: Fix step discontinuity in Pre-CSC " Sean Paul
2026-05-31 18:41   ` Shankar, Uma
2026-06-01  6:04   ` Borah, Chaitanya Kumar [this message]
2026-05-31 18:39 ` [PATCH v3 1/2] drm/i915/color: Fix step discontinuity in Post-CSC " Shankar, Uma
2026-06-01  6:21 ` Borah, Chaitanya Kumar
2026-06-02 16:27 ` Shankar, Uma

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=3798d16f-fe08-4a6e-8cd9-06cf7bc692ed@intel.com \
    --to=chaitanya.kumar.borah@intel.com \
    --cc=airlied@gmail.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=intel-xe@lists.freedesktop.org \
    --cc=jani.nikula@linux.intel.com \
    --cc=joonas.lahtinen@linux.intel.com \
    --cc=rodrigo.vivi@intel.com \
    --cc=sean@poorly.run \
    --cc=seanpaul@google.com \
    --cc=simona@ffwll.ch \
    --cc=tursulin@ursulin.net \
    /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