public inbox for drm-ai-reviews@public-inbox.freedesktop.org
 help / color / mirror / Atom feed
From: Claude Code Review Bot <claude-review@example.com>
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	[thread overview]
Message-ID: <review-patch1-20260420112611.1481530-2-nemesa.garg@intel.com> (raw)
In-Reply-To: <20260420112611.1481530-2-nemesa.garg@intel.com>

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_BITS_PER_PIXEL_INC (0x06F)` to the correct register `DP_DSC_MAX_BPP_DELTA (0x06E)`, and adds three new constants. The register reassociation is correct per 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 collisions in the global namespace.

**Placement concern.** `MIN_DSC_BPP_DELTA_444`, `MIN_DSC_BPP_DELTA_420`, and `BPP_DELTA_SHIFT_420` are not DPCD register or field definitions — 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 header for DPCD register definitions. Either move them to the i915 driver code, 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 derivable 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 should reference it's a shift for the mask, e.g., `DP_DSC_RGB_YCbCr420_MAX_BPP_DELTA_SHIFT`.

---
Generated by Claude Code Patch Reviewer

  parent reply	other threads:[~2026-04-23  0:06 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-04-20 11:26 [PATCH 0/2] DSC max delta bpp support Nemesa Garg
2026-04-20 11:26 ` [PATCH 1/2] drm/dp: Define DSC bpp delta DPCD fields Nemesa Garg
2026-04-21  6:34   ` Nautiyal, Ankit K
2026-04-23  0:06   ` Claude Code Review Bot [this message]
2026-04-20 11:26 ` [PATCH 2/2] drm/i915/dp: Decode DSC max delta bpp from sink DPCD Nemesa Garg
2026-04-21 10:50   ` Nautiyal, Ankit K
2026-04-23  0:06   ` Claude review: " Claude Code Review Bot
2026-04-23  0:06 ` Claude review: DSC max delta bpp support 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=review-patch1-20260420112611.1481530-2-nemesa.garg@intel.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