Lines Matching refs:bridge

51 	 * @DRM_BRIDGE_ATTACH_NO_CONNECTOR: When this flag is set the bridge
64 * This callback is invoked whenever our bridge is being attached to a
74 int (*attach)(struct drm_bridge *bridge,
80 * This callback is invoked whenever our bridge is being detached from a
85 void (*detach)(struct drm_bridge *bridge);
91 * bridge. This should be implemented if the bridge has some sort of
92 * restriction in the modes it can display. For example, a given bridge
118 enum drm_mode_status (*mode_valid)(struct drm_bridge *bridge,
128 * &drm_bridge. The parameter adjusted_mode is the input mode the bridge
132 * This is the only hook that allows a bridge to reject a modeset. If
151 * that modes are filtered consistently put any bridge constraints and
159 bool (*mode_fixup)(struct drm_bridge *bridge,
165 * This callback should disable the bridge. It is called right before
167 * preceding element is a bridge this means it's called before that
168 * bridge's @disable vfunc. If the preceding element is a &drm_encoder
173 * The bridge can assume that the display pipe (i.e. clocks and timing
183 void (*disable)(struct drm_bridge *bridge);
188 * This callback should disable the bridge. It is called right after the
190 * element is a bridge this means it's called after that bridge's
196 * The bridge must assume that the display pipe (i.e. clocks and timing
207 void (*post_disable)(struct drm_bridge *bridge);
212 * This callback should set the given mode on the bridge. It is called
214 * pipeline has been called already. If the bridge is the first element
220 * first bridge in the chain. It can be different from the mode
222 * of the bridges chain, for instance when the first bridge in the chain
224 * bridge in the chain and is likely irrelevant for the other bridges.
235 void (*mode_set)(struct drm_bridge *bridge,
241 * This callback should enable the bridge. It is called right before
243 * preceding element is a bridge this means it's called before that
244 * bridge's @pre_enable function. If the preceding element is a
249 * The display pipe (i.e. clocks and timing signals) feeding this bridge
250 * will not yet be running when this callback is called. The bridge must
251 * not enable the display link feeding the next bridge in the chain (if
261 void (*pre_enable)(struct drm_bridge *bridge);
266 * This callback should enable the bridge. It is called right after
268 * preceding element is a bridge this means it's called after that
269 * bridge's @enable function. If the preceding element is a
274 * The bridge can assume that the display pipe (i.e. clocks and timing
276 * callback must enable the display link feeding the next bridge in the
286 void (*enable)(struct drm_bridge *bridge);
291 * This callback should enable the bridge. It is called right before
293 * preceding element is a bridge this means it's called before that
294 * bridge's @atomic_pre_enable or @pre_enable function. If the preceding
298 * The display pipe (i.e. clocks and timing signals) feeding this bridge
299 * will not yet be running when this callback is called. The bridge must
300 * not enable the display link feeding the next bridge in the chain (if
305 void (*atomic_pre_enable)(struct drm_bridge *bridge,
311 * This callback should enable the bridge. It is called right after
313 * preceding element is a bridge this means it's called after that
314 * bridge's @atomic_enable or @enable function. If the preceding element
318 * The bridge can assume that the display pipe (i.e. clocks and timing
320 * callback must enable the display link feeding the next bridge in the
325 void (*atomic_enable)(struct drm_bridge *bridge,
330 * This callback should disable the bridge. It is called right before
332 * preceding element is a bridge this means it's called before that
333 * bridge's @atomic_disable or @disable vfunc. If the preceding element
337 * The bridge can assume that the display pipe (i.e. clocks and timing
342 void (*atomic_disable)(struct drm_bridge *bridge,
348 * This callback should disable the bridge. It is called right after the
350 * element is a bridge this means it's called after that bridge's
355 * The bridge must assume that the display pipe (i.e. clocks and timing
361 void (*atomic_post_disable)(struct drm_bridge *bridge,
367 * Duplicate the current bridge state object (which is guaranteed to be
370 * The atomic_duplicate_state hook is mandatory if the bridge
379 struct drm_bridge_state *(*atomic_duplicate_state)(struct drm_bridge *bridge);
384 * Destroy a bridge state object previously allocated by
387 * The atomic_destroy_state hook is mandatory if the bridge implements
393 void (*atomic_destroy_state)(struct drm_bridge *bridge,
399 * Return the supported bus formats on the output end of a bridge.
407 * This method is only called on the last element of the bridge chain
415 u32 *(*atomic_get_output_bus_fmts)(struct drm_bridge *bridge,
424 * Return the supported bus formats on the input end of a bridge for
435 * This method is called on all elements of the bridge chain as part of
439 * bus format negotiation on this element of the bridge without
449 * Note: Even if input format selection on the first bridge has no
455 u32 *(*atomic_get_input_bus_fmts)(struct drm_bridge *bridge,
465 * This method is responsible for checking bridge state correctness.
470 * order (from the last to the first bridge).
479 * field is set to the next bridge
481 * &drm_connector.display_info.bus_flags if the bridge is the last
487 int (*atomic_check)(struct drm_bridge *bridge,
495 * Reset the bridge to a predefined state (or retrieve its current
499 * The atomic_reset hook is mandatory if the bridge implements any of
508 * 1. The reset operation happens when the bridge is attached, not when
517 struct drm_bridge_state *(*atomic_reset)(struct drm_bridge *bridge);
522 * Check if anything is attached to the bridge output.
524 * This callback is optional, if not implemented the bridge will be
531 * drm_connector_status indicating the bridge output status.
533 enum drm_connector_status (*detect)(struct drm_bridge *bridge);
550 * filling modes, and shall not be stored internally by bridge drivers
557 int (*get_modes)(struct drm_bridge *bridge,
566 * information for a display connected to the bridge output. Bridges
578 * retrieval, and shall not be stored internally by bridge drivers for
588 const struct drm_edid *(*edid_read)(struct drm_bridge *bridge,
594 * Notify the bridge of hot plug detection.
601 void (*hpd_notify)(struct drm_bridge *bridge,
607 * Enable hot plug detection. From now on the bridge shall call
617 void (*hpd_enable)(struct drm_bridge *bridge);
622 * Disable hot plug detection. Once this function returns the bridge
631 void (*hpd_disable)(struct drm_bridge *bridge);
636 * Allows bridges to create bridge-specific debugfs files.
638 void (*debugfs_init)(struct drm_bridge *bridge, struct dentry *root);
642 * struct drm_bridge_timings - timing information for the bridge
649 * this bridge requires (like pixel signal polarity). See also
663 * Defines the time in picoseconds taken for the bridge to sample the
678 * enum drm_bridge_ops - Bitmask of operations supported by the bridge
682 * @DRM_BRIDGE_OP_DETECT: The bridge can detect displays connected to
688 * @DRM_BRIDGE_OP_EDID: The bridge can retrieve the EDID of the display
694 * @DRM_BRIDGE_OP_HPD: The bridge can detect hot-plug and hot-unplug
702 * @DRM_BRIDGE_OP_MODES: The bridge can retrieve the modes supported
711 * struct drm_bridge - central DRM bridge control structure
716 /** @dev: DRM device this bridge belongs to */
718 /** @encoder: encoder to which this bridge is connected */
720 /** @chain_node: used to form a bridge chain */
722 /** @of_node: device node pointer to the bridge */
729 * the timing specification for the bridge, if any (may be NULL)
734 /** @driver_private: pointer to the bridge driver's internal context */
736 /** @ops: bitmask of operations supported by the bridge */
739 * @type: Type of the connection at the bridge output
745 * @interlace_allowed: Indicate that the bridge can handle interlaced
750 * @pre_enable_prev_first: The bridge requires that the prev
751 * bridge @pre_enable function is called before its @pre_enable,
784 void drm_bridge_add(struct drm_bridge *bridge);
785 int devm_drm_bridge_add(struct device *dev, struct drm_bridge *bridge);
786 void drm_bridge_remove(struct drm_bridge *bridge);
787 int drm_bridge_attach(struct drm_encoder *encoder, struct drm_bridge *bridge,
801 * drm_bridge_get_next_bridge() - Get the next bridge in the chain
802 * @bridge: bridge object
805 * the next bridge in the chain after @bridge, or NULL if @bridge is the last.
808 drm_bridge_get_next_bridge(struct drm_bridge *bridge)
810 if (list_is_last(&bridge->chain_node, &bridge->encoder->bridge_chain))
813 return list_next_entry(bridge, chain_node);
817 * drm_bridge_get_prev_bridge() - Get the previous bridge in the chain
818 * @bridge: bridge object
821 * the previous bridge in the chain, or NULL if @bridge is the first.
824 drm_bridge_get_prev_bridge(struct drm_bridge *bridge)
826 if (list_is_first(&bridge->chain_node, &bridge->encoder->bridge_chain))
829 return list_prev_entry(bridge, chain_node);
833 * drm_bridge_chain_get_first_bridge() - Get the first bridge in the chain
837 * the first bridge in the chain, or NULL if @encoder has no bridge attached
850 * @bridge: a bridge pointer updated to point to the current bridge at each
853 * Iterate over all bridges present in the bridge chain attached to @encoder.
855 #define drm_for_each_bridge_in_chain(encoder, bridge) \
856 list_for_each_entry(bridge, &(encoder)->bridge_chain, chain_node)
858 bool drm_bridge_chain_mode_fixup(struct drm_bridge *bridge,
862 drm_bridge_chain_mode_valid(struct drm_bridge *bridge,
865 void drm_bridge_chain_mode_set(struct drm_bridge *bridge,
869 int drm_atomic_bridge_chain_check(struct drm_bridge *bridge,
872 void drm_atomic_bridge_chain_disable(struct drm_bridge *bridge,
874 void drm_atomic_bridge_chain_post_disable(struct drm_bridge *bridge,
876 void drm_atomic_bridge_chain_pre_enable(struct drm_bridge *bridge,
878 void drm_atomic_bridge_chain_enable(struct drm_bridge *bridge,
882 drm_atomic_helper_bridge_propagate_bus_fmt(struct drm_bridge *bridge,
889 enum drm_connector_status drm_bridge_detect(struct drm_bridge *bridge);
890 int drm_bridge_get_modes(struct drm_bridge *bridge,
892 const struct drm_edid *drm_bridge_edid_read(struct drm_bridge *bridge,
894 void drm_bridge_hpd_enable(struct drm_bridge *bridge,
898 void drm_bridge_hpd_disable(struct drm_bridge *bridge);
899 void drm_bridge_hpd_notify(struct drm_bridge *bridge,
903 bool drm_bridge_is_panel(const struct drm_bridge *bridge);
907 void drm_panel_bridge_remove(struct drm_bridge *bridge);
909 struct drm_bridge *bridge);
917 struct drm_connector *drm_panel_bridge_connector(struct drm_bridge *bridge);
919 static inline bool drm_bridge_is_panel(const struct drm_bridge *bridge)
925 struct drm_bridge *bridge)