From: Claude Code Review Bot <claude-review@example.com>
To: dri-devel-reviews@example.com
Subject: Claude review: drm/bridge_connector: Convert to atomic_create_state
Date: Sun, 22 Mar 2026 03:32:29 +1000 [thread overview]
Message-ID: <review-patch20-20260320-drm-mode-config-init-v2-20-c63f1134e76c@kernel.org> (raw)
In-Reply-To: <20260320-drm-mode-config-init-v2-20-c63f1134e76c@kernel.org>
Patch Review
Converts `drm_bridge_connector` to use `atomic_create_state` instead of `reset`. The old `drm_bridge_connector_reset()` called `drm_atomic_helper_connector_reset()` then `__drm_atomic_helper_connector_hdmi_state_init()`. The new version calls `drm_atomic_helper_connector_create_state()` then adds HDMI init.
**Note**: The `.reset` callback is removed entirely from `drm_bridge_connector_funcs`. This means `drm_mode_config_reset()` will no longer create state for bridge connectors (it falls through to the `else if (atomic_create_state)` path instead). This is fine for the initial state, but if anyone calls `drm_mode_config_reset()` during suspend/resume to re-create connector states, the bridge connector won't get a new state since there's no `reset` anymore. The `drm_mode_config_reset` fallback to `atomic_create_state` added in patch 13 should handle this, but it doesn't free the old state first -- unlike `drm_atomic_helper_connector_reset()` which does `kfree(connector->state)` before creating a new one. This means calling `drm_mode_config_reset()` on a bridge connector after this conversion would leak the old state and overwrite the pointer. However, the `drm_mode_config_reset` fallback code checks nothing (`if (connector->funcs->atomic_create_state)`) and will always create a new state, so this is indeed a leak if `reset()` is called with existing state. Since `drm_mode_config_reset()` is documented for suspend/resume use, this is a concern.
Has Laurent's R-b. The concern above may be acceptable if bridge connectors are never expected to go through `drm_mode_config_reset()` during suspend/resume, but it should be documented or the fallback path in `drm_mode_config_reset()` should handle existing state (free old before creating new).
---
Generated by Claude Code Patch Reviewer
next prev parent reply other threads:[~2026-03-21 17:32 UTC|newest]
Thread overview: 43+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-03-20 16:27 [PATCH v2 00/20] drm/atomic: Rework initial state allocation Maxime Ripard
2026-03-20 16:27 ` [PATCH v2 01/20] drm/colorop: Fix typos in the doc Maxime Ripard
2026-03-21 17:32 ` Claude review: " Claude Code Review Bot
2026-03-20 16:27 ` [PATCH v2 02/20] drm/atomic: Drop drm_private_state.obj assignment from create_state Maxime Ripard
2026-03-21 17:32 ` Claude review: " Claude Code Review Bot
2026-03-20 16:27 ` [PATCH v2 03/20] drm/mode-config: Mention drm_mode_config_reset() culprits Maxime Ripard
2026-03-21 17:32 ` Claude review: " Claude Code Review Bot
2026-03-20 16:27 ` [PATCH v2 04/20] drm/colorop: Rename __drm_colorop_state_reset() Maxime Ripard
2026-03-21 17:32 ` Claude review: " Claude Code Review Bot
2026-03-20 16:27 ` [PATCH v2 05/20] drm/colorop: Create drm_atomic_helper_colorop_create_state() Maxime Ripard
2026-03-21 17:32 ` Claude review: " Claude Code Review Bot
2026-03-20 16:27 ` [PATCH v2 06/20] drm/atomic-state-helper: Fix __drm_atomic_helper_plane_reset() doc typo Maxime Ripard
2026-03-21 17:32 ` Claude review: " Claude Code Review Bot
2026-03-20 16:27 ` [PATCH v2 07/20] drm/atomic-state-helper: Rename __drm_atomic_helper_plane_state_reset() Maxime Ripard
2026-03-21 17:32 ` Claude review: " Claude Code Review Bot
2026-03-20 16:27 ` [PATCH v2 08/20] drm/plane: Add new atomic_create_state callback Maxime Ripard
2026-03-21 17:32 ` Claude review: " Claude Code Review Bot
2026-03-20 16:27 ` [PATCH v2 09/20] drm/atomic-state-helper: Rename __drm_atomic_helper_crtc_state_reset() Maxime Ripard
2026-03-21 17:32 ` Claude review: " Claude Code Review Bot
2026-03-20 16:27 ` [PATCH v2 10/20] drm/crtc: Add new atomic_create_state callback Maxime Ripard
2026-03-21 17:32 ` Claude review: " Claude Code Review Bot
2026-03-20 16:27 ` [PATCH v2 11/20] drm/atomic-state-helper: Rename __drm_atomic_helper_connector_state_reset() Maxime Ripard
2026-03-21 17:32 ` Claude review: " Claude Code Review Bot
2026-03-20 16:27 ` [PATCH v2 12/20] drm/hdmi: Rename __drm_atomic_helper_connector_hdmi_reset() Maxime Ripard
2026-03-21 17:32 ` Claude review: " Claude Code Review Bot
2026-03-20 16:27 ` [PATCH v2 13/20] drm/connector: Add new atomic_create_state callback Maxime Ripard
2026-03-21 17:32 ` Claude review: " Claude Code Review Bot
2026-03-20 16:27 ` [PATCH v2 14/20] drm/mode-config: Create drm_mode_config_create_state() Maxime Ripard
2026-03-21 17:32 ` Claude review: " Claude Code Review Bot
2026-03-20 16:27 ` [PATCH v2 15/20] drm/drv: Call drm_mode_config_create_state() by default Maxime Ripard
2026-03-21 17:32 ` Claude review: " Claude Code Review Bot
2026-03-20 16:27 ` [PATCH v2 16/20] drm/atomic: Drop private obj state allocation Maxime Ripard
2026-03-21 17:32 ` Claude review: " Claude Code Review Bot
2026-03-20 16:27 ` [PATCH v2 17/20] drm/drv: Drop drm_mode_config_reset() from our skeleton Maxime Ripard
2026-03-21 17:32 ` Claude review: " Claude Code Review Bot
2026-03-20 16:27 ` [PATCH v2 18/20] drm/tidss: Drop call to drm_mode_config_reset at probe time Maxime Ripard
2026-03-21 17:32 ` Claude review: " Claude Code Review Bot
2026-03-20 16:27 ` [PATCH v2 19/20] drm/tidss: Convert to atomic_create_state Maxime Ripard
2026-03-21 17:32 ` Claude review: " Claude Code Review Bot
2026-03-20 16:27 ` [PATCH v2 20/20] drm/bridge_connector: " Maxime Ripard
2026-03-21 17:32 ` Claude Code Review Bot [this message]
2026-03-21 17:32 ` Claude review: drm/atomic: Rework initial state allocation Claude Code Review Bot
-- strict thread matches above, loose matches on Subject: below --
2026-03-10 16:06 [PATCH 00/14] " Maxime Ripard
2026-03-10 16:07 ` [PATCH 14/14] drm/bridge_connector: Convert to atomic_create_state 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-patch20-20260320-drm-mode-config-init-v2-20-c63f1134e76c@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