From: Claude Code Review Bot <claude-review@example.com>
To: dri-devel-reviews@example.com
Subject: Claude review: drm/amd/display: convert GPIO translation logic to lookup tables
Date: Sat, 16 May 2026 13:03:12 +1000 [thread overview]
Message-ID: <review-overall-20260512190019.228440-1-guilherme.bozi@usp.br> (raw)
In-Reply-To: <20260512190019.228440-1-guilherme.bozi@usp.br>
Overall Series Review
Subject: drm/amd/display: convert GPIO translation logic to lookup tables
Author: Guilherme Ivo Bozi <guilherme.bozi@usp.br>
Patches: 10
Reviewed: 2026-05-16T13:03:12.579109
---
This is a well-structured refactoring series that replaces repetitive switch-statement GPIO translation logic across 8 DCN generations with static lookup tables and shared helper functions. The approach is sound: patch 1 introduces the infrastructure (table entry types, macros, and three generic lookup helpers), and patches 2-9 mechanically convert each ASIC.
The series achieves a net reduction of ~760 lines while making the per-ASIC GPIO mappings declarative and easier to audit. The table structures are well-designed with the `check_mask` flag in `gpio_id_offset_entry` to handle both mask-discriminated entries (via `GPIO_MASK_ENTRY`) and simple offset-only entries (via `GPIO_ENTRY`, used by dcn42's per-HPD registers).
Behavioral equivalence is preserved across all conversions. The DDC mask values (e.g., `DDC1DATA_A_MASK` vs `DDC6DATA_A_MASK`) are identical constants (0x100 / 0x1) across all DDC channels in the hardware, so using any one channel's mask macro for all DDC lines is correct. The GSL omission from `gpio_pins[]` in dcn20+ is properly commented and matches the original "not implemented" assert paths. The dcn401 DDC5 commented-out entries match the original code.
Overall: **the series looks good** and is ready to merge with a couple of minor nits below.
---
Generated by Claude Code Patch Reviewer
prev parent reply other threads:[~2026-05-16 3:03 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-05-12 18:59 [PATCH 0/9] drm/amd/display: convert GPIO translation logic to lookup tables Guilherme Ivo Bozi
2026-05-12 18:59 ` [PATCH 1/9] drm/amd/display: add GPIO HW translation helpers Guilherme Ivo Bozi
2026-05-16 3:03 ` Claude review: " Claude Code Review Bot
2026-05-12 18:59 ` [PATCH 2/9] drm/amd/display: convert dcn10 GPIO translation to lookup tables Guilherme Ivo Bozi
2026-05-16 3:03 ` Claude review: " Claude Code Review Bot
2026-05-12 18:59 ` [PATCH 3/9] drm/amd/display: convert dcn20 " Guilherme Ivo Bozi
2026-05-16 3:03 ` Claude review: " Claude Code Review Bot
2026-05-12 18:59 ` [PATCH 4/9] drm/amd/display: convert dcn21 " Guilherme Ivo Bozi
2026-05-16 3:03 ` Claude review: " Claude Code Review Bot
2026-05-12 18:59 ` [PATCH 5/9] drm/amd/display: convert dcn30 " Guilherme Ivo Bozi
2026-05-16 3:03 ` Claude review: " Claude Code Review Bot
2026-05-12 18:59 ` [PATCH 6/9] drm/amd/display: convert dcn315 " Guilherme Ivo Bozi
2026-05-16 3:03 ` Claude review: " Claude Code Review Bot
2026-05-12 18:59 ` [PATCH 7/9] drm/amd/display: convert dcn32 " Guilherme Ivo Bozi
2026-05-16 3:03 ` Claude review: " Claude Code Review Bot
2026-05-12 18:59 ` [PATCH 8/9] drm/amd/display: convert dcn401 " Guilherme Ivo Bozi
2026-05-16 3:03 ` Claude review: " Claude Code Review Bot
2026-05-12 18:59 ` [PATCH 9/9] drm/amd/display: convert dcn42 " Guilherme Ivo Bozi
2026-05-16 3:03 ` Claude review: " Claude Code Review Bot
2026-05-16 3:03 ` 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-20260512190019.228440-1-guilherme.bozi@usp.br \
--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