From: Claude Code Review Bot <claude-review@example.com>
To: dri-devel-reviews@example.com
Subject: Claude review: better LUT segmentation for EOTFs
Date: Thu, 07 May 2026 13:11:56 +1000 [thread overview]
Message-ID: <review-overall-20260506191606.15022-1-mwen@igalia.com> (raw)
In-Reply-To: <20260506191606.15022-1-mwen@igalia.com>
Overall Series Review
Subject: better LUT segmentation for EOTFs
Author: Melissa Wen <mwen@igalia.com>
Patches: 6
Reviewed: 2026-05-07T13:11:56.356959
---
This is a well-motivated 5-patch series addressing gradient banding in HDR content (specifically PQ EOTFs) when AMD display hardware lacks fixed-function curves for certain color blocks (shaper, blend, regamma). The core insight is sound: the existing code used the same LUT segmentation helper (`cm3_helper_translate_curve_to_hw_format`) for both EOTFs (encoded→linear, degamma-like) and inverse EOTFs (linear→encoded, regamma-like), despite these having fundamentally different input domains and curvature distributions.
**Structure**: Patches 1-3 form the main fix — enabling GAMCOR for subsampled formats, reintroducing the degamma-specific translation helper, and wiring it up. Patches 4-5 are a precision refinement — adding interpolation and a halving segment distribution for PQ/sRGB. The author honestly notes patches 4-5 didn't produce visible improvement, which is refreshing transparency.
**Correctness**: The math checks out. Array bounds are respected (`rgb_resulted` has 259 entries, max `hw_points` is 256; `TRANSFER_FUNC_POINTS` is 1025, max tf_pts index accessed is 401). The `interp_tf_pts` interpolation is clean and correctly degenerates to a direct lookup when `seg_distr[k] <= 4`. The NULL-ramp path through `mod_color_calculate_degamma_params` is safe — all ramp dereferences are guarded by `ramp &&` checks.
**Scope**: Changes are tightly scoped to DCN3+ hardware (dcn32_hwseq.c), touching only 4 files. The series is reviewable and bisectable.
**Minor concerns**: One whitespace issue in patch 1, and the revert in patch 2 could benefit from a brief note about what was changed from the original removed code (if anything). Overall the series looks ready with minor fixes.
---
---
Generated by Claude Code Patch Reviewer
prev parent reply other threads:[~2026-05-07 3:11 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-05-06 19:11 [PATCH v2 0/5] better LUT segmentation for EOTFs Melissa Wen
2026-05-06 19:11 ` [PATCH v2 1/5] drm/amd/display: use GAMCOR for degamma private props in subsampled format Melissa Wen
2026-05-07 3:11 ` Claude review: " Claude Code Review Bot
2026-05-06 19:11 ` [PATCH v2 2/5] Revert "drm/amd/display: Remove unused cm3_helper_translate_curve_to_degamma_hw_format" Melissa Wen
2026-05-07 3:11 ` Claude review: " Claude Code Review Bot
2026-05-06 19:11 ` [PATCH v2 3/5] drm/amd/display: use a separate helper to translate degamma curves Melissa Wen
2026-05-07 3:11 ` Claude review: " Claude Code Review Bot
2026-05-06 19:11 ` [PATCH v2 4/5] drm/amd/display: support up to 256 samples per region in degamma/blend LUT Melissa Wen
2026-05-07 3:11 ` Claude review: " Claude Code Review Bot
2026-05-06 19:11 ` [PATCH v2 5/5] drm/amd/display: use halving distribution for PQ/sRGB linearizing LUT Melissa Wen
2026-05-07 3:11 ` Claude review: " Claude Code Review Bot
2026-05-07 3:11 ` Claude Code Review Bot [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=review-overall-20260506191606.15022-1-mwen@igalia.com \
--to=claude-review@example.com \
--cc=dri-devel-reviews@example.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