@@ -237,6 +237,103 @@ struct drm_bridge_funcs {
237
237
* The enable callback is optional.
238
238
*/
239
239
void (* enable )(struct drm_bridge * bridge );
240
+
241
+ /**
242
+ * @atomic_pre_enable:
243
+ *
244
+ * This callback should enable the bridge. It is called right before
245
+ * the preceding element in the display pipe is enabled. If the
246
+ * preceding element is a bridge this means it's called before that
247
+ * bridge's @atomic_pre_enable or @pre_enable function. If the preceding
248
+ * element is a &drm_encoder it's called right before the encoder's
249
+ * &drm_encoder_helper_funcs.atomic_enable hook.
250
+ *
251
+ * The display pipe (i.e. clocks and timing signals) feeding this bridge
252
+ * will not yet be running when this callback is called. The bridge must
253
+ * not enable the display link feeding the next bridge in the chain (if
254
+ * there is one) when this callback is called.
255
+ *
256
+ * Note that this function will only be invoked in the context of an
257
+ * atomic commit. It will not be invoked from &drm_bridge_pre_enable. It
258
+ * would be prudent to also provide an implementation of @pre_enable if
259
+ * you are expecting driver calls into &drm_bridge_pre_enable.
260
+ *
261
+ * The @atomic_pre_enable callback is optional.
262
+ */
263
+ void (* atomic_pre_enable )(struct drm_bridge * bridge ,
264
+ struct drm_atomic_state * state );
265
+
266
+ /**
267
+ * @atomic_enable:
268
+ *
269
+ * This callback should enable the bridge. It is called right after
270
+ * the preceding element in the display pipe is enabled. If the
271
+ * preceding element is a bridge this means it's called after that
272
+ * bridge's @atomic_enable or @enable function. If the preceding element
273
+ * is a &drm_encoder it's called right after the encoder's
274
+ * &drm_encoder_helper_funcs.atomic_enable hook.
275
+ *
276
+ * The bridge can assume that the display pipe (i.e. clocks and timing
277
+ * signals) feeding it is running when this callback is called. This
278
+ * callback must enable the display link feeding the next bridge in the
279
+ * chain if there is one.
280
+ *
281
+ * Note that this function will only be invoked in the context of an
282
+ * atomic commit. It will not be invoked from &drm_bridge_enable. It
283
+ * would be prudent to also provide an implementation of @enable if
284
+ * you are expecting driver calls into &drm_bridge_enable.
285
+ *
286
+ * The enable callback is optional.
287
+ */
288
+ void (* atomic_enable )(struct drm_bridge * bridge ,
289
+ struct drm_atomic_state * state );
290
+ /**
291
+ * @atomic_disable:
292
+ *
293
+ * This callback should disable the bridge. It is called right before
294
+ * the preceding element in the display pipe is disabled. If the
295
+ * preceding element is a bridge this means it's called before that
296
+ * bridge's @atomic_disable or @disable vfunc. If the preceding element
297
+ * is a &drm_encoder it's called right before the
298
+ * &drm_encoder_helper_funcs.atomic_disable hook.
299
+ *
300
+ * The bridge can assume that the display pipe (i.e. clocks and timing
301
+ * signals) feeding it is still running when this callback is called.
302
+ *
303
+ * Note that this function will only be invoked in the context of an
304
+ * atomic commit. It will not be invoked from &drm_bridge_disable. It
305
+ * would be prudent to also provide an implementation of @disable if
306
+ * you are expecting driver calls into &drm_bridge_disable.
307
+ *
308
+ * The disable callback is optional.
309
+ */
310
+ void (* atomic_disable )(struct drm_bridge * bridge ,
311
+ struct drm_atomic_state * state );
312
+
313
+ /**
314
+ * @atomic_post_disable:
315
+ *
316
+ * This callback should disable the bridge. It is called right after the
317
+ * preceding element in the display pipe is disabled. If the preceding
318
+ * element is a bridge this means it's called after that bridge's
319
+ * @atomic_post_disable or @post_disable function. If the preceding
320
+ * element is a &drm_encoder it's called right after the encoder's
321
+ * &drm_encoder_helper_funcs.atomic_disable hook.
322
+ *
323
+ * The bridge must assume that the display pipe (i.e. clocks and timing
324
+ * signals) feeding it is no longer running when this callback is
325
+ * called.
326
+ *
327
+ * Note that this function will only be invoked in the context of an
328
+ * atomic commit. It will not be invoked from &drm_bridge_post_disable.
329
+ * It would be prudent to also provide an implementation of
330
+ * @post_disable if you are expecting driver calls into
331
+ * &drm_bridge_post_disable.
332
+ *
333
+ * The post_disable callback is optional.
334
+ */
335
+ void (* atomic_post_disable )(struct drm_bridge * bridge ,
336
+ struct drm_atomic_state * state );
240
337
};
241
338
242
339
/**
@@ -314,6 +411,15 @@ void drm_bridge_mode_set(struct drm_bridge *bridge,
314
411
void drm_bridge_pre_enable (struct drm_bridge * bridge );
315
412
void drm_bridge_enable (struct drm_bridge * bridge );
316
413
414
+ void drm_atomic_bridge_disable (struct drm_bridge * bridge ,
415
+ struct drm_atomic_state * state );
416
+ void drm_atomic_bridge_post_disable (struct drm_bridge * bridge ,
417
+ struct drm_atomic_state * state );
418
+ void drm_atomic_bridge_pre_enable (struct drm_bridge * bridge ,
419
+ struct drm_atomic_state * state );
420
+ void drm_atomic_bridge_enable (struct drm_bridge * bridge ,
421
+ struct drm_atomic_state * state );
422
+
317
423
#ifdef CONFIG_DRM_PANEL_BRIDGE
318
424
struct drm_bridge * drm_panel_bridge_add (struct drm_panel * panel ,
319
425
u32 connector_type );
0 commit comments