From: Claude Code Review Bot <claude-review@example.com>
To: dri-devel-reviews@example.com
Subject: Claude review: drm/panel: Add panel driver for ChipWealth CH13726A based panels
Date: Tue, 28 Apr 2026 15:10:46 +1000 [thread overview]
Message-ID: <review-patch2-20260426-ch13726a-v7-2-554247c569e5@gmail.com> (raw)
In-Reply-To: <20260426-ch13726a-v7-2-554247c569e5@gmail.com>
Patch Review
**Issue 1 (Kconfig): Unnecessary DP helper selections**
```c
select DRM_DISPLAY_DP_HELPER
select DRM_DISPLAY_HELPER
```
This is a pure MIPI-DSI panel. The only other panel drivers that `select DRM_DISPLAY_DP_HELPER` are eDP panels (Samsung ATNA33XC20, simple eDP). Comparable MIPI-DSI panel drivers like `DRM_PANEL_BOE_TD4320` select neither of these. Both `select` lines should be removed — the driver doesn't use any display helper or DP helper APIs.
**Issue 2 (const-correctness): `desc` pointer and `thor_bottom_desc` should be const**
The descriptor struct is declared as:
```c
struct ch13726a_desc *desc;
```
and `thor_bottom_desc` is:
```c
static struct ch13726a_desc thor_bottom_desc = {
```
Since `of_device_get_match_data()` returns `const void *`, the current cast discards const:
```c
ctx->desc = (struct ch13726a_desc *)of_device_get_match_data(dev);
```
The field should be `const struct ch13726a_desc *desc`, the variable should be `static const struct ch13726a_desc thor_bottom_desc`, and the cast should be `(const struct ch13726a_desc *)` (or better, dropped entirely since C allows implicit conversion from `const void *` to `const T *`).
**Issue 3 (style): `uint8_t` loop variable in `get_modes`**
```c
for (uint8_t i = 0; i < ctx->desc->num_modes; i++) {
```
Kernel convention is to use `unsigned int` or `int` for loop counters, not fixed-width types. `unsigned int` would match the type of `num_modes`.
**Issue 4 (style): `__typeof(*ctx)` in `devm_drm_panel_alloc`**
```c
ctx = devm_drm_panel_alloc(dev, __typeof(*ctx), panel,
&ch13726a_panel_funcs,
DRM_MODE_CONNECTOR_DSI);
```
While functionally correct, all other panel drivers pass the struct name directly:
```c
ctx = devm_drm_panel_alloc(dev, struct ch13726a_panel, panel,
&ch13726a_panel_funcs,
DRM_MODE_CONNECTOR_DSI);
```
**Observation (not a blocker): `of_drm_get_panel_orientation` error path**
```c
ret = of_drm_get_panel_orientation(dev->of_node, &ctx->orientation);
if (ret < 0) {
dev_err(dev, "%pOF: failed to get orientation %d\n", dev->of_node, ret);
return ret;
}
```
This could use `dev_err_probe()` for consistency with the other error paths in `probe()`, which would also handle `-EPROBE_DEFER` cleanly:
```c
return dev_err_probe(dev, ret, "Failed to get orientation\n");
```
**Overall for patch 2:** The driver logic itself is solid — the reset sequence, init commands, backlight handling, and multi-rate mode support all look correct. The `mipi_dsi_multi_context` usage is clean, `prepare_prev_first = true` is properly set, and the remove path correctly detaches DSI before removing the panel. The issues above are all minor fixups.
---
Generated by Claude Code Patch Reviewer
next prev parent reply other threads:[~2026-04-28 5:10 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-04-27 4:39 [PATCH v7 0/2] drm/panel: Add panel driver for ChipWealth CH13726A based panels Aaron Kling via B4 Relay
2026-04-27 4:39 ` [PATCH v7 1/2] dt-bindings: display: panel: Add ChipWealth CH13726A AMOLED driver Aaron Kling via B4 Relay
2026-04-28 5:10 ` Claude review: " Claude Code Review Bot
2026-04-27 4:39 ` [PATCH v7 2/2] drm/panel: Add panel driver for ChipWealth CH13726A based panels Aaron Kling via B4 Relay
2026-04-28 5:10 ` Claude Code Review Bot [this message]
2026-04-28 5:10 ` Claude review: " Claude Code Review Bot
-- strict thread matches above, loose matches on Subject: below --
2026-04-22 7:43 [PATCH v6 0/2] " Aaron Kling via B4 Relay
2026-04-22 7:43 ` [PATCH v6 2/2] " Aaron Kling via B4 Relay
2026-04-22 22:00 ` Claude review: " Claude Code Review Bot
2026-04-22 22:00 ` Claude Code Review Bot
2026-04-21 17:38 [PATCH v5 0/2] " Aaron Kling via B4 Relay
2026-04-21 17:38 ` [PATCH v5 2/2] " Aaron Kling via B4 Relay
2026-04-22 22:16 ` Claude review: " Claude Code Review Bot
2026-04-22 22:16 ` Claude Code Review Bot
2026-04-08 5:32 [PATCH v4 0/2] " Aaron Kling via B4 Relay
2026-04-08 5:32 ` [PATCH v4 2/2] " Aaron Kling via B4 Relay
2026-04-12 3:10 ` Claude review: " Claude Code Review Bot
2026-04-12 3:10 ` Claude Code Review Bot
2026-03-23 17:08 [PATCH v3 0/2] " Aaron Kling via B4 Relay
2026-03-23 17:08 ` [PATCH v3 2/2] " Aaron Kling via B4 Relay
2026-03-24 21:40 ` Claude review: " Claude Code Review Bot
2026-03-24 21:40 ` 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-20260426-ch13726a-v7-2-554247c569e5@gmail.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