aboutsummaryrefslogtreecommitdiffstats
path: root/include/drm/drm_atomic_helper.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/drm/drm_atomic_helper.h')
-rw-r--r--include/drm/drm_atomic_helper.h26
1 files changed, 26 insertions, 0 deletions
diff --git a/include/drm/drm_atomic_helper.h b/include/drm/drm_atomic_helper.h
index 64b4e91b93bc..f956b413311e 100644
--- a/include/drm/drm_atomic_helper.h
+++ b/include/drm/drm_atomic_helper.h
@@ -28,6 +28,8 @@
28#ifndef DRM_ATOMIC_HELPER_H_ 28#ifndef DRM_ATOMIC_HELPER_H_
29#define DRM_ATOMIC_HELPER_H_ 29#define DRM_ATOMIC_HELPER_H_
30 30
31#include <drm/drm_crtc.h>
32
31int drm_atomic_helper_check(struct drm_device *dev, 33int drm_atomic_helper_check(struct drm_device *dev,
32 struct drm_atomic_state *state); 34 struct drm_atomic_state *state);
33int drm_atomic_helper_commit(struct drm_device *dev, 35int drm_atomic_helper_commit(struct drm_device *dev,
@@ -96,5 +98,29 @@ drm_atomic_helper_connector_duplicate_state(struct drm_connector *connector);
96void drm_atomic_helper_connector_destroy_state(struct drm_connector *connector, 98void drm_atomic_helper_connector_destroy_state(struct drm_connector *connector,
97 struct drm_connector_state *state); 99 struct drm_connector_state *state);
98 100
101/**
102 * drm_atomic_crtc_for_each_plane - iterate over planes currently attached to CRTC
103 * @plane: the loop cursor
104 * @crtc: the crtc whose planes are iterated
105 *
106 * This iterates over the current state, useful (for example) when applying
107 * atomic state after it has been checked and swapped. To iterate over the
108 * planes which *will* be attached (for ->atomic_check()) see
109 * drm_crtc_for_each_pending_plane()
110 */
111#define drm_atomic_crtc_for_each_plane(plane, crtc) \
112 drm_for_each_plane_mask(plane, (crtc)->dev, (crtc)->state->plane_mask)
113
114/**
115 * drm_crtc_atomic_state_for_each_plane - iterate over attached planes in new state
116 * @plane: the loop cursor
117 * @crtc_state: the incoming crtc-state
118 *
119 * Similar to drm_crtc_for_each_plane(), but iterates the planes that will be
120 * attached if the specified state is applied. Useful during (for example)
121 * ->atomic_check() operations, to validate the incoming state
122 */
123#define drm_atomic_crtc_state_for_each_plane(plane, crtc_state) \
124 drm_for_each_plane_mask(plane, (crtc_state)->state->dev, (crtc_state)->plane_mask)
99 125
100#endif /* DRM_ATOMIC_HELPER_H_ */ 126#endif /* DRM_ATOMIC_HELPER_H_ */