From: Claude Code Review Bot <claude-review@example.com>
To: dri-devel-reviews@example.com
Subject: Claude review: drm/edid: parse panel type from DisplayID 2.x Display Parameters
Date: Wed, 27 May 2026 15:16:43 +1000 [thread overview]
Message-ID: <review-patch2-20260526030254.1460480-3-chen-yu.chen@amd.com> (raw)
In-Reply-To: <20260526030254.1460480-3-chen-yu.chen@amd.com>
Patch Review
**Status: Looks good with minor notes.**
The struct definition for `displayid_display_params_block` properly lays out all fields per DisplayID 2.1a spec Table 4-7. The payload size calculates correctly:
```
sizeof(displayid_display_params_block) - sizeof(displayid_block) =
(3 + 2+2+2+2+1+9+3+2+2+2+1+1) - 3 = 29 bytes
```
This matches the expected payload for the Display Parameters block.
The length validation is correct:
```c
if (block->num_bytes < sizeof(*params) - sizeof(params->base))
```
The field extraction `FIELD_GET(DISPLAYID_DISPLAY_PARAMS_DEVICE_TECH, params->color_depth_and_tech)` with `GENMASK(6, 4)` correctly extracts bits [6:4] for the device technology field.
The version guard in `update_displayid_info()`:
```c
if (displayid_version(&iter) == DISPLAY_ID_STRUCTURE_VER_20 &&
block->tag == DATA_BLOCK_2_DISPLAY_PARAMETERS)
```
correctly restricts parsing to DisplayID 2.x only, since the tag value 0x21 has different semantics in DisplayID 1.x.
**Minor notes:**
- The `panel_type` field added to `drm_display_info` stores `DRM_MODE_PANEL_TYPE_*` UAPI values directly. This is consistent with how other UAPI-facing properties are handled in this struct, but it creates a coupling worth noting — if the UAPI enum ever changes numbering, this field must be updated too. In practice this won't happen since UAPI is stable.
- If a DisplayID contains multiple Display Parameters Data Blocks (theoretically possible per spec, though unusual), the last one wins. This seems acceptable.
- The UAPI addition of `DRM_MODE_PANEL_TYPE_LCD = 2` is backwards-compatible. Existing userspace seeing an unknown enum value would already need to handle it gracefully, and the immutable property documentation is updated accordingly.
---
Generated by Claude Code Patch Reviewer
next prev parent reply other threads:[~2026-05-27 5:16 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-05-26 2:59 [PATCH v3 0/3] drm: detect panel type from DisplayID 2.x Chenyu Chen
2026-05-26 2:59 ` [PATCH v3 1/3] drm/edid: extract base section header processing into helper Chenyu Chen
2026-05-26 3:09 ` Chen, Chen-Yu
2026-05-27 5:16 ` Claude review: " Claude Code Review Bot
2026-05-26 2:59 ` [PATCH v3 2/3] drm/edid: parse panel type from DisplayID 2.x Display Parameters Chenyu Chen
2026-05-26 3:09 ` Chen, Chen-Yu
2026-05-27 5:16 ` Claude Code Review Bot [this message]
2026-05-26 2:59 ` [PATCH v3 3/3] drm/amd/display: use DisplayID panel type in dm_set_panel_type Chenyu Chen
2026-05-26 3:09 ` Chen, Chen-Yu
2026-05-27 5:16 ` Claude review: " Claude Code Review Bot
2026-05-27 5:16 ` Claude review: drm: detect panel type from DisplayID 2.x Claude Code Review Bot
-- strict thread matches above, loose matches on Subject: below --
2026-05-20 2:13 [PATCH v2 0/3] " Chenyu Chen
2026-05-20 2:13 ` [PATCH v2 2/3] drm/edid: parse panel type from DisplayID 2.x Display Parameters Chenyu Chen
2026-05-25 12:19 ` Claude review: " 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-patch2-20260526030254.1460480-3-chen-yu.chen@amd.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