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 Novatek/Tianma NT37700F panel
Date: Wed, 11 Feb 2026 16:47:58 +1000	[thread overview]
Message-ID: <review-patch3-20260210023300.15785-4-mailingradian@gmail.com> (raw)
In-Reply-To: <20260210023300.15785-4-mailingradian@gmail.com>

Patch Review

**Code Quality Issues:**

**1. TODO in Production Code (CRITICAL):**

```c
+// TODO: Check if /sys/class/backlight/.../actual_brightness actually returns
+// correct values. If not, remove this function.
+static int nt37700f_tianma_bl_get_brightness(struct backlight_device *bl)
```

Production code submitted to mainline must not contain TODO comments. Either test the functionality or remove the function. The backlight core doesn't require `get_brightness` - it's optional.

**2. Compatible String Issue (CRITICAL):**

```c
+static const struct of_device_id nt37700f_tianma_of_match[] = {
+	{ .compatible = "novatek,nt37700f" },
```

The driver is named `nt37700f_tianma` (Tianma-specific), but uses generic compatible `novatek,nt37700f`. The cover letter states: "The Pixel 3a XL has two variants with panels from Samsung or from Tianma/Novatek."

This confirms multiple vendors use NT37700F with potentially different init sequences. The compatible MUST be vendor-specific:

```c
{ .compatible = "tianma,nt37700f" },
```

**3. Module Description Error:**

```c
+MODULE_DESCRIPTION("DRM driver for nt37700f cmd mode dsi tianma panel");
```

But the driver sets:

```c
+	dsi->mode_flags = MIPI_DSI_MODE_VIDEO_BURST |
```

This is VIDEO_BURST mode, not command mode. Fix:

```c
MODULE_DESCRIPTION("DRM driver for Tianma NT37700F DSI video mode panel");
```

**4. Undocumented Magic Values:**

```c
+	mipi_dsi_dcs_write_seq_multi(&dsi_ctx, 0xf0, 0x55, 0xaa, 0x52, 0x08, 0x00);
+	mipi_dsi_dcs_write_seq_multi(&dsi_ctx, 0xc0, 0x56);
+	mipi_dsi_dcs_write_seq_multi(&dsi_ctx, 0xca, 0x52);
```

Add a comment explaining the source of these sequences (downstream DT, datasheet, or reverse-engineered).

**5. Clock Calculation:**

```c
+	.clock = (1080 + 32 + 32 + 98) * (2160 + 32 + 4 + 98) * 60 / 1000,
```

While correct, add a comment indicating where porch values originate.

**Positive Aspects:**
- Proper use of `mipi_dsi_multi_context` for error accumulation
- Correct GPIO handling with `gpiod_set_value_cansleep`
- Good error handling with `dev_err_probe()`
- Proper resource cleanup
- Correct use of `DRM_MODE_CONNECTOR_DSI`

**Rating:** NEEDS REVISION - Remove TODO, fix compatible string, fix module description

---

---
Generated by Claude Code Patch Reviewer

  reply	other threads:[~2026-02-11  6:47 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-02-10  2:32 [PATCH 0/6] Support for the Pixel 3a XL with the Tianma panel Richard Acayan
2026-02-10  2:32 ` [PATCH 1/6] dt-bindings: arm: qcom: document google, bonito-tianma board Richard Acayan
2026-02-10  9:12   ` Krzysztof Kozlowski
2026-02-11  6:47   ` Claude review: " Claude Code Review Bot
2026-02-10  2:32 ` [PATCH 2/6] dt-bindings: panel-simple-dsi: add nt37700f compatible Richard Acayan
2026-02-10  9:12   ` Krzysztof Kozlowski
2026-02-11  6:47   ` Claude review: " Claude Code Review Bot
2026-02-10  2:32 ` [PATCH 3/6] drm/panel: Add Novatek/Tianma NT37700F panel Richard Acayan
2026-02-11  6:47   ` Claude Code Review Bot [this message]
2026-02-10  2:32 ` [PATCH 4/6] arm64: dts: qcom: sdm670-google-sargo: add touchscreen and display labels Richard Acayan
2026-02-11  6:47   ` Claude review: " Claude Code Review Bot
2026-02-10  2:32 ` [PATCH 5/6] arm64: dts: qcom: sdm670-google: add common device tree include Richard Acayan
2026-02-11  6:47   ` Claude review: " Claude Code Review Bot
2026-02-12 10:30   ` [PATCH 5/6] " Konrad Dybcio
2026-02-10  2:33 ` [PATCH 6/6] arm64: dts: qcom: add support for pixel 3a xl with the tianma panel Richard Acayan
2026-02-10  9:10   ` Konrad Dybcio
2026-02-11 19:33     ` Richard Acayan
2026-02-12 10:29       ` Konrad Dybcio
2026-02-11  6:47   ` Claude review: " Claude Code Review Bot
2026-02-11  6:47 ` Claude review: Support for the Pixel 3a XL with the Tianma 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-patch3-20260210023300.15785-4-mailingradian@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