From: Alex Hung <alex.hung@amd.com>
To: Melissa Wen <mwen@igalia.com>,
harry.wentland@amd.com, sunpeng.li@amd.com, siqueira@igalia.com,
alexander.deucher@amd.com, christian.koenig@amd.com,
airlied@gmail.com, simona@ffwll.ch, anthony.koo@amd.com,
krunoslav.kovac@amd.com, wayne.lin@amd.com
Cc: Aurabindo Pillai <Aurabindo.Pillai@amd.com>,
amd-gfx@lists.freedesktop.org, dri-devel@lists.freedesktop.org,
kernel-dev@igalia.com
Subject: Re: [PATCH] drm/amd/display: fix wrong color value mapping on MCM shaper LUT
Date: Mon, 2 Feb 2026 17:40:26 -0700 [thread overview]
Message-ID: <7116d562-698f-488d-8262-8517749fb556@amd.com> (raw)
In-Reply-To: <20260122152058.52036-1-mwen@igalia.com>
Reviewed-by: Alex Hung <alex.hung@amd.com>
On 1/22/26 08:20, Melissa Wen wrote:
> Some shimmer/colorful points appears when using the steamOS color
> pipeline for HDR on gaming with DCN32. These points look like black
> values being wrongly mapped to red/blue/green values. It was caused
> because the number of hw points in regular LUTs and in a shaper LUT was
> treated as the same.
>
> DCN3+ regular LUTs have 257 bases and implicit deltas (i.e. HW
> calculates them), but shaper LUT is a special case: it has 256 bases and
> 256 deltas, as in DCN1-2 regular LUTs, and outputs 14-bit values.
>
> Fix that by setting by decreasing in 1 the number of HW points computed
> in the LUT segmentation so that shaper LUT (i.e. fixpoint == true) keeps
> the same DCN10 CM logic and regular LUTs go with `hw_points + 1`.
>
> CC: Krunoslav Kovac <Krunoslav.Kovac@amd.com>
> Fixes: 4d5fd3d08ea9 ("drm/amd/display: PQ tail accuracy")
> Signed-off-by: Melissa Wen <mwen@igalia.com>
> ---
> drivers/gpu/drm/amd/display/dc/dcn30/dcn30_cm_common.c | 7 +++++--
> 1 file changed, 5 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/gpu/drm/amd/display/dc/dcn30/dcn30_cm_common.c b/drivers/gpu/drm/amd/display/dc/dcn30/dcn30_cm_common.c
> index 0690c346f2c5..a4f14b16564c 100644
> --- a/drivers/gpu/drm/amd/display/dc/dcn30/dcn30_cm_common.c
> +++ b/drivers/gpu/drm/amd/display/dc/dcn30/dcn30_cm_common.c
> @@ -163,6 +163,11 @@ bool cm3_helper_translate_curve_to_hw_format(
> hw_points += (1 << seg_distr[k]);
> }
>
> + // DCN3+ have 257 pts in lieu of no separate slope registers
> + // Prior HW had 256 base+slope pairs
> + // Shaper LUT (i.e. fixpoint == true) is still 256 bases and 256 deltas
> + hw_points = fixpoint ? (hw_points - 1) : hw_points;
> +
> j = 0;
> for (k = 0; k < (region_end - region_start); k++) {
> increment = NUMBER_SW_SEGMENTS / (1 << seg_distr[k]);
> @@ -223,8 +228,6 @@ bool cm3_helper_translate_curve_to_hw_format(
> corner_points[1].green.slope = dc_fixpt_zero;
> corner_points[1].blue.slope = dc_fixpt_zero;
>
> - // DCN3+ have 257 pts in lieu of no separate slope registers
> - // Prior HW had 256 base+slope pairs
> lut_params->hw_points_num = hw_points + 1;
>
> k = 0;
prev parent reply other threads:[~2026-02-03 0:40 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-01-22 15:20 [PATCH] drm/amd/display: fix wrong color value mapping on MCM shaper LUT Melissa Wen
2026-02-03 0:40 ` Alex Hung [this message]
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=7116d562-698f-488d-8262-8517749fb556@amd.com \
--to=alex.hung@amd.com \
--cc=Aurabindo.Pillai@amd.com \
--cc=airlied@gmail.com \
--cc=alexander.deucher@amd.com \
--cc=amd-gfx@lists.freedesktop.org \
--cc=anthony.koo@amd.com \
--cc=christian.koenig@amd.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=harry.wentland@amd.com \
--cc=kernel-dev@igalia.com \
--cc=krunoslav.kovac@amd.com \
--cc=mwen@igalia.com \
--cc=simona@ffwll.ch \
--cc=siqueira@igalia.com \
--cc=sunpeng.li@amd.com \
--cc=wayne.lin@amd.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