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: Wed, 11 Feb 2026 16:47:58 +1000 Message-ID: In-Reply-To: <20260210023300.15785-4-mailingradian@gmail.com> References: <20260210023300.15785-1-mailingradian@gmail.com> <20260210023300.15785-4-mailingradian@gmail.com> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Mailer: Claude Code Patch Reviewer 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