public inbox for drm-ai-reviews@public-inbox.freedesktop.org
 help / color / mirror / Atom feed
From: Claude Code Review Bot <claude-review@example.com>
To: dri-devel-reviews@example.com
Subject: Claude review: drm/atomic: Drop private obj state allocation
Date: Sun, 22 Mar 2026 03:32:28 +1000	[thread overview]
Message-ID: <review-patch16-20260320-drm-mode-config-init-v2-16-c63f1134e76c@kernel.org> (raw)
In-Reply-To: <20260320-drm-mode-config-init-v2-16-c63f1134e76c@kernel.org>

Patch Review

Removes the `atomic_create_state` call from `drm_atomic_private_obj_init()` since `drm_mode_config_create_state()` (called from `drm_dev_register()`) now handles it.

**Potential ordering concern**: `drm_atomic_private_obj_init()` may be called before `drm_dev_register()`. Between these calls, `obj->state` will be NULL. If any code accesses `obj->state` during driver setup (between init and register), this would crash. The patch relies on `drm_mode_config_create_state()` checking `if (privobj->state) continue;` which is fine for the new flow, but could break drivers that currently depend on the state being available immediately after `drm_atomic_private_obj_init()`.

The current tree already has the `atomic_create_state` call inside `drm_atomic_private_obj_init` -- removing it changes the contract for all callers. This is a semantic change that should be called out more explicitly and might need a wider audit of callers.

Also note: `drm_atomic_private_obj_fini()` unconditionally calls `obj->funcs->atomic_destroy_state(obj, obj->state)` -- if `obj->state` is NULL at teardown time (e.g., if `drm_dev_register` is never called after init), this will crash.

---
Generated by Claude Code Patch Reviewer

  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 Code Review Bot [this message]
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 review: " Claude Code Review Bot
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 10/14] drm/atomic: Drop private obj " 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-patch16-20260320-drm-mode-config-init-v2-16-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