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/display: Increase DP_RECEIVER_CAP_SIZE from 15 to 16 bytes
Date: Sat, 14 Mar 2026 07:29:32 +1000	[thread overview]
Message-ID: <review-overall-20250702223903.3801654-1-khaled.almahallawy@intel.com> (raw)
In-Reply-To: <20250702223903.3801654-1-khaled.almahallawy@intel.com>

Overall Series Review

Subject: drm/display: Increase DP_RECEIVER_CAP_SIZE from 15 to 16 bytes
Author: Khaled Almahallawy <khaled.almahallawy@intel.com>
Patches: 3
Reviewed: 2026-03-14T07:29:32.912351

---

This is a single-patch series (v2 is a rebase of v1) that fixes `DP_RECEIVER_CAP_SIZE` from 0xf (15 bytes) to 0x10 (16 bytes) to include the `DP_ADAPTER_CAP` register at DPCD address 0x00F. The change is well-motivated by the DP 2.1 spec and compliance test failures.

The fix is **correct and well-justified**. The DP spec clearly defines the Receiver Capability field as DPCD addresses 0x00000h through 0x0000Fh (inclusive), which is 16 bytes. The current value of 0xf (15) misses the last byte (`DP_ADAPTER_CAP`). Notably, AMD's DC driver already works around this by hardcoding `uint8_t dpcd_data[16]` with a comment referencing `DP_ADAPTER_CAP` (`link_dp_capability.c:1740-1743`), which independently confirms this was a known deficiency.

**Impact assessment**: `DP_RECEIVER_CAP_SIZE` is used extensively across the kernel — in struct field declarations (i915, nouveau, radeon, amdgpu, MSM, MediaTek, various bridges), local arrays, function signatures, and AUX read lengths. All of these will grow by 1 byte. This is benign:
- Local arrays and struct fields grow by 1 byte — no ABI concern for userspace.
- The nouveau `nvif_outp_dp_train_v0` struct embeds `dpcd[DP_RECEIVER_CAP_SIZE]`, but this is an internal kernel interface (not UAPI), so the size change is safe.
- `drm_dp_read_extended_dpcd_caps()` will also correctly read one additional byte from the 0x2200 range (through 0x220F), which is exactly what compliance test 4.2.2.2 requires.

**Risk**: Low. The extra byte read is harmless — all DP sinks must implement this register range per the spec.

---
Generated by Claude Code Patch Reviewer

      parent reply	other threads:[~2026-03-13 21:29 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-07-02 22:39 [PATCH] drm/display: Increase DP_RECEIVER_CAP_SIZE from 15 to 16 bytes Khaled Almahallawy
2025-07-07 13:51 ` Cavitt, Jonathan
2026-03-13  5:00 ` [PATCH v2] " Khaled Almahallawy
2026-03-13 21:29 ` 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-20250702223903.3801654-1-khaled.almahallawy@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