summaryrefslogtreecommitdiff
path: root/include/drm
diff options
context:
space:
mode:
authorMaxime Ripard <mripard@kernel.org>2025-09-30 12:59:24 +0200
committerMaxime Ripard <mripard@kernel.org>2025-10-06 13:59:08 +0200
commit7ca4e7fa4d57ce6eac4842e925ea1f98ea54a365 (patch)
treeeba2339fc8deaace2d320471d10617b0c0debd68 /include/drm
parent93d851281755f0a279402e1b88d29584ed8244e9 (diff)
drm/atomic: Document __drm_planes_state state pointer
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-9-eeb9e1287907@kernel.org Signed-off-by: Maxime Ripard <mripard@kernel.org>
Diffstat (limited to 'include/drm')
-rw-r--r--include/drm/drm_atomic.h18
1 files changed, 17 insertions, 1 deletions
diff --git a/include/drm/drm_atomic.h b/include/drm/drm_atomic.h
index b2cc9c4a9beb..a05012adcf94 100644
--- a/include/drm/drm_atomic.h
+++ b/include/drm/drm_atomic.h
@@ -159,7 +159,23 @@ struct drm_crtc_commit {
struct __drm_planes_state {
struct drm_plane *ptr;
- struct drm_plane_state *state, *old_state, *new_state;
+
+ /**
+ * @state:
+ *
+ * Used to track the @drm_plane_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_plane_state *state;
+
+ struct drm_plane_state *old_state, *new_state;
};
struct __drm_crtcs_state {