summaryrefslogtreecommitdiff
path: root/include/drm
diff options
context:
space:
mode:
authorVille Syrjälä <ville.syrjala@linux.intel.com>2025-10-17 19:33:27 +0300
committerVille Syrjälä <ville.syrjala@linux.intel.com>2025-10-28 21:45:14 +0200
commit0a0e79a2d9ed846fc3c3f5ef92b691e81bc9721a (patch)
tree3090427abc9124f905329a1bd16cc30a0cd7c6c9 /include/drm
parent1a88bb47a809433c5683e8d955f0611e7a188275 (diff)
drm/atomic: WARN about invalid drm_foo_get_state() usage
drm_{crtc,plane,connector,private_obj}_get_state() must not be called after the atomic check phase. At that point the commit has been carved in stone and no new objects must be introduced into it. WARN if anyone attempts to violate this rule. Cc: Maxime Ripard <mripard@kernel.org> Cc: Dan Carpenter <dan.carpenter@linaro.org> Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com> Link: https://patch.msgid.link/20251017163327.9074-2-ville.syrjala@linux.intel.com Reviewed-by: Maxime Ripard <mripard@kernel.org>
Diffstat (limited to 'include/drm')
-rw-r--r--include/drm/drm_atomic.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/include/drm/drm_atomic.h b/include/drm/drm_atomic.h
index 155e82f87e4d..2e433d44658d 100644
--- a/include/drm/drm_atomic.h
+++ b/include/drm/drm_atomic.h
@@ -524,6 +524,14 @@ struct drm_atomic_state {
bool duplicated : 1;
/**
+ * @checked:
+ *
+ * Indicates the state has been checked and thus must no longer
+ * be mutated. For internal use only, do not consult from drivers.
+ */
+ bool checked : 1;
+
+ /**
* @planes:
*
* Pointer to array of @drm_plane and @drm_plane_state part of this