hc
2023-12-11 d2ccde1c8e90d38cee87a1b0309ad2827f3fd30d
kernel/include/drm/drm_atomic_helper.h
....@@ -31,6 +31,8 @@
3131 #include <drm/drm_crtc.h>
3232 #include <drm/drm_modeset_helper_vtables.h>
3333 #include <drm/drm_modeset_helper.h>
34
+#include <drm/drm_atomic_state_helper.h>
35
+#include <drm/drm_util.h>
3436
3537 struct drm_atomic_state;
3638 struct drm_private_obj;
....@@ -71,6 +73,9 @@
7173 void
7274 drm_atomic_helper_update_legacy_modeset_state(struct drm_device *dev,
7375 struct drm_atomic_state *old_state);
76
+
77
+void
78
+drm_atomic_helper_calc_timestamping_constants(struct drm_atomic_state *state);
7479
7580 void drm_atomic_helper_commit_modeset_disables(struct drm_device *dev,
7681 struct drm_atomic_state *state);
....@@ -115,16 +120,15 @@
115120 struct drm_modeset_acquire_ctx *ctx);
116121 int drm_atomic_helper_disable_plane(struct drm_plane *plane,
117122 struct drm_modeset_acquire_ctx *ctx);
118
-int __drm_atomic_helper_disable_plane(struct drm_plane *plane,
119
- struct drm_plane_state *plane_state);
120123 int drm_atomic_helper_set_config(struct drm_mode_set *set,
121124 struct drm_modeset_acquire_ctx *ctx);
122
-int __drm_atomic_helper_set_config(struct drm_mode_set *set,
123
- struct drm_atomic_state *state);
124125
125126 int drm_atomic_helper_disable_all(struct drm_device *dev,
126127 struct drm_modeset_acquire_ctx *ctx);
127128 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);
128132 struct drm_atomic_state *drm_atomic_helper_suspend(struct drm_device *dev);
129133 int drm_atomic_helper_commit_duplicated_state(struct drm_atomic_state *state,
130134 struct drm_modeset_acquire_ctx *ctx);
....@@ -143,54 +147,15 @@
143147 uint32_t flags,
144148 uint32_t target,
145149 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);
183150 int drm_atomic_helper_legacy_gamma_set(struct drm_crtc *crtc,
184151 u16 *red, u16 *green, u16 *blue,
185152 uint32_t size,
186153 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);
189154
190155 /**
191156 * drm_atomic_crtc_for_each_plane - iterate over planes currently attached to CRTC
192157 * @plane: the loop cursor
193
- * @crtc: the crtc whose planes are iterated
158
+ * @crtc: the CRTC whose planes are iterated
194159 *
195160 * This iterates over the current state, useful (for example) when applying
196161 * atomic state after it has been checked and swapped. To iterate over the
....@@ -204,7 +169,7 @@
204169 /**
205170 * drm_crtc_atomic_state_for_each_plane - iterate over attached planes in new state
206171 * @plane: the loop cursor
207
- * @crtc_state: the incoming crtc-state
172
+ * @crtc_state: the incoming CRTC state
208173 *
209174 * Similar to drm_crtc_for_each_plane(), but iterates the planes that will be
210175 * attached if the specified state is applied. Useful during for example
....@@ -218,7 +183,7 @@
218183 * drm_crtc_atomic_state_for_each_plane_state - iterate over attached planes in new state
219184 * @plane: the loop cursor
220185 * @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
222187 *
223188 * Similar to drm_crtc_for_each_plane(), but iterates the planes that will be
224189 * attached if the specified state is applied. Useful during for example
....@@ -227,7 +192,7 @@
227192 *
228193 * Compared to just drm_atomic_crtc_state_for_each_plane() this also fills in a
229194 * 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.
231196 */
232197 #define drm_atomic_crtc_state_for_each_plane_state(plane, plane_state, crtc_state) \
233198 drm_for_each_plane_mask(plane, (crtc_state)->state->dev, (crtc_state)->plane_mask) \
....@@ -262,4 +227,12 @@
262227 return old_plane_state->crtc && !new_plane_state->crtc;
263228 }
264229
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
+
265238 #endif /* DRM_ATOMIC_HELPER_H_ */