.. | .. |
---|
31 | 31 | #include <drm/drm_crtc.h> |
---|
32 | 32 | #include <drm/drm_modeset_helper_vtables.h> |
---|
33 | 33 | #include <drm/drm_modeset_helper.h> |
---|
| 34 | +#include <drm/drm_atomic_state_helper.h> |
---|
| 35 | +#include <drm/drm_util.h> |
---|
34 | 36 | |
---|
35 | 37 | struct drm_atomic_state; |
---|
36 | 38 | struct drm_private_obj; |
---|
.. | .. |
---|
71 | 73 | void |
---|
72 | 74 | drm_atomic_helper_update_legacy_modeset_state(struct drm_device *dev, |
---|
73 | 75 | struct drm_atomic_state *old_state); |
---|
| 76 | + |
---|
| 77 | +void |
---|
| 78 | +drm_atomic_helper_calc_timestamping_constants(struct drm_atomic_state *state); |
---|
74 | 79 | |
---|
75 | 80 | void drm_atomic_helper_commit_modeset_disables(struct drm_device *dev, |
---|
76 | 81 | struct drm_atomic_state *state); |
---|
.. | .. |
---|
115 | 120 | struct drm_modeset_acquire_ctx *ctx); |
---|
116 | 121 | int drm_atomic_helper_disable_plane(struct drm_plane *plane, |
---|
117 | 122 | struct drm_modeset_acquire_ctx *ctx); |
---|
118 | | -int __drm_atomic_helper_disable_plane(struct drm_plane *plane, |
---|
119 | | - struct drm_plane_state *plane_state); |
---|
120 | 123 | int drm_atomic_helper_set_config(struct drm_mode_set *set, |
---|
121 | 124 | struct drm_modeset_acquire_ctx *ctx); |
---|
122 | | -int __drm_atomic_helper_set_config(struct drm_mode_set *set, |
---|
123 | | - struct drm_atomic_state *state); |
---|
124 | 125 | |
---|
125 | 126 | int drm_atomic_helper_disable_all(struct drm_device *dev, |
---|
126 | 127 | struct drm_modeset_acquire_ctx *ctx); |
---|
127 | 128 | void drm_atomic_helper_shutdown(struct drm_device *dev); |
---|
| 129 | +struct drm_atomic_state * |
---|
| 130 | +drm_atomic_helper_duplicate_state(struct drm_device *dev, |
---|
| 131 | + struct drm_modeset_acquire_ctx *ctx); |
---|
128 | 132 | struct drm_atomic_state *drm_atomic_helper_suspend(struct drm_device *dev); |
---|
129 | 133 | int drm_atomic_helper_commit_duplicated_state(struct drm_atomic_state *state, |
---|
130 | 134 | struct drm_modeset_acquire_ctx *ctx); |
---|
.. | .. |
---|
143 | 147 | uint32_t flags, |
---|
144 | 148 | uint32_t target, |
---|
145 | 149 | struct drm_modeset_acquire_ctx *ctx); |
---|
146 | | -struct drm_encoder * |
---|
147 | | -drm_atomic_helper_best_encoder(struct drm_connector *connector); |
---|
148 | | - |
---|
149 | | -/* default implementations for state handling */ |
---|
150 | | -void drm_atomic_helper_crtc_reset(struct drm_crtc *crtc); |
---|
151 | | -void __drm_atomic_helper_crtc_duplicate_state(struct drm_crtc *crtc, |
---|
152 | | - struct drm_crtc_state *state); |
---|
153 | | -struct drm_crtc_state * |
---|
154 | | -drm_atomic_helper_crtc_duplicate_state(struct drm_crtc *crtc); |
---|
155 | | -void __drm_atomic_helper_crtc_destroy_state(struct drm_crtc_state *state); |
---|
156 | | -void drm_atomic_helper_crtc_destroy_state(struct drm_crtc *crtc, |
---|
157 | | - struct drm_crtc_state *state); |
---|
158 | | - |
---|
159 | | -void drm_atomic_helper_plane_reset(struct drm_plane *plane); |
---|
160 | | -void __drm_atomic_helper_plane_duplicate_state(struct drm_plane *plane, |
---|
161 | | - struct drm_plane_state *state); |
---|
162 | | -struct drm_plane_state * |
---|
163 | | -drm_atomic_helper_plane_duplicate_state(struct drm_plane *plane); |
---|
164 | | -void __drm_atomic_helper_plane_destroy_state(struct drm_plane_state *state); |
---|
165 | | -void drm_atomic_helper_plane_destroy_state(struct drm_plane *plane, |
---|
166 | | - struct drm_plane_state *state); |
---|
167 | | - |
---|
168 | | -void __drm_atomic_helper_connector_reset(struct drm_connector *connector, |
---|
169 | | - struct drm_connector_state *conn_state); |
---|
170 | | -void drm_atomic_helper_connector_reset(struct drm_connector *connector); |
---|
171 | | -void |
---|
172 | | -__drm_atomic_helper_connector_duplicate_state(struct drm_connector *connector, |
---|
173 | | - struct drm_connector_state *state); |
---|
174 | | -struct drm_connector_state * |
---|
175 | | -drm_atomic_helper_connector_duplicate_state(struct drm_connector *connector); |
---|
176 | | -struct drm_atomic_state * |
---|
177 | | -drm_atomic_helper_duplicate_state(struct drm_device *dev, |
---|
178 | | - struct drm_modeset_acquire_ctx *ctx); |
---|
179 | | -void |
---|
180 | | -__drm_atomic_helper_connector_destroy_state(struct drm_connector_state *state); |
---|
181 | | -void drm_atomic_helper_connector_destroy_state(struct drm_connector *connector, |
---|
182 | | - struct drm_connector_state *state); |
---|
183 | 150 | int drm_atomic_helper_legacy_gamma_set(struct drm_crtc *crtc, |
---|
184 | 151 | u16 *red, u16 *green, u16 *blue, |
---|
185 | 152 | uint32_t size, |
---|
186 | 153 | struct drm_modeset_acquire_ctx *ctx); |
---|
187 | | -void __drm_atomic_helper_private_obj_duplicate_state(struct drm_private_obj *obj, |
---|
188 | | - struct drm_private_state *state); |
---|
189 | 154 | |
---|
190 | 155 | /** |
---|
191 | 156 | * drm_atomic_crtc_for_each_plane - iterate over planes currently attached to CRTC |
---|
192 | 157 | * @plane: the loop cursor |
---|
193 | | - * @crtc: the crtc whose planes are iterated |
---|
| 158 | + * @crtc: the CRTC whose planes are iterated |
---|
194 | 159 | * |
---|
195 | 160 | * This iterates over the current state, useful (for example) when applying |
---|
196 | 161 | * atomic state after it has been checked and swapped. To iterate over the |
---|
.. | .. |
---|
204 | 169 | /** |
---|
205 | 170 | * drm_crtc_atomic_state_for_each_plane - iterate over attached planes in new state |
---|
206 | 171 | * @plane: the loop cursor |
---|
207 | | - * @crtc_state: the incoming crtc-state |
---|
| 172 | + * @crtc_state: the incoming CRTC state |
---|
208 | 173 | * |
---|
209 | 174 | * Similar to drm_crtc_for_each_plane(), but iterates the planes that will be |
---|
210 | 175 | * attached if the specified state is applied. Useful during for example |
---|
.. | .. |
---|
218 | 183 | * drm_crtc_atomic_state_for_each_plane_state - iterate over attached planes in new state |
---|
219 | 184 | * @plane: the loop cursor |
---|
220 | 185 | * @plane_state: loop cursor for the plane's state, must be const |
---|
221 | | - * @crtc_state: the incoming crtc-state |
---|
| 186 | + * @crtc_state: the incoming CRTC state |
---|
222 | 187 | * |
---|
223 | 188 | * Similar to drm_crtc_for_each_plane(), but iterates the planes that will be |
---|
224 | 189 | * attached if the specified state is applied. Useful during for example |
---|
.. | .. |
---|
227 | 192 | * |
---|
228 | 193 | * Compared to just drm_atomic_crtc_state_for_each_plane() this also fills in a |
---|
229 | 194 | * const plane_state. This is useful when a driver just wants to peek at other |
---|
230 | | - * active planes on this crtc, but does not need to change it. |
---|
| 195 | + * active planes on this CRTC, but does not need to change it. |
---|
231 | 196 | */ |
---|
232 | 197 | #define drm_atomic_crtc_state_for_each_plane_state(plane, plane_state, crtc_state) \ |
---|
233 | 198 | drm_for_each_plane_mask(plane, (crtc_state)->state->dev, (crtc_state)->plane_mask) \ |
---|
.. | .. |
---|
262 | 227 | return old_plane_state->crtc && !new_plane_state->crtc; |
---|
263 | 228 | } |
---|
264 | 229 | |
---|
| 230 | +u32 * |
---|
| 231 | +drm_atomic_helper_bridge_propagate_bus_fmt(struct drm_bridge *bridge, |
---|
| 232 | + struct drm_bridge_state *bridge_state, |
---|
| 233 | + struct drm_crtc_state *crtc_state, |
---|
| 234 | + struct drm_connector_state *conn_state, |
---|
| 235 | + u32 output_fmt, |
---|
| 236 | + unsigned int *num_input_fmts); |
---|
| 237 | + |
---|
265 | 238 | #endif /* DRM_ATOMIC_HELPER_H_ */ |
---|