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 driver for Novatek NT35532
Date: Sun, 22 Mar 2026 05:00:32 +1000	[thread overview]
Message-ID: <review-patch2-20260318-rimob-new-features-v2-2-c1bf8917449e@protonmail.com> (raw)
In-Reply-To: <20260318-rimob-new-features-v2-2-c1bf8917449e@protonmail.com>

Patch Review

This is the core panel driver, auto-generated from vendor device tree, with 779 lines of register init sequences.

**Issue (moderate): Sleep/display-on commands sent via `mipi_dsi_generic_write_seq_multi` instead of DCS helpers**

In `nt35532_on()`:
```c
mipi_dsi_generic_write_seq_multi(&dsi_ctx, MIPI_DCS_EXIT_SLEEP_MODE, 0x00);
mipi_dsi_msleep(&dsi_ctx, 120);
mipi_dsi_generic_write_seq_multi(&dsi_ctx, MIPI_DCS_SET_DISPLAY_ON, 0x00);
```

Using `mipi_dsi_generic_write_seq_multi` with DCS command bytes sends these as **generic write packets** rather than **DCS write packets**. The correct approach is to use the dedicated `_multi` DCS helpers, as is already done in `nt35532_off()`:
```c
mipi_dsi_dcs_set_display_off_multi(&dsi_ctx);
mipi_dsi_dcs_enter_sleep_mode_multi(&dsi_ctx);
```

The `nt35532_on()` function should similarly use:
```c
mipi_dsi_dcs_exit_sleep_mode_multi(&dsi_ctx);
mipi_dsi_msleep(&dsi_ctx, 120);
mipi_dsi_dcs_set_display_on_multi(&dsi_ctx);
```

Additionally, the trailing `0x00` parameter in these calls is suspicious — DCS exit_sleep_mode and set_display_on are zero-parameter commands. The generic_write sends `{0x11, 0x00}` as a 2-byte payload, which is not standard. Some panels may tolerate it but it's technically incorrect.

**Minor: `select DRM_KMS_HELPER` in Kconfig may be unnecessary**
```
select DRM_KMS_HELPER
```
The driver uses `drm_connector_helper_get_modes_fixed()` which comes from `drm_probe_helper.h`. Check whether this is already pulled in transitively via `DRM_MIPI_DSI`. Many panel drivers don't explicitly select `DRM_KMS_HELPER`.

**Style: `container_of_const` usage**
```c
return container_of_const(panel, struct novatek_nt35532, panel);
```
The function returns a non-const `struct novatek_nt35532 *`, but `container_of_const` is designed to propagate const-ness. Since all callers need a mutable pointer, `container_of` would be more conventional here. That said, some newer panel drivers do use `container_of_const` — this is a minor style point.

**No issues with**: regulator bulk handling, reset sequence, probe/remove lifecycle, use of `devm_drm_panel_alloc`, mode definition. The driver is clean for an auto-generated panel driver.

---
Generated by Claude Code Patch Reviewer

  parent reply	other threads:[~2026-03-21 19:00 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-03-18 22:28 [PATCH v2 0/6] Enable new features for flipkart-rimob Cristian Cozzolino via B4 Relay
2026-03-18 22:28 ` [PATCH v2 1/6] dt-bindings: display: panel: Add Novatek NT35532 LCD DSI Cristian Cozzolino via B4 Relay
2026-03-19  9:09   ` Krzysztof Kozlowski
2026-03-20 22:32     ` cristian_ci
2026-03-21  9:56       ` Krzysztof Kozlowski
2026-03-21 16:15         ` cristian_ci
2026-03-21 19:00   ` Claude review: " Claude Code Review Bot
2026-03-18 22:28 ` [PATCH v2 2/6] drm/panel: Add driver for Novatek NT35532 Cristian Cozzolino via B4 Relay
2026-03-19  2:27   ` Dmitry Baryshkov
2026-03-20  7:19     ` cristian_ci
2026-03-20  7:39       ` Dmitry Baryshkov
2026-03-21 19:00   ` Claude Code Review Bot [this message]
2026-03-18 22:28 ` [PATCH v2 3/6] arm64: dts: qcom: msm8953-flipkart-rimob: Enable display and GPU Cristian Cozzolino via B4 Relay
2026-03-19  2:54   ` Dmitry Baryshkov
2026-03-21 19:00   ` Claude review: " Claude Code Review Bot
2026-03-18 22:28 ` [PATCH v2 4/6] arm64: dts: qcom: msm8953-flipkart-rimob: Enable WiFi/Bluetooth Cristian Cozzolino via B4 Relay
2026-03-21 19:00   ` Claude review: " Claude Code Review Bot
2026-03-18 22:28 ` [PATCH v2 5/6] arm64: dts: qcom: msm8953-flipkart-rimob: Enable touchscreen Cristian Cozzolino via B4 Relay
2026-03-19 10:42   ` Konrad Dybcio
2026-03-21 19:00   ` Claude review: " Claude Code Review Bot
2026-03-18 22:28 ` [PATCH v2 6/6] arm64: dts: qcom: msm8953-flipkart-rimob: Enable Hall sensor Cristian Cozzolino via B4 Relay
2026-03-19 10:43   ` Konrad Dybcio
2026-03-21 19:00   ` Claude review: " Claude Code Review Bot
2026-03-21 19:00 ` Claude review: Enable new features for flipkart-rimob Claude Code Review Bot
  -- strict thread matches above, loose matches on Subject: below --
2026-03-21 16:23 [PATCH v3 0/6] " Cristian Cozzolino via B4 Relay
2026-03-21 16:23 ` [PATCH v3 2/6] drm/panel: Add driver for Novatek NT35532 Cristian Cozzolino via B4 Relay
2026-03-21 17:00   ` Claude review: " Claude Code Review Bot
2026-03-08 15:52 [PATCH 0/6] Enable new features for flipkart-rimob Cristian Cozzolino via B4 Relay
2026-03-08 15:52 ` [PATCH 2/6] drm/panel: Add driver for Novatek NT35532 Cristian Cozzolino via B4 Relay
2026-03-08 21:46   ` 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-20260318-rimob-new-features-v2-2-c1bf8917449e@protonmail.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