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: Tue, 17 Feb 2026 15:51:44 +1000	[thread overview]
Message-ID: <review-patch3-20260217000854.131242-4-mailingradian@gmail.com> (raw)
In-Reply-To: <20260217000854.131242-4-mailingradian@gmail.com>

Patch Review

The panel driver follows established patterns. A few observations:

> +static void nt37700f_tianma_reset(struct nt37700f_tianma *ctx)
> +{
> +	gpiod_set_value_cansleep(ctx->reset_gpio, 1);
> +	usleep_range(1000, 2000);
> +	gpiod_set_value_cansleep(ctx->reset_gpio, 0);
> +	usleep_range(10000, 11000);
> +}

The reset GPIO is requested with `GPIOD_OUT_HIGH` in probe, meaning the panel starts in reset. The reset sequence asserts (1), waits, deasserts (0), waits. This is consistent with the `unprepare` path which sets the GPIO to 1 (asserting reset). Fine.

> +	dsi->mode_flags = MIPI_DSI_MODE_VIDEO_BURST |
> +			  MIPI_DSI_CLOCK_NON_CONTINUOUS | MIPI_DSI_MODE_LPM;

The mode flags combine video burst mode with LPM for command sequences. This is a standard pattern seen in other panel drivers (e.g., `panel-samsung-sofef00.c`).

> +static int nt37700f_tianma_bl_update_status(struct backlight_device *bl)
> +{
> +	struct mipi_dsi_device *dsi = bl_get_data(bl);
> +	u16 brightness = backlight_get_brightness(bl);
> +	int ret;
> +
> +	dsi->mode_flags &= ~MIPI_DSI_MODE_LPM;
> +
> +	ret = mipi_dsi_dcs_set_display_brightness_large(dsi, brightness);
> +	if (ret < 0)
> +		return ret;
> +
> +	dsi->mode_flags |= MIPI_DSI_MODE_LPM;

Temporarily clearing and restoring `MIPI_DSI_MODE_LPM` to send brightness commands in HS mode is not thread-safe -- if two callers hit this concurrently, the flag manipulation could race. That said, this is a common pattern found in many generated panel drivers and the backlight framework serializes calls through a mutex, so in practice this is fine.

> + * Copyright (c) 2024, The Linux Foundation. All rights reserved.

Minor: the copyright year says 2024, though the patch is being submitted in 2026. This is cosmetic and doesn't affect functionality. Also, attributing a generated driver to "The Linux Foundation" may not be accurate -- typically the author of the driver would be listed.

Overall, the driver is straightforward and correct. No functional bugs found.

---
Generated by Claude Code Patch Reviewer

  reply	other threads:[~2026-02-17  5:51 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-02-17  0:08 [PATCH v2 0/6] Support for the Pixel 3a XL with the Tianma panel Richard Acayan
2026-02-17  0:08 ` [PATCH v2 1/6] dt-bindings: arm: qcom: document google, bonito-tianma board Richard Acayan
2026-02-17  5:51   ` Claude review: " Claude Code Review Bot
2026-02-17  0:08 ` [PATCH v2 2/6] dt-bindings: panel-simple-dsi: add nt37700f compatible Richard Acayan
2026-02-17  5:51   ` Claude review: " Claude Code Review Bot
2026-02-17  0:08 ` [PATCH v2 3/6] drm/panel: Add Novatek/Tianma NT37700F panel Richard Acayan
2026-02-17  5:51   ` Claude Code Review Bot [this message]
2026-02-17  0:08 ` [PATCH v2 4/6] arm64: dts: qcom: sdm670-google-sargo: add touchscreen and display labels Richard Acayan
2026-02-17  5:51   ` Claude review: " Claude Code Review Bot
2026-02-17  0:08 ` [PATCH v2 5/6] arm64: dts: qcom: sdm670-google: add common device tree include Richard Acayan
2026-02-17  5:51   ` Claude review: " Claude Code Review Bot
2026-02-17  0:08 ` [PATCH v2 6/6] arm64: dts: qcom: add support for pixel 3a xl with the tianma panel Richard Acayan
2026-02-17  5:51   ` Claude review: " Claude Code Review Bot
2026-02-17  5:51 ` Claude review: Support for the Pixel 3a XL with the Tianma panel Claude Code Review Bot
  -- strict thread matches above, loose matches on Subject: below --
2026-03-10  0:26 [PATCH v3 0/5] " Richard Acayan
2026-03-10  0:26 ` [PATCH v3 3/5] drm/panel: Add Novatek/Tianma NT37700F panel Richard Acayan
2026-03-10  1:42   ` Claude review: " Claude Code Review Bot
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 3/6] drm/panel: Add Novatek/Tianma NT37700F panel Richard Acayan
2026-02-11  6:47   ` 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-patch3-20260217000854.131242-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