aboutsummaryrefslogtreecommitdiffstats
path: root/include/drm/drm_atomic.h
diff options
context:
space:
mode:
authorBrian Starkey <brian.starkey@arm.com>2016-10-13 10:47:08 +0100
committerDaniel Vetter <daniel.vetter@ffwll.ch>2016-10-17 08:07:11 +0200
commitd807ed1c55fb1b2dcfb2bc49385e227f6bee7669 (patch)
treed6422d386983b3e6bd1da80b536ba64751ba30c0 /include/drm/drm_atomic.h
parentdrm/savage: dereferencing an error pointer (diff)
downloadlinux-dev-d807ed1c55fb1b2dcfb2bc49385e227f6bee7669.tar.xz
linux-dev-d807ed1c55fb1b2dcfb2bc49385e227f6bee7669.zip
drm: atomic: Clarify documentation around drm_atomic_crtc_needs_modeset
Add some additional comments to more explicitly describe the meaning and usage of the three CRTC modeset detection booleans: mode_changed, connectors_changed and active_changed. Suggested-by: Daniel Vetter <daniel.vetter@ffwll.ch> Signed-off-by: Brian Starkey <brian.starkey@arm.com> Acked-by: Alex Deucher <alexander.deucher@amd.com> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch> Link: http://patchwork.freedesktop.org/patch/msgid/1476352028-16701-1-git-send-email-brian.starkey@arm.com
Diffstat (limited to 'include/drm/drm_atomic.h')
-rw-r--r--include/drm/drm_atomic.h11
1 files changed, 10 insertions, 1 deletions
diff --git a/include/drm/drm_atomic.h b/include/drm/drm_atomic.h
index 9701f2dfb784..c52f99415c55 100644
--- a/include/drm/drm_atomic.h
+++ b/include/drm/drm_atomic.h
@@ -365,8 +365,17 @@ int __must_check drm_atomic_nonblocking_commit(struct drm_atomic_state *state);
*
* To give drivers flexibility struct &drm_crtc_state has 3 booleans to track
* whether the state CRTC changed enough to need a full modeset cycle:
- * connectors_changed, mode_changed and active_change. This helper simply
+ * connectors_changed, mode_changed and active_changed. This helper simply
* combines these three to compute the overall need for a modeset for @state.
+ *
+ * The atomic helper code sets these booleans, but drivers can and should
+ * change them appropriately to accurately represent whether a modeset is
+ * really needed. In general, drivers should avoid full modesets whenever
+ * possible.
+ *
+ * For example if the CRTC mode has changed, and the hardware is able to enact
+ * the requested mode change without going through a full modeset, the driver
+ * should clear mode_changed during its ->atomic_check.
*/
static inline bool
drm_atomic_crtc_needs_modeset(struct drm_crtc_state *state)