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/amd/display: use DisplayID panel type in dm_set_panel_type
Date: Mon, 25 May 2026 22:19:21 +1000	[thread overview]
Message-ID: <review-patch3-20260520021432.1301326-4-chen-yu.chen@amd.com> (raw)
In-Reply-To: <20260520021432.1301326-4-chen-yu.chen@amd.com>

Patch Review

**Purpose:** Wires up `did_panel_type` into amdgpu_dm's detection priority chain.

**Priority placement:** The new block is inserted correctly — after the VSDB and DPCD checks, before the Samsung luminance heuristic:

```c
+	/* If VSDB and DPCD didn't determine panel type, check DID */
+	if (link->panel_type == PANEL_TYPE_NONE) {
+		if (display_info->did_panel_type == DRM_MODE_PANEL_TYPE_LCD)
+			link->panel_type = PANEL_TYPE_LCD;
+		else if (display_info->did_panel_type == DRM_MODE_PANEL_TYPE_OLED)
+			link->panel_type = PANEL_TYPE_OLED;
+	}
```

**Effectiveness concern:** The existing end-of-function code only exposes OLED to userspace:

```c
	if (link->panel_type == PANEL_TYPE_OLED)
		drm_object_property_set_value(..., DRM_MODE_PANEL_TYPE_OLED);
	else
		drm_object_property_set_value(..., DRM_MODE_PANEL_TYPE_UNKNOWN);
```

So `PANEL_TYPE_LCD` detected via DisplayID would internally set `link->panel_type = PANEL_TYPE_LCD` (which is `1` in `dc_types.h`), but the userspace property would still read "unknown". Currently no DC code checks `panel_type == PANEL_TYPE_LCD` anywhere, so this detection has no observable effect unless there are downstream consumers added later. This may be intentional (laying groundwork), but it should be documented or the property-setting code should be updated to also handle LCD.

**Cross-domain constant mixing:** The code mixes UAPI constants (`DRM_MODE_PANEL_TYPE_LCD`) with internal DC constants (`PANEL_TYPE_LCD`). This works because they're independent enums, but it's somewhat unusual to compare a `drm_display_info` field set with UAPI values against those UAPI values and then assign internal DC enum values. This is fine functionally but worth noting for maintainability — a mapping helper could improve clarity.

**Overall for Patch 3:** The TODO removal is welcome and the fallback insertion point is correct. The main gap is that LCD detection currently has no visible effect.

---
Generated by Claude Code Patch Reviewer

  reply	other threads:[~2026-05-25 12:19 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-05-20  2:13 [PATCH v2 0/3] drm: detect panel type from DisplayID 2.x Chenyu Chen
2026-05-20  2:13 ` [PATCH v2 1/3] drm/edid: extract section header processing into helper Chenyu Chen
2026-05-20 13:10   ` Jani Nikula
2026-05-25 12:19   ` Claude review: " Claude Code Review Bot
2026-05-20  2:13 ` [PATCH v2 2/3] drm/edid: parse panel type from DisplayID 2.x Display Parameters Chenyu Chen
2026-05-20 13:30   ` Jani Nikula
2026-05-25 12:19   ` Claude review: " Claude Code Review Bot
2026-05-20  2:13 ` [PATCH v2 3/3] drm/amd/display: use DisplayID panel type in dm_set_panel_type Chenyu Chen
2026-05-25 12:19   ` Claude Code Review Bot [this message]
2026-05-25 12:19 ` 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-26  2:59 [PATCH v3 0/3] " Chenyu Chen
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-27  5:16   ` Claude review: " Claude Code Review Bot
2026-05-14  6:54 [PATCH 0/2] drm: detect panel type from DisplayID 2.x Chenyu Chen
2026-05-14  6:54 ` [PATCH 2/2] drm/amd/display: use DisplayID panel type in dm_set_panel_type Chenyu Chen
2026-05-16  1:17   ` 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-patch3-20260520021432.1301326-4-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