From: Claude Code Review Bot <claude-review@example.com>
To: dri-devel-reviews@example.com
Subject: Claude review: drm: panel: Add Samsung S6E8FCO DSI controller for M1906F9 panel
Date: Mon, 16 Mar 2026 11:54:46 +1000 [thread overview]
Message-ID: <review-patch2-20260314-panel-patches-v4-2-1ecbb2c0c3c8@gmail.com> (raw)
In-Reply-To: <20260314-panel-patches-v4-2-1ecbb2c0c3c8@gmail.com>
Patch Review
The panel driver is well-structured and follows modern conventions.
**1. Reset GPIO polarity vs DTS mismatch.** The driver requests the GPIO as `GPIOD_OUT_HIGH` (line 1024 of the mbox / driver line 230):
```c
ctx->reset_gpio = devm_gpiod_get(dev, "reset", GPIOD_OUT_HIGH);
```
The reset sequence (driver lines 39-47) does:
```c
gpiod_set_value_cansleep(ctx->reset_gpio, 0); // deassert
usleep_range(12000, 13000);
gpiod_set_value_cansleep(ctx->reset_gpio, 1); // assert
usleep_range(2000, 3000);
gpiod_set_value_cansleep(ctx->reset_gpio, 0); // deassert
```
And in the DTS (patch 3), the reset GPIO is `GPIO_ACTIVE_LOW`:
```
reset-gpios = <&tlmm 90 GPIO_ACTIVE_LOW>;
```
With `GPIO_ACTIVE_LOW`, `gpiod_set_value(1)` drives the pin low (asserting reset), and `gpiod_set_value(0)` drives it high (deasserting). So initializing with `GPIOD_OUT_HIGH` means the panel starts with reset asserted, the sequence deasserts→asserts→deasserts, which is a standard reset pulse. This is consistent and correct.
**2. `_samsungp_mode` naming typo.** The mode struct has a stray "p" in the name (mbox line 925):
```c
static const struct drm_display_mode s6e8fco_m1906f9_samsungp_mode = {
```
Should probably be `s6e8fco_m1906f9_mode` — the `_samsungp_` looks like a leftover from the generator. Not a functional issue but worth cleaning up.
**3. LPM mode flag toggling in backlight ops.** The backlight update/get functions (mbox lines 952-984) toggle `MIPI_DSI_MODE_LPM` on `dsi->mode_flags`:
```c
dsi->mode_flags &= ~MIPI_DSI_MODE_LPM;
ret = mipi_dsi_dcs_set_display_brightness_large(dsi, brightness);
...
dsi->mode_flags |= MIPI_DSI_MODE_LPM;
```
But `MIPI_DSI_MODE_LPM` is never set in the probe function's `mode_flags` initialization (mbox line 1034):
```c
dsi->mode_flags = MIPI_DSI_MODE_VIDEO | MIPI_DSI_MODE_VIDEO_BURST |
MIPI_DSI_CLOCK_NON_CONTINUOUS;
```
So on the first call to `s6e8fco_bl_update_status`, clearing a flag that isn't set is a no-op, and then it unconditionally sets `MIPI_DSI_MODE_LPM` afterwards — which changes the DSI mode for all subsequent DSI traffic, not just the brightness command. If the panel truly needs HS mode for brightness and LPM for everything else, `MIPI_DSI_MODE_LPM` should be included in the initial `mode_flags`. If the panel doesn't need LPM at all, this toggling should be removed. Please verify the intended behavior.
**4. `drm_probe_helper.h` include appears unused.** The driver includes `<drm/drm_probe_helper.h>` but uses `drm_connector_helper_get_modes_fixed()` which is from `<drm/drm_probe_helper.h>` — actually this is correct, ignore this point.
**5. Missing `#include <linux/delay.h>` usage clarity.** The driver includes `<linux/delay.h>` for `usleep_range()` in the reset function — that's fine.
**6. Between-the-dashes comment.** The note between the `---` markers (mbox lines 718-719):
```
The downstream dts claims a max brightness of 2047, but seems to ignore the
MSB.
```
This is useful context for reviewers but won't appear in the final commit message, which is appropriate.
Overall this patch is good. The main actionable items are the mode name typo and the LPM flag question.
---
---
Generated by Claude Code Patch Reviewer
next prev parent reply other threads:[~2026-03-16 1:54 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-03-14 21:46 [PATCH v4 0/3] Add support for the Samsung S6E8FCO DSI and M1906F9 display panel Yedaya Katsman
2026-03-14 21:46 ` [PATCH v4 1/3] dt-bindings: display: panel: Add Samsung S6E8FCO-M1906F9 Yedaya Katsman
2026-03-15 8:43 ` Krzysztof Kozlowski
2026-03-16 1:54 ` Claude review: " Claude Code Review Bot
2026-03-14 21:46 ` [PATCH v4 2/3] drm: panel: Add Samsung S6E8FCO DSI controller for M1906F9 panel Yedaya Katsman
2026-03-16 1:54 ` Claude Code Review Bot [this message]
2026-03-14 21:46 ` [PATCH v4 3/3] arm64: dts: qcom: sm6125-xiaomi-laurel-sprout: Enable MDSS and add panel Yedaya Katsman
2026-03-16 1:54 ` Claude review: " Claude Code Review Bot
2026-03-16 1:54 ` Claude review: Add support for the Samsung S6E8FCO DSI and M1906F9 display panel 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-20260314-panel-patches-v4-2-1ecbb2c0c3c8@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