]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
drm/atomic: Document __drm_connectors_state state pointer
authorMaxime Ripard <mripard@kernel.org>
Tue, 30 Sep 2025 10:59:18 +0000 (12:59 +0200)
committerMaxime Ripard <mripard@kernel.org>
Mon, 6 Oct 2025 11:59:04 +0000 (13:59 +0200)
While the old and new state pointers are somewhat self-explanatory, the
state pointer and its relation to the other two really isn't.

Now that we've cleaned up everything and it isn't used in any
modesetting path, we can document what it's still useful for: to free
the right state when we free the global state.

Reviewed-by: Luca Ceresoli <luca.ceresoli@bootlin.com>
Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Link: https://lore.kernel.org/r/20250930-drm-no-more-existing-state-v5-3-eeb9e1287907@kernel.org
Signed-off-by: Maxime Ripard <mripard@kernel.org>
include/drm/drm_atomic.h

index 321c866d5b0a46df7a9adbbf5e4cabd1ff987aad..fe47715c31e41ad8bd45140fe6413b57b69b7c61 100644 (file)
@@ -182,7 +182,24 @@ struct __drm_crtcs_state {
 
 struct __drm_connnectors_state {
        struct drm_connector *ptr;
-       struct drm_connector_state *state, *old_state, *new_state;
+
+       /**
+        * @state:
+        *
+        * Used to track the @drm_connector_state we will need to free
+        * when tearing down the associated &drm_atomic_state in
+        * $drm_mode_config_funcs.atomic_state_clear or
+        * drm_atomic_state_default_clear().
+        *
+        * Before a commit, and the call to
+        * drm_atomic_helper_swap_state() in particular, it points to
+        * the same state than @new_state. After a commit, it points to
+        * the same state than @old_state.
+        */
+       struct drm_connector_state *state;
+
+       struct drm_connector_state *old_state, *new_state;
+
        /**
         * @out_fence_ptr:
         *