From: Claude Code Review Bot <claude-review@example.com>
To: dri-devel-reviews@example.com
Subject: Claude review: drm: panel: add support for the Renesas R63419 based dual-DSI video mode Display Panels
Date: Tue, 05 May 2026 10:27:00 +1000 [thread overview]
Message-ID: <review-patch2-20260430-topic-sm8650-ayaneo-pocket-s2-r63419-v2-2-91ac10453d0c@linaro.org> (raw)
In-Reply-To: <20260430-topic-sm8650-ayaneo-pocket-s2-r63419-v2-2-91ac10453d0c@linaro.org>
Patch Review
**Signed-off-by order:** The patch has `From: KancyJoe` indicating KancyJoe is the author, but the Signed-off-by chain is:
```
Signed-off-by: Neil Armstrong <neil.armstrong@linaro.org>
Signed-off-by: KancyJoe <kancy2333@outlook.com>
```
Per kernel conventions, the author's Signed-off-by should come first in the chain. This should be:
```
Signed-off-by: KancyJoe <kancy2333@outlook.com>
Signed-off-by: Neil Armstrong <neil.armstrong@linaro.org>
```
**Critical: MIPI DCS command ordering is wrong in `renesas_r63419_on()`:**
```c
mipi_dsi_dcs_set_display_on_multi(&dsi_ctx);
mipi_dsi_dcs_set_display_on_multi(&dsi_ctx1);
mipi_dsi_msleep(&dsi_ctx, 150);
mipi_dsi_dcs_exit_sleep_mode_multi(&dsi_ctx);
mipi_dsi_dcs_exit_sleep_mode_multi(&dsi_ctx1);
mipi_dsi_msleep(&dsi_ctx, 50);
```
The MIPI DCS specification requires `EXIT_SLEEP_MODE` **first**, followed by a delay (typically 120ms), then `SET_DISPLAY_ON`. Every other panel driver in the kernel tree follows this order. This is reversed here and will likely cause initialization failures or display corruption. The correct sequence would be:
```c
mipi_dsi_dcs_exit_sleep_mode_multi(&dsi_ctx);
mipi_dsi_dcs_exit_sleep_mode_multi(&dsi_ctx1);
mipi_dsi_msleep(&dsi_ctx, 120);
mipi_dsi_dcs_set_display_on_multi(&dsi_ctx);
mipi_dsi_dcs_set_display_on_multi(&dsi_ctx1);
```
**Second DSI context error never checked:** In `renesas_r63419_on()`, two separate `mipi_dsi_multi_context` structs are used (`dsi_ctx` and `dsi_ctx1`), but only `dsi_ctx.accum_err` is returned. Errors on the second DSI link (`dsi_ctx1.accum_err`) are silently discarded. The same issue exists in `renesas_r63419_disable()`:
```c
return dsi_ctx.accum_err;
```
This should also check `dsi_ctx1.accum_err`, e.g.:
```c
return dsi_ctx.accum_err ?: dsi_ctx1.accum_err;
```
Alternatively, look at how `panel-sharp-lq079l1sx01.c` handles this — it uses a single context and helper functions that send to both DSI links in one call via `mipi_dsi_dual_dcs_write_seq_multi()`.
**Should use `devm_mipi_dsi_attach()` instead of `mipi_dsi_attach()`:** The probe function uses manual `mipi_dsi_attach()`:
```c
ret = mipi_dsi_attach(ctx->dsi[i]);
if (ret < 0) {
drm_panel_remove(&ctx->panel);
return dev_err_probe(dev, ret,
"Failed to attach DSI device %d\n", i);
}
```
If the second DSI attach (`i=1`) fails, the first DSI (`i=0`) was already attached but is never detached. Using `devm_mipi_dsi_attach()` (as `panel-sharp-lq079l1sx01.c` does) would handle cleanup automatically. With `devm_mipi_dsi_attach()`, the `remove` callback would also simplify to just `drm_panel_remove()`, since detach is handled by devres.
**Panel descriptors should be `const`:**
```c
static struct panel_desc wt0600_desc = {
...
static struct panel_desc wt0630_desc = {
```
These are never modified and should be `static const struct panel_desc`. The `desc` member pointer in the panel struct is already `const struct panel_desc *desc`, so the types are compatible.
**Unprepare reset/power ordering:** In `renesas_r63419_unprepare()`, the reset GPIO is asserted *after* disabling regulators:
```c
regulator_bulk_disable(..., ctx->vcc_supplies);
regulator_bulk_disable(..., ctx->vdd_supplies);
gpiod_set_value_cansleep(ctx->reset_gpio, 1);
```
The typical and safer convention (followed by most panel drivers) is to assert reset *before* cutting power, to ensure the panel IC enters a known state while it still has power. The prepare error path does the same thing — disables regulators first, then asserts reset. Consider reversing to: assert reset, then disable VCC, then disable VDD.
**Missing `#include` for `of_graph.h` may not be needed:** The driver includes `<linux/of_graph.h>` for `of_graph_get_remote_node()`. This is fine, but worth noting that some newer drivers use different patterns. Not a blocker.
**`width_mm`/`height_mm` set on mode struct:** In `renesas_r63419_get_modes()`:
```c
mode->width_mm = ctx->desc->width_mm;
mode->height_mm = ctx->desc->height_mm;
```
While these fields still exist in `struct drm_display_mode`, the canonical location is `connector->display_info.width_mm/height_mm` (which this driver also sets, so the mode fields are redundant). Minor nit.
**Otherwise well-structured:** The driver follows established patterns — `devm_drm_panel_alloc`, `devm_regulator_bulk_get_const`, `devm_mipi_dsi_device_register_full`, proper Kconfig dependencies, alphabetical Makefile ordering, and correct `prepare_prev_first = true` for dual-DSI. The mode clock computation is correctly doubled for the dual-DSI configuration.
---
Generated by Claude Code Patch Reviewer
next prev parent reply other threads:[~2026-05-05 0:27 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-04-30 12:22 [PATCH v2 0/2] drm: panel: support the R63419 based dual-DSI video mode Display Panels Neil Armstrong
2026-04-30 12:22 ` [PATCH v2 1/2] dt-bindings: regulator: document the Renesas " Neil Armstrong
2026-05-03 12:34 ` Krzysztof Kozlowski
2026-05-04 7:00 ` Neil Armstrong
2026-05-05 0:27 ` Claude review: " Claude Code Review Bot
2026-04-30 12:22 ` [PATCH v2 2/2] drm: panel: add support for " Neil Armstrong
2026-05-05 0:27 ` Claude Code Review Bot [this message]
2026-05-05 0:27 ` Claude review: drm: panel: support the " Claude Code Review Bot
-- strict thread matches above, loose matches on Subject: below --
2026-05-04 8:02 [PATCH v3 0/2] " Neil Armstrong
2026-05-04 8:02 ` [PATCH v3 2/2] drm: panel: add support for the Renesas " Neil Armstrong
2026-05-04 22:29 ` 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-20260430-topic-sm8650-ayaneo-pocket-s2-r63419-v2-2-91ac10453d0c@linaro.org \
--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