From mboxrd@z Thu Jan 1 00:00:00 1970 From: Claude Code Review Bot To: dri-devel-reviews@example.com Subject: Claude review: drm/dp: Define DSC bpp delta DPCD fields Date: Thu, 23 Apr 2026 10:06:55 +1000 Message-ID: In-Reply-To: <20260420112611.1481530-2-nemesa.garg@intel.com> References: <20260420112611.1481530-1-nemesa.garg@intel.com> <20260420112611.1481530-2-nemesa.garg@intel.com> X-Mailer: Claude Code Patch Reviewer Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Patch Review This patch moves the existing `DP_DSC_RGB_YCbCr444_MAX_BPP_DELTA_MASK` and = `DP_DSC_RGB_YCbCr420_MAX_BPP_DELTA_MASK` definitions from under `DP_DSC_BIT= S_PER_PIXEL_INC (0x06F)` to the correct register `DP_DSC_MAX_BPP_DELTA (0x0= 6E)`, and adds three new constants. The register reassociation is correct p= er the DP spec, but the new constants have problems. **Naming convention violation.** All DPCD field definitions in this header = use the `DP_DSC_` prefix. The three new defines break this convention: ```c +#define MIN_DSC_BPP_DELTA_444 16 +#define MIN_DSC_BPP_DELTA_420 12 +#define BPP_DELTA_SHIFT_420 5 ``` These should be `DP_DSC_MIN_BPP_DELTA_444`, `DP_DSC_MIN_BPP_DELTA_420`, and= `DP_DSC_BPP_DELTA_SHIFT_420` at minimum. The unprefixed names risk collisi= ons in the global namespace. **Placement concern.** `MIN_DSC_BPP_DELTA_444`, `MIN_DSC_BPP_DELTA_420`, an= d `BPP_DELTA_SHIFT_420` are not DPCD register or field definitions =E2=80= =94 they're decode helper constants used only by the i915 driver in patch 2= . They don't belong in `include/drm/display/drm_dp.h`, which is a shared he= ader for DPCD register definitions. Either move them to the i915 driver cod= e, or if they are truly spec-mandated values, add a comment referencing the= relevant spec section/table. **`BPP_DELTA_SHIFT_420` is redundant.** The shift value 5 is trivially deri= vable from `DP_DSC_RGB_YCbCr420_MAX_BPP_DELTA_MASK (0xe0)` using `__ffs()` = or by simply writing `>> 5` at the call site. If you do keep it, the name s= hould reference it's a shift for the mask, e.g., `DP_DSC_RGB_YCbCr420_MAX_B= PP_DELTA_SHIFT`. --- Generated by Claude Code Patch Reviewer