public inbox for drm-ai-reviews@public-inbox.freedesktop.org
 help / color / mirror / Atom feed
From: Claude Code Review Bot <claude-review@example.com>
To: dri-devel-reviews@example.com
Subject: Claude review: drm/panel: Add support for Tianma TA066VVHM03 panel
Date: Mon, 09 Mar 2026 07:59:03 +1000	[thread overview]
Message-ID: <review-patch2-20260308-tianma-ta066vvhm03-v1-2-869fac443b20@pm.me> (raw)
In-Reply-To: <20260308-tianma-ta066vvhm03-v1-2-869fac443b20@pm.me>

Patch Review

**1. Build dependency on unmerged `slice_per_pkt` field (blocking):**

The probe function sets:
```c
dsi->dsc_slice_per_pkt = 2;
```

This field (`dsc_slice_per_pkt`) does not exist in `struct mipi_dsi_device` in the current kernel tree. The cover letter notes this depends on a patch currently under review. This patch cannot be applied or built until that dependency is merged. The series should either explicitly note this with a `Depends-on:` tag or be resubmitted once the dependency lands.

**2. Missing cleanup in `prepare` error paths (bug):**

In `tianma_ta066vvhm03_prepare`, the error paths after `mipi_dsi_picture_parameter_set()` and `mipi_dsi_compression_mode()` just return the error without disabling GPIOs or 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, enable_gpio, reset_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 to the earlier error path after `tianma_ta066vvhm03_on()` which correctly cleans up. These later error paths need the same treatment: assert reset, deassert enable, and disable regulators. Consider using a common `goto` label.

Also note the inconsistent `dev` pointer usage: the PPS error message uses `panel->dev` while all other messages use the local `dev` variable. Use `dev` consistently.

**3. LPM mode toggling in `_off` (questionable):**

```c
static int tianma_ta066vvhm03_off(struct tianma_ta066vvhm03 *ctx)
{
    ...
    ctx->dsi->mode_flags &= ~MIPI_DSI_MODE_LPM;

    mipi_dsi_dcs_set_display_off_multi(&dsi_ctx);
    mipi_dsi_dcs_enter_sleep_mode_multi(&dsi_ctx);
```

This clears LPM, meaning display-off and enter-sleep commands are sent in HS mode. Most panels send shutdown commands in LP mode. This may be correct for this specific panel (vendor DT generated), but it's worth double-checking since it's unusual.

Similarly, the backlight callback toggles LPM off for brightness writes then back on:
```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;
```

This is a common pattern in generated drivers but is inherently racy if multiple threads could call into the DSI driver simultaneously.

**4. Clock/refresh rate:**

The pixel clock calculation gives:
```c
.clock = (1080 + 24 + 4 + 10) * (2340 + 12 + 1 + 4) * 160 / 1000,
```

This yields ~421 MHz and ~160 Hz refresh rate. For a gaming phone (ROG Phone 3) this seems plausible, but should be verified against hardware documentation. The 160 divisor is the target refresh rate — is 160 Hz confirmed for this panel?

**5. MAINTAINERS entry is fine.** Kconfig/Makefile additions are properly sorted alphabetically.

**6. Minor:** The `_reset` function uses `GPIOD_OUT_HIGH` at probe (assert reset), then in the reset sequence does 0→1→0. With the active-low polarity from the DT (`GPIO_ACTIVE_LOW`), this means physical low→high→low. This should be verified against the panel datasheet reset timing requirements.

---
Generated by Claude Code Patch Reviewer

  parent reply	other threads:[~2026-03-08 21:59 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-03-08  6:03 [PATCH 0/2] Add support for Tianma TA066VVHM03 DSI panel Alexander Koskovich
2026-03-08  6:03 ` [PATCH 1/2] dt-bindings: display: panel: Document Tianma TA066VVHM03 Alexander Koskovich
2026-03-08  8:43   ` Krzysztof Kozlowski
2026-03-08 21:59     ` Claude review: " Claude Code Review Bot
2026-03-08  6:03 ` [PATCH 2/2] drm/panel: Add support for Tianma TA066VVHM03 panel Alexander Koskovich
2026-03-08 14:16   ` kernel test robot
2026-03-08 14:37   ` kernel test robot
2026-03-08 21:59   ` Claude Code Review Bot [this message]
2026-03-08 21:59 ` Claude review: Add support for Tianma TA066VVHM03 DSI panel Claude Code Review Bot
  -- strict thread matches above, loose matches on Subject: below --
2026-03-08 21:08 [PATCH v2 0/2] " Alexander Koskovich
2026-03-08 21:09 ` [PATCH v2 2/2] drm/panel: Add support for Tianma TA066VVHM03 panel Alexander Koskovich
2026-03-10  2:50   ` Claude review: " Claude Code Review Bot
2026-03-10  4:36 [PATCH v3 0/2] Add support for Tianma TA066VVHM03 DSI panel Alexander Koskovich
2026-03-10  4:36 ` [PATCH v3 2/2] drm/panel: Add support for Tianma TA066VVHM03 panel Alexander Koskovich
2026-03-11  3:40   ` 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-20260308-tianma-ta066vvhm03-v1-2-869fac443b20@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