From: Claude Code Review Bot <claude-review@example.com>
To: dri-devel-reviews@example.com
Subject: Claude review: drm/atomic: Rework initial state allocation
Date: Wed, 27 May 2026 14:30:48 +1000 [thread overview]
Message-ID: <review-overall-20260526-drm-mode-config-init-v6-0-852346394200@kernel.org> (raw)
In-Reply-To: <20260526-drm-mode-config-init-v6-0-852346394200@kernel.org>
Overall Series Review
Subject: drm/atomic: Rework initial state allocation
Author: Maxime Ripard <mripard@kernel.org>
Patches: 20
Reviewed: 2026-05-27T14:30:48.205573
---
This is a well-structured 19-patch series from Maxime Ripard that introduces a new `atomic_create_state` callback pattern for DRM planes, CRTCs, and connectors, mirroring what already exists for `drm_private_obj`. The motivation is sound: `reset()` is overloaded (initial state allocation, hardware reset, suspend/resume recovery), non-fallible, and behaves differently for different object types. Separating pristine state allocation into `atomic_create_state` makes the initialization path cleaner and fallible.
The series is on its 6th revision and has accumulated Reviewed-by tags from Thomas Zimmermann, Laurent Pinchart, Dmitry Baryshkov, and Tomi Valkeinen across most patches. The incremental approach (doc fixes, renames, then new callbacks, then helpers, then driver conversions) is methodical and makes bisection clean.
**Key concerns:**
1. **Missing cleanup on partial failure in `drm_mode_config_create_initial_state()`** (patch 16): If allocation fails partway through (e.g., a connector state allocation fails after planes and CRTCs succeeded), the already-allocated states are leaked. There's no rollback path.
2. **Minor doc typo**: Patch 12 has a double space in "Allocates and initializes" in the `drm_atomic_helper_crtc_create_state()` doc. Also present in patch 15's `drm_atomic_helper_connector_create_state()`.
3. **`drm_atomic_commit` vs `drm_atomic_state`**: The doc in patch 1 references `drm_atomic_commit` and `drm_atomic_commit_alloc()`. The upstream tree currently uses `drm_atomic_state` — this appears to be part of a separate renaming that must be in the same tree. This is fine if the base commit includes that rename, but worth noting for readers.
Overall, this is a clean and well-reasoned series. The main substantive issue is the partial-failure leak in `drm_mode_config_create_initial_state()`.
---
---
Generated by Claude Code Patch Reviewer
next prev parent reply other threads:[~2026-05-27 4:30 UTC|newest]
Thread overview: 43+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-05-26 16:46 [PATCH v6 00/19] drm/atomic: Rework initial state allocation Maxime Ripard
2026-05-26 16:46 ` [PATCH v6 01/19] drm/atomic: Document atomic commit lifetime Maxime Ripard
2026-05-27 4:30 ` Claude review: " Claude Code Review Bot
2026-05-26 16:46 ` [PATCH v6 02/19] drm/colorop: Fix typos in the doc Maxime Ripard
2026-05-27 4:30 ` Claude review: " Claude Code Review Bot
2026-05-26 16:46 ` [PATCH v6 03/19] drm/atomic: Drop drm_private_obj.state assignment from create_state Maxime Ripard
2026-05-27 4:30 ` Claude review: " Claude Code Review Bot
2026-05-26 16:46 ` [PATCH v6 04/19] drm/atomic: Expand atomic_create_state expectations for drm_private_obj Maxime Ripard
2026-05-27 4:30 ` Claude review: " Claude Code Review Bot
2026-05-26 16:46 ` [PATCH v6 05/19] drm/mode-config: Document drm_private_obj exclusion from drm_mode_config_reset() Maxime Ripard
2026-05-27 4:30 ` Claude review: " Claude Code Review Bot
2026-05-26 16:46 ` [PATCH v6 06/19] drm/colorop: Rename __drm_colorop_state_reset() Maxime Ripard
2026-05-27 4:30 ` Claude review: " Claude Code Review Bot
2026-05-26 16:46 ` [PATCH v6 07/19] drm/colorop: Create drm_atomic_helper_colorop_create_state() Maxime Ripard
2026-05-27 4:30 ` Claude review: " Claude Code Review Bot
2026-05-26 16:46 ` [PATCH v6 08/19] drm/atomic-state-helper: Fix __drm_atomic_helper_plane_reset() doc typo Maxime Ripard
2026-05-27 4:30 ` Claude review: " Claude Code Review Bot
2026-05-26 16:46 ` [PATCH v6 09/19] drm/atomic-state-helper: Rename __drm_atomic_helper_plane_state_reset() Maxime Ripard
2026-05-27 4:30 ` Claude review: " Claude Code Review Bot
2026-05-26 16:46 ` [PATCH v6 10/19] drm/plane: Add new atomic_create_state callback Maxime Ripard
2026-05-27 4:30 ` Claude review: " Claude Code Review Bot
2026-05-26 16:46 ` [PATCH v6 11/19] drm/atomic-state-helper: Rename __drm_atomic_helper_crtc_state_reset() Maxime Ripard
2026-05-27 4:30 ` Claude review: " Claude Code Review Bot
2026-05-26 16:46 ` [PATCH v6 12/19] drm/crtc: Add new atomic_create_state callback Maxime Ripard
2026-05-27 4:30 ` Claude review: " Claude Code Review Bot
2026-05-26 16:46 ` [PATCH v6 13/19] drm/atomic-state-helper: Rename __drm_atomic_helper_connector_state_reset() Maxime Ripard
2026-05-27 4:30 ` Claude review: " Claude Code Review Bot
2026-05-26 16:46 ` [PATCH v6 14/19] drm/hdmi: Rename __drm_atomic_helper_connector_hdmi_reset() Maxime Ripard
2026-05-27 4:30 ` Claude review: " Claude Code Review Bot
2026-05-26 16:46 ` [PATCH v6 15/19] drm/connector: Add new atomic_create_state callback Maxime Ripard
2026-05-27 4:30 ` Claude review: " Claude Code Review Bot
2026-05-26 16:46 ` [PATCH v6 16/19] drm/mode-config: Create drm_mode_config_create_initial_state() Maxime Ripard
2026-05-27 4:30 ` Claude review: " Claude Code Review Bot
2026-05-26 16:46 ` [PATCH v6 17/19] drm/drv: Switch skeleton to drm_mode_config_create_initial_state() Maxime Ripard
2026-05-27 4:30 ` Claude review: " Claude Code Review Bot
2026-05-26 16:46 ` [PATCH v6 18/19] drm/tidss: Convert to atomic_create_state Maxime Ripard
2026-05-27 4:30 ` Claude review: " Claude Code Review Bot
2026-05-26 16:46 ` [PATCH v6 19/19] drm/bridge_connector: " Maxime Ripard
2026-05-27 4:30 ` Claude review: " Claude Code Review Bot
2026-05-27 4:30 ` Claude Code Review Bot [this message]
-- strict thread matches above, loose matches on Subject: below --
2026-05-12 13:05 [PATCH v4 00/20] drm/atomic: Rework initial state allocation Maxime Ripard
2026-05-16 3:22 ` Claude review: " Claude Code Review Bot
2026-03-20 16:27 [PATCH v2 00/20] " Maxime Ripard
2026-03-21 17:32 ` Claude review: " Claude Code Review Bot
2026-03-10 16:06 [PATCH 00/14] " Maxime Ripard
2026-03-11 3:09 ` 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-overall-20260526-drm-mode-config-init-v6-0-852346394200@kernel.org \
--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