Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

drm/bridge: Document bridge init order with pre_enable_prev_first

In order to satisfy the MIPI DSI initialization sequence the bridge
init order has been altered with the help of pre_enable_prev_first
in pre_enable and post_disable bridge operations.

Document the affected bridge init order with an example on the
bridge operations helpers.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Dave Stevenson <dave.stevenson@raspberrypi.com>
Signed-off-by: Robert Foss <rfoss@kernel.org>
Link: https://patchwork.freedesktop.org/patch/msgid/20230328170752.1102347-2-jagan@amarulasolutions.com

authored by

Jagan Teki and committed by
Robert Foss
113cc3ad e18aeeda

+14
+14
drivers/gpu/drm/drm_bridge.c
··· 657 657 * bridge will be called before the previous one to reverse the @pre_enable 658 658 * calling direction. 659 659 * 660 + * Example: 661 + * Bridge A ---> Bridge B ---> Bridge C ---> Bridge D ---> Bridge E 662 + * 663 + * With pre_enable_prev_first flag enable in Bridge B, D, E then the resulting 664 + * @post_disable order would be, 665 + * Bridge B, Bridge A, Bridge E, Bridge D, Bridge C. 666 + * 660 667 * Note: the bridge passed should be the one closest to the encoder 661 668 */ 662 669 void drm_atomic_bridge_chain_post_disable(struct drm_bridge *bridge, ··· 759 752 * 760 753 * If a bridge sets @pre_enable_prev_first, then the pre_enable for the 761 754 * prev bridge will be called before pre_enable of this bridge. 755 + * 756 + * Example: 757 + * Bridge A ---> Bridge B ---> Bridge C ---> Bridge D ---> Bridge E 758 + * 759 + * With pre_enable_prev_first flag enable in Bridge B, D, E then the resulting 760 + * @pre_enable order would be, 761 + * Bridge C, Bridge D, Bridge E, Bridge A, Bridge B. 762 762 * 763 763 * Note: the bridge passed should be the one closest to the encoder 764 764 */