diff options
author | Thierry Reding <treding@nvidia.com> | 2014-12-03 10:44:34 -0500 |
---|---|---|
committer | Thierry Reding <treding@nvidia.com> | 2015-01-27 04:14:42 -0500 |
commit | 4cd4df8080a3e0d9b5a75dd52fa2133738def213 (patch) | |
tree | f263b87b5c568f72d9c4b3c9945623b52b558553 /include/drm | |
parent | 407b8bd9f5d284ffa13a9f9a709e6289bb4ae47e (diff) |
drm/atomic: Add ->atomic_check() to encoder helpers
This callback can be used instead of the legacy ->mode_fixup() and is
passed the CRTC and connector states. It can thus use these states to
validate the modeset and cache values in the state to be used during
the actual modeset.
Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Signed-off-by: Thierry Reding <treding@nvidia.com>
Diffstat (limited to 'include/drm')
-rw-r--r-- | include/drm/drm_crtc_helper.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/include/drm/drm_crtc_helper.h b/include/drm/drm_crtc_helper.h index e76828d81a8b..5810c027acdc 100644 --- a/include/drm/drm_crtc_helper.h +++ b/include/drm/drm_crtc_helper.h | |||
@@ -115,6 +115,7 @@ struct drm_crtc_helper_funcs { | |||
115 | * @get_crtc: return CRTC that the encoder is currently attached to | 115 | * @get_crtc: return CRTC that the encoder is currently attached to |
116 | * @detect: connection status detection | 116 | * @detect: connection status detection |
117 | * @disable: disable encoder when not in use (overrides DPMS off) | 117 | * @disable: disable encoder when not in use (overrides DPMS off) |
118 | * @atomic_check: check for validity of an atomic update | ||
118 | * | 119 | * |
119 | * The helper operations are called by the mid-layer CRTC helper. | 120 | * The helper operations are called by the mid-layer CRTC helper. |
120 | */ | 121 | */ |
@@ -137,6 +138,11 @@ struct drm_encoder_helper_funcs { | |||
137 | struct drm_connector *connector); | 138 | struct drm_connector *connector); |
138 | /* disable encoder when not in use - more explicit than dpms off */ | 139 | /* disable encoder when not in use - more explicit than dpms off */ |
139 | void (*disable)(struct drm_encoder *encoder); | 140 | void (*disable)(struct drm_encoder *encoder); |
141 | |||
142 | /* atomic helpers */ | ||
143 | int (*atomic_check)(struct drm_encoder *encoder, | ||
144 | struct drm_crtc_state *crtc_state, | ||
145 | struct drm_connector_state *conn_state); | ||
140 | }; | 146 | }; |
141 | 147 | ||
142 | /** | 148 | /** |