[PATCH] drm: Improve kerneldoc for mode_fixup callbacks and encoder's ->atomic_check

Liu Ying gnuiyl at gmail.com
Mon May 30 10:02:00 UTC 2016


To match with the atomic context, this patch updates kerneldoc to clarify
that all mode_fixup callbacks and encoder's ->atomic_check callback are
called only when enabling a display mode on the relevant CRTC.

Suggested-by: Daniel Vetter <daniel.vetter at ffwll.ch>
Signed-off-by: Liu Ying <gnuiyl at gmail.com>
---
 include/drm/drm_crtc.h                   | 11 ++++++-----
 include/drm/drm_modeset_helper_vtables.h | 29 ++++++++++++++++-------------
 2 files changed, 22 insertions(+), 18 deletions(-)

diff --git a/include/drm/drm_crtc.h b/include/drm/drm_crtc.h
index d1559cd..6e7ea36 100644
--- a/include/drm/drm_crtc.h
+++ b/include/drm/drm_crtc.h
@@ -1571,11 +1571,12 @@ struct drm_bridge_funcs {
 	 *
 	 * NOTE:
 	 *
-	 * This function is called in the check phase of atomic modesets, which
-	 * can be aborted for any reason (including on userspace's request to
-	 * just check whether a configuration would be possible). Drivers MUST
-	 * NOT touch any persistent state (hardware or software) or data
-	 * structures except the passed in @state parameter.
+	 * This function is called in the check phase of atomic modesets only
+	 * when enabling a display mode on the relevant CRTC, which can be
+	 * aborted for any reason (including on userspace's request to just
+	 * check whether a configuration would be possible). Drivers MUST NOT
+	 * touch any persistent state (hardware or software) or data structures
+	 * except the passed in @state parameter.
 	 *
 	 * RETURNS:
 	 *
diff --git a/include/drm/drm_modeset_helper_vtables.h b/include/drm/drm_modeset_helper_vtables.h
index d4619dc..269adfb 100644
--- a/include/drm/drm_modeset_helper_vtables.h
+++ b/include/drm/drm_modeset_helper_vtables.h
@@ -119,11 +119,12 @@ struct drm_crtc_helper_funcs {
 	 *
 	 * NOTE:
 	 *
-	 * This function is called in the check phase of atomic modesets, which
-	 * can be aborted for any reason (including on userspace's request to
-	 * just check whether a configuration would be possible). Atomic drivers
-	 * MUST NOT touch any persistent state (hardware or software) or data
-	 * structures except the passed in adjusted_mode parameter.
+	 * This function is called in the check phase of atomic modesets only
+	 * when enabling a display mode, which can be aborted for any reason
+	 * (including on userspace's request to just check whether a
+	 * configuration would be possible). Atomic drivers MUST NOT touch any
+	 * persistent state (hardware or software) or data structures except the
+	 * passed in adjusted_mode parameter.
 	 *
 	 * This is in contrast to the legacy CRTC helpers where this was
 	 * allowed.
@@ -443,10 +444,11 @@ struct drm_encoder_helper_funcs {
 	 *
 	 * NOTE:
 	 *
-	 * This function is called in the check phase of atomic modesets, which
-	 * can be aborted for any reason (including on userspace's request to
-	 * just check whether a configuration would be possible). Atomic drivers
-	 * MUST NOT touch any persistent state (hardware or software) or data
+	 * This function is called in the check phase of atomic modesets only
+	 * when enabling a display mode on the relevant CRTC, which can be
+	 * aborted for any reason (including on userspace's request to just
+	 * check whether a configuration would be possible). Atomic drivers MUST
+	 * NOT touch any persistent state (hardware or software) or data
 	 * structures except the passed in adjusted_mode parameter.
 	 *
 	 * This is in contrast to the legacy CRTC helpers where this was
@@ -623,10 +625,11 @@ struct drm_encoder_helper_funcs {
 	 *
 	 * NOTE:
 	 *
-	 * This function is called in the check phase of an atomic update. The
-	 * driver is not allowed to change anything outside of the free-standing
-	 * state objects passed-in or assembled in the overall &drm_atomic_state
-	 * update tracking structure.
+	 * This function is called in the check phase of an atomic update only
+	 * when enabling a display mode on the relevant CRTC. The driver is not
+	 * allowed to change anything outside of the free-standing state objects
+	 * passed-in or assembled in the overall &drm_atomic_state update
+	 * tracking structure.
 	 *
 	 * RETURNS:
 	 *
-- 
2.7.4



More information about the dri-devel mailing list