From mboxrd@z Thu Jan 1 00:00:00 1970 From: Claude Code Review Bot 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 Message-ID: In-Reply-To: <20260217000854.131242-4-mailingradian@gmail.com> References: <20260217000854.131242-1-mailingradian@gmail.com> <20260217000854.131242-4-mailingradian@gmail.com> X-Mailer: Claude Code Patch Reviewer Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit MIME-Version: 1.0 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