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/plane: Add new atomic_create_state callback Date: Wed, 27 May 2026 14:30:50 +1000 Message-ID: In-Reply-To: <20260526-drm-mode-config-init-v6-10-852346394200@kernel.org> References: <20260526-drm-mode-config-init-v6-0-852346394200@kernel.org> <20260526-drm-mode-config-init-v6-10-852346394200@kernel.org> X-Mailer: Claude Code Patch Reviewer Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit MIME-Version: 1.0 Patch Review Adds the `atomic_create_state` callback to `drm_plane_funcs` and provides `drm_atomic_helper_plane_create_state()`. Also adds `drm_mode_config_plane_create_state()` and `drm_mode_config_plane_reset_with_create_state()` static helpers in `drm_mode_config.c`. The `drm_mode_config_plane_reset_with_create_state()` function calls `plane->funcs->atomic_destroy_state()` without checking that the callback exists. In practice, any driver that implements `atomic_create_state` will also have `atomic_destroy_state`, but a defensive check would be more robust. The fallback in `drm_mode_config_reset()` is well-structured: prefer `reset` if it exists, fall back to `atomic_create_state`. Ignoring the return value of `drm_mode_config_plane_reset_with_create_state()` in `drm_mode_config_reset()` is acceptable since `reset()` was already non-fallible. --- Generated by Claude Code Patch Reviewer