From: Claude Code Review Bot <claude-review@example.com>
To: dri-devel-reviews@example.com
Subject: Claude review: drm/mipi-dbi: Provide callbacks for atomic interfaces
Date: Thu, 12 Mar 2026 07:03:37 +1000 [thread overview]
Message-ID: <review-patch3-20260311101438.365997-4-tzimmermann@suse.de> (raw)
In-Reply-To: <20260311101438.365997-4-tzimmermann@suse.de>
Patch Review
Provides new standalone atomic helper functions (`drm_mipi_dbi_*` prefix) and initializer macros (`DRM_MIPI_DBI_PLANE_FUNCS`, `DRM_MIPI_DBI_CRTC_FUNCS`, etc.) for drivers to use with regular atomic modesetting.
**Bug — uninitialized variable:** In `drm_mipi_dbi_plane_helper_atomic_check()` (mbox line ~1106):
```c
struct drm_crtc_state *new_crtc_state;
if (new_plane_state->crtc)
new_crtc_state = drm_atomic_get_new_crtc_state(state, new_plane_state->crtc);
ret = drm_atomic_helper_check_plane_state(new_plane_state, new_crtc_state, ...);
```
When `new_plane_state->crtc` is NULL (plane being disabled), `new_crtc_state` is **used uninitialized**. While `drm_atomic_helper_check_plane_state()` does handle `crtc_state == NULL`, it will receive stack garbage rather than NULL. This must be:
```c
struct drm_crtc_state *new_crtc_state = NULL;
```
**Minor:** The tail of the same function is redundant:
```c
if (ret)
return ret;
else if (!new_plane_state->visible)
return 0;
return 0;
```
This could simply be `return ret;`. The `else if` branch suggests future checks were intended but not yet added.
**Minor:** Moving `drm_gem_atomic_helper.h`, `drm_gem_framebuffer_helper.h`, `drm_probe_helper.h`, and `drm_atomic_state_helper.h` into `drm_mipi_dbi.h` (to support the initializer macros) adds transitive header weight to all includers. This is a common trade-off for macro-based initializers.
### PATCH 4 (04/16): drm/hx8357d: Use regular atomic helpers
Standard mechanical conversion. Introduces `struct hx8357d_device` wrapping `mipi_dbi_dev` with embedded plane/crtc/encoder/connector. Converts `yx240qv29_enable` to `hx8357d_crtc_helper_atomic_enable`. Probe open-codes the pipeline setup using the new `DRM_MIPI_DBI_*` macros.
No issues found.
### PATCH 5 (05/16): drm/ili9163: Use regular atomic helpers
Identical structural conversion as hx8357d.
No issues found.
### PATCH 6 (06/16): drm/ili9225: Use regular atomic helpers
More complex conversion since ili9225 has custom update and disable callbacks. Uses `DRM_GEM_SHADOW_PLANE_HELPER_FUNCS` instead of `DRM_MIPI_DBI_PLANE_HELPER_FUNCS` since it provides its own `atomic_update`. The old `!pipe->crtc.state->active` guard is correctly replaced with `!plane_state->fb` (standard pattern for regular atomic helpers where the framework manages CRTC-active gating).
No issues found.
### PATCH 7 (07/16): drm/ili9341: Use regular atomic helpers
Standard mechanical conversion, same pattern as hx8357d/ili9163.
No issues found.
### PATCH 8 (08/16): drm/ili9486: Use regular atomic helpers
Standard mechanical conversion. Minor improvement: renames old `waveshare_enable` to `ili9486_crtc_helper_atomic_enable` for consistency.
No issues found.
### PATCH 9 (09/16): drm/mi0283qt: Use regular atomic helpers
Standard mechanical conversion.
No issues found.
### PATCH 10 (10/16): drm/panel-mipi-dbi: Use regular atomic helpers
Slightly different from others because the pixel format is determined dynamically at probe time. Correctly passes the runtime `formats[]` array to `drm_universal_plane_init()` while using `formats[0]` (native format) for `drm_mipi_dbi_dev_init()` buffer sizing.
No issues found.
### PATCH 11 (11/16): drm/st7586: Use regular atomic helpers
Complex conversion like ili9225 — custom update, enable, and disable. Uses `DRM_FORMAT_XRGB8888` only (this driver does internal 2bpp grayscale conversion). Sets `preferred_depth = 24` to match XRGB8888.
**Minor style inconsistency:** `st7586_plane_helper_atomic_update` uses `if (drm_dev_enter(...)) { ... }` while ili9225's equivalent uses the early-return pattern. Both are correct but inconsistent.
### PATCH 12 (12/16): drm/st7735r: Rename struct st7735r_priv to struct st7735r_device
Purely cosmetic rename to follow DRM naming conventions. Adds `to_st7735r_device()` upcast helper.
No issues found.
### PATCH 13 (13/16): drm/st7735r: Rename priv variable to st7735r
Purely cosmetic rename of local variable `priv` → `st7735r`.
No issues found.
### PATCH 14 (14/16): drm/st7735r: Use regular atomic helpers
Standard mechanical conversion for st7735r. Uses the `DRM_MIPI_DBI_*` macros. Only custom callback is `st7735r_crtc_helper_atomic_enable`.
No issues found.
### PATCH 15 (15/16): drm/mipi-dbi: Remove simple-display helpers from mipi-dbi
Large deletion patch removing all now-unused simple-display-pipe wrapper functions (`mipi_dbi_pipe_update`, `mipi_dbi_pipe_disable`, `mipi_dbi_enable_flush`, `mipi_dbi_dev_init_with_formats`, `mipi_dbi_dev_init`, etc.), the `DRM_MIPI_DBI_SIMPLE_DISPLAY_PIPE_FUNCS` macro, and the `pipe`/`connector` fields from `struct mipi_dbi_dev`.
No issues found. Clean removal of dead code.
### PATCH 16 (16/16): drm/simple-kms: Deprecate simple-kms helpers
Strips all kerneldoc from `drm_simple_kms_helper.c`/`.h`, removes the "Simple KMS Helper Reference" from the GPU documentation, and adds TODO items for converting remaining users.
**Three typos:**
- Commit message (line 5016): `"voluteers"` → `"volunteers"`
- TODO item (line 5105): `"fucntions"` → `"functions"`
- Header deprecation comment (lines 5306-5307):
```
Simple KMS helpers are deprected in favor of regular atomic helpers. Do not
use the min new code.
```
Should be: `"deprecated"` and `"Do not use them in new code."`
---
Generated by Claude Code Patch Reviewer
next prev parent reply other threads:[~2026-03-11 21:03 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-03-11 10:10 [PATCH v2 00/16] drm/mipi-dbi: Replace simple-display helpers with regular atomic helpers Thomas Zimmermann
2026-03-11 10:10 ` [PATCH v2 01/16] drm/mipi-dbi: Only modify planes on enabled CRTCs Thomas Zimmermann
2026-03-11 21:03 ` Claude review: " Claude Code Review Bot
2026-03-11 10:10 ` [PATCH v2 02/16] drm/mipi-dbi: Support custom pipelines with drm_mipi_dbi_dev_init() Thomas Zimmermann
2026-03-11 21:03 ` Claude review: " Claude Code Review Bot
2026-03-11 10:10 ` [PATCH v2 03/16] drm/mipi-dbi: Provide callbacks for atomic interfaces Thomas Zimmermann
2026-03-11 21:03 ` Claude Code Review Bot [this message]
2026-03-11 10:10 ` [PATCH v2 04/16] drm/hx8357d: Use regular atomic helpers; drop simple-display helpers Thomas Zimmermann
2026-03-11 10:10 ` [PATCH v2 05/16] drm/ili9163: " Thomas Zimmermann
2026-03-11 10:10 ` [PATCH v2 06/16] drm/ili9225: " Thomas Zimmermann
2026-03-11 10:10 ` [PATCH v2 07/16] drm/ili9341: " Thomas Zimmermann
2026-03-11 10:10 ` [PATCH v2 08/16] drm/ili9486: " Thomas Zimmermann
2026-03-11 10:10 ` [PATCH v2 09/16] drm/mi0283qt: " Thomas Zimmermann
2026-03-11 10:10 ` [PATCH v2 10/16] drm/panel-mipi-dbi: " Thomas Zimmermann
2026-03-11 10:10 ` [PATCH v2 11/16] drm/st7586: " Thomas Zimmermann
2026-03-11 10:10 ` [PATCH v2 12/16] drm/st7735r: Rename struct st7735r_priv to struct st7735r_device Thomas Zimmermann
2026-03-11 10:10 ` [PATCH v2 13/16] drm/st7735r: Rename priv variable to st7735r Thomas Zimmermann
2026-03-11 10:10 ` [PATCH v2 14/16] drm/st7735r: Use regular atomic helpers; drop simple-display helpers Thomas Zimmermann
2026-03-11 10:10 ` [PATCH v2 15/16] drm/mipi-dbi: Remove simple-display helpers from mipi-dbi Thomas Zimmermann
2026-03-11 10:10 ` [PATCH v2 16/16] drm/simple-kms: Deprecate simple-kms helpers Thomas Zimmermann
2026-03-11 21:03 ` Claude review: drm/mipi-dbi: Replace simple-display helpers with regular atomic helpers Claude Code Review Bot
-- strict thread matches above, loose matches on Subject: below --
2026-03-19 15:59 [PATCH v3 00/16] " Thomas Zimmermann
2026-03-19 15:59 ` [PATCH v3 03/16] drm/mipi-dbi: Provide callbacks for atomic interfaces Thomas Zimmermann
2026-03-21 18:15 ` 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-20260311101438.365997-4-tzimmermann@suse.de \
--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