From: Claude Code Review Bot <claude-review@example.com>
To: dri-devel-reviews@example.com
Subject: Claude review: drm/panel: Add BOE BF068MWM-TD0 panel driver
Date: Thu, 04 Jun 2026 11:48:25 +1000 [thread overview]
Message-ID: <review-patch2-20260603-asteroids-panel-support-v1-2-109c6ac81c8f@pm.me> (raw)
In-Reply-To: <20260603-asteroids-panel-support-v1-2-109c6ac81c8f@pm.me>
Patch Review
**Bug: Missing cleanup on error paths in `prepare()`**
The `boe_bf068mwm_td0_prepare()` function has resource leaks on two error paths. After `boe_bf068mwm_td0_on()` succeeds, regulators are enabled and the reset GPIO is deasserted. If `mipi_dsi_picture_parameter_set()` or `mipi_dsi_compression_mode()` subsequently fails, the function returns without resetting GPIO or disabling regulators:
```c
ret = mipi_dsi_picture_parameter_set(ctx->dsi, &pps);
if (ret < 0) {
dev_err(panel->dev, "failed to transmit PPS: %d\n", ret);
return ret; // <-- leaks regulators and GPIO
}
ret = mipi_dsi_compression_mode(ctx->dsi, true);
if (ret < 0) {
dev_err(dev, "failed to enable compression mode: %d\n", ret);
return ret; // <-- same leak
}
```
Compare with `panel-novatek-nt37801.c` (lines 128-170), which has nearly identical `prepare()` logic but correctly uses `goto err` for all failure paths after regulator enable. The fix is to replace the bare `return ret` statements with `goto err` and add:
```c
err:
gpiod_set_value_cansleep(ctx->reset_gpio, 1);
regulator_bulk_disable(ARRAY_SIZE(boe_bf068mwm_td0_supplies),
ctx->supplies);
return ret;
```
Also note that the first error path already has this cleanup inline (after `boe_bf068mwm_td0_on()` fails), so consolidating all three into a `goto err` pattern would also reduce duplication.
**Build dependency: `MIPI_DSI_MODE_DSC_ALL_SLICES_IN_PKT`**
```c
dsi->mode_flags = MIPI_DSI_MODE_VIDEO | MIPI_DSI_MODE_NO_EOT_PACKET |
MIPI_DSI_CLOCK_NON_CONTINUOUS | MIPI_DSI_MODE_LPM |
MIPI_DSI_MODE_DSC_ALL_SLICES_IN_PKT;
```
This flag does not exist in the current mainline tree. It comes from the prerequisite series mentioned in the cover letter. This will fail to compile without that series applied first. The dependency should be clearly documented (e.g., in the commit message or as a `Depends-on:` tag) to help maintainers apply the patches in the right order.
**Minor: inconsistent `dev` vs `panel->dev` in error messages**
In `prepare()`, most error messages use `dev` (which is `&ctx->dsi->dev`), but the PPS failure uses `panel->dev`:
```c
dev_err(panel->dev, "failed to transmit PPS: %d\n", ret);
```
while the surrounding errors use:
```c
dev_err(dev, "Failed to enable regulators: %d\n", ret);
dev_err(dev, "failed to enable compression mode: %d\n", ret);
```
These point to different `struct device` instances. Should be consistent — prefer `dev` throughout, matching the local variable.
**Observation: First user of `MIPI_DSI_FMT_RGB101010` in a panel driver**
```c
dsi->format = MIPI_DSI_FMT_RGB101010;
```
This format is defined in the MIPI DSI header but only handled by the Qualcomm MSM DSI host driver (`dsi_host.c`). This is consistent with the Nothing Phone (3a) being a Qualcomm platform, but means this driver effectively only works on Qualcomm SoCs. Worth noting in the commit message or Kconfig help text.
**Observation: DSC `slice_height = 13`**
```c
ctx->dsc.slice_height = 13;
```
2392 / 13 = 184 slices, which divides evenly, so this is valid. It's an unusual choice (most drivers use values like 16, 20, 40, 60) but presumably dictated by the panel hardware.
**No other issues.** The driver otherwise follows established patterns well: `devm_drm_panel_alloc`, `mipi_dsi_multi_context` for init sequences, `regulator_bulk_get_const`, LPM toggle for HS backlight writes, `drm_connector_helper_get_modes_fixed`, and proper probe/remove ordering.
---
Generated by Claude Code Patch Reviewer
next prev parent reply other threads:[~2026-06-04 1:48 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-06-03 13:03 [PATCH 0/2] Add support for the BOE BF068MWM-TD0 Alexander Koskovich
2026-06-03 13:03 ` [PATCH 1/2] dt-bindings: display: panel: Document " Alexander Koskovich
2026-06-03 13:58 ` Neil Armstrong
2026-06-03 14:01 ` Alexander Koskovich
2026-06-03 16:25 ` Neil Armstrong
2026-06-04 1:48 ` Claude review: " Claude Code Review Bot
2026-06-03 13:03 ` [PATCH 2/2] drm/panel: Add BOE BF068MWM-TD0 panel driver Alexander Koskovich
2026-06-04 1:48 ` Claude Code Review Bot [this message]
2026-06-04 1:48 ` Claude review: Add support for the BOE BF068MWM-TD0 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-20260603-asteroids-panel-support-v1-2-109c6ac81c8f@pm.me \
--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