Lines Matching +full:display +full:- +full:bridge
49 * enum drm_bridge_attach_flags - Flags for &drm_bridge_funcs.attach
53 * @DRM_BRIDGE_ATTACH_NO_CONNECTOR: When this flag is set the bridge
60 * struct drm_bridge_funcs - drm_bridge control functions
66 * This callback is invoked whenever our bridge is being attached to a
76 int (*attach)(struct drm_bridge *bridge,
82 * This callback is invoked whenever our bridge is being detached from a
87 void (*detach)(struct drm_bridge *bridge);
93 * bridge. This should be implemented if the bridge has some sort of
94 * restriction in the modes it can display. For example, a given bridge
111 * to look at anything else but the passed-in mode, and validate it
112 * against configuration-invariant hardware constraints. Any further
120 enum drm_mode_status (*mode_valid)(struct drm_bridge *bridge,
128 * mode is the display mode that should be fed to the next element in
129 * the display chain, either the final &drm_connector or the next
130 * &drm_bridge. The parameter adjusted_mode is the input mode the bridge
134 * This is the only hook that allows a bridge to reject a modeset. If
153 * that modes are filtered consistently put any bridge constraints and
161 bool (*mode_fixup)(struct drm_bridge *bridge,
167 * This callback should disable the bridge. It is called right before
168 * the preceding element in the display pipe is disabled. If the
169 * preceding element is a bridge this means it's called before that
170 * bridge's @disable vfunc. If the preceding element is a &drm_encoder
175 * The bridge can assume that the display pipe (i.e. clocks and timing
185 void (*disable)(struct drm_bridge *bridge);
190 * This callback should disable the bridge. It is called right after the
191 * preceding element in the display pipe is disabled. If the preceding
192 * element is a bridge this means it's called after that bridge's
198 * The bridge must assume that the display pipe (i.e. clocks and timing
209 void (*post_disable)(struct drm_bridge *bridge);
214 * This callback should set the given mode on the bridge. It is called
215 * after the @mode_set callback for the preceding element in the display
216 * pipeline has been called already. If the bridge is the first element
217 * then this would be &drm_encoder_helper_funcs.mode_set. The display
222 * first bridge in the chain. It can be different from the mode
224 * of the bridges chain, for instance when the first bridge in the chain
226 * bridge in the chain and is likely irrelevant for the other bridges.
237 void (*mode_set)(struct drm_bridge *bridge,
243 * This callback should enable the bridge. It is called right before
244 * the preceding element in the display pipe is enabled. If the
245 * preceding element is a bridge this means it's called before that
246 * bridge's @pre_enable function. If the preceding element is a
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
263 void (*pre_enable)(struct drm_bridge *bridge);
268 * This callback should enable the bridge. It is called right after
269 * the preceding element in the display pipe is enabled. If the
270 * preceding element is a bridge this means it's called after that
271 * bridge's @enable function. If the preceding element is a
276 * The bridge can assume that the display pipe (i.e. clocks and timing
278 * callback must enable the display link feeding the next bridge in the
288 void (*enable)(struct drm_bridge *bridge);
293 * This callback should enable the bridge. It is called right before
294 * the preceding element in the display pipe is enabled. If the
295 * preceding element is a bridge this means it's called before that
296 * bridge's @atomic_pre_enable or @pre_enable function. If the preceding
300 * The display pipe (i.e. clocks and timing signals) feeding this bridge
301 * will not yet be running when this callback is called. The bridge must
302 * not enable the display link feeding the next bridge in the chain (if
307 void (*atomic_pre_enable)(struct drm_bridge *bridge,
313 * This callback should enable the bridge. It is called right after
314 * the preceding element in the display pipe is enabled. If the
315 * preceding element is a bridge this means it's called after that
316 * bridge's @atomic_enable or @enable function. If the preceding element
320 * The bridge can assume that the display pipe (i.e. clocks and timing
322 * callback must enable the display link feeding the next bridge in the
327 void (*atomic_enable)(struct drm_bridge *bridge,
332 * This callback should disable the bridge. It is called right before
333 * the preceding element in the display pipe is disabled. If the
334 * preceding element is a bridge this means it's called before that
335 * bridge's @atomic_disable or @disable vfunc. If the preceding element
339 * The bridge can assume that the display pipe (i.e. clocks and timing
344 void (*atomic_disable)(struct drm_bridge *bridge,
350 * This callback should disable the bridge. It is called right after the
351 * preceding element in the display pipe is disabled. If the preceding
352 * element is a bridge this means it's called after that bridge's
357 * The bridge must assume that the display pipe (i.e. clocks and timing
363 void (*atomic_post_disable)(struct drm_bridge *bridge,
369 * Duplicate the current bridge state object (which is guaranteed to be
370 * non-NULL).
372 * The atomic_duplicate_state hook is mandatory if the bridge
381 struct drm_bridge_state *(*atomic_duplicate_state)(struct drm_bridge *bridge);
386 * Destroy a bridge state object previously allocated by
389 * The atomic_destroy_state hook is mandatory if the bridge implements
395 void (*atomic_destroy_state)(struct drm_bridge *bridge,
401 * Return the supported bus formats on the output end of a bridge.
409 * This method is only called on the last element of the bridge chain
417 u32 *(*atomic_get_output_bus_fmts)(struct drm_bridge *bridge,
426 * Return the supported bus formats on the input end of a bridge for
437 * This method is called on all elements of the bridge chain as part of
441 * bus format negotiation on this element of the bridge without
445 * Bridge drivers that need to support being linked to bridges that are
451 * Note: Even if input format selection on the first bridge has no
457 u32 *(*atomic_get_input_bus_fmts)(struct drm_bridge *bridge,
467 * This method is responsible for checking bridge state correctness.
472 * order (from the last to the first bridge).
481 * field is set to the next bridge
483 * &drm_connector.display_info.bus_flags if the bridge is the last
489 int (*atomic_check)(struct drm_bridge *bridge,
497 * Reset the bridge to a predefined state (or retrieve its current
501 * The atomic_reset hook is mandatory if the bridge implements any of
510 * 1. The reset operation happens when the bridge is attached, not when
519 struct drm_bridge_state *(*atomic_reset)(struct drm_bridge *bridge);
524 * Check if anything is attached to the bridge output.
526 * This callback is optional, if not implemented the bridge will be
529 * DRM_BRIDGE_OP_DETECT flag in their &drm_bridge->ops.
533 * drm_connector_status indicating the bridge output status.
535 enum drm_connector_status (*detect)(struct drm_bridge *bridge);
543 * The @get_modes callback is mostly intended to support non-probeable
546 * &drm_bridge_funcs->edid_read callback instead.
549 * DRM_BRIDGE_OP_MODES flag in their &drm_bridge->ops.
552 * filling modes, and shall not be stored internally by bridge drivers
559 int (*get_modes)(struct drm_bridge *bridge,
565 * Read the EDID data of the connected display.
568 * information for a display connected to the bridge output. Bridges
577 * DRM_BRIDGE_OP_EDID flag in their &drm_bridge->ops.
580 * retrieval, and shall not be stored internally by bridge drivers for
590 const struct drm_edid *(*edid_read)(struct drm_bridge *bridge,
596 * Notify the bridge of hot plug detection.
599 * need to be notified of display connection or disconnection for
603 void (*hpd_notify)(struct drm_bridge *bridge,
609 * Enable hot plug detection. From now on the bridge shall call
615 * that support hot-plug notification without polling. Bridges that
617 * the DRM_BRIDGE_OP_HPD flag in their &drm_bridge->ops.
619 void (*hpd_enable)(struct drm_bridge *bridge);
624 * Disable hot plug detection. Once this function returns the bridge
629 * that support hot-plug notification without polling. Bridges that
631 * the DRM_BRIDGE_OP_HPD flag in their &drm_bridge->ops.
633 void (*hpd_disable)(struct drm_bridge *bridge);
644 * &drm_bridge->ops.
652 (*hdmi_tmds_char_rate_valid)(const struct drm_bridge *bridge,
664 * set the DRM_BRIDGE_OP_HDMI flag in their &drm_bridge->ops.
666 int (*hdmi_clear_infoframe)(struct drm_bridge *bridge,
675 * set the DRM_BRIDGE_OP_HDMI flag in their &drm_bridge->ops.
677 int (*hdmi_write_infoframe)(struct drm_bridge *bridge,
691 struct drm_bridge *bridge);
695 * Configures HDMI-encoder for audio stream. Can be called multiple
697 * bridge's configuration.
703 struct drm_bridge *bridge,
711 * the bridge's configuration.
717 struct drm_bridge *bridge);
729 struct drm_bridge *bridge,
735 * Allows bridges to create bridge-specific debugfs files.
737 void (*debugfs_init)(struct drm_bridge *bridge, struct dentry *root);
741 * struct drm_bridge_timings - timing information for the bridge
748 * this bridge requires (like pixel signal polarity). See also
749 * &drm_display_info->bus_flags.
762 * Defines the time in picoseconds taken for the bridge to sample the
769 * True if the bus operates in dual-link mode. The exact meaning is
770 * dependent on the bus type. For LVDS buses, this indicates that even-
771 * and odd-numbered pixels are received on separate links.
777 * enum drm_bridge_ops - Bitmask of operations supported by the bridge
781 * @DRM_BRIDGE_OP_DETECT: The bridge can detect displays connected to
783 * &drm_bridge_funcs->detect callback.
787 * @DRM_BRIDGE_OP_EDID: The bridge can retrieve the EDID of the display
789 * the &drm_bridge_funcs->edid_read callback.
793 * @DRM_BRIDGE_OP_HPD: The bridge can detect hot-plug and hot-unplug
795 * implement the &drm_bridge_funcs->hpd_enable and
796 * &drm_bridge_funcs->hpd_disable callbacks if they support enabling
797 * and disabling hot-plug detection dynamically.
801 * @DRM_BRIDGE_OP_MODES: The bridge can retrieve the modes supported
802 * by the display at its output. This does not include reading EDID
804 * this flag shall implement the &drm_bridge_funcs->get_modes callback.
808 * @DRM_BRIDGE_OP_HDMI: The bridge provides HDMI connector operations,
810 * implement the &drm_bridge_funcs->write_infoframe callback.
812 * Note: currently there can be at most one bridge in a chain that sets
820 * struct drm_bridge - central DRM bridge control structure
825 /** @dev: DRM device this bridge belongs to */
827 /** @encoder: encoder to which this bridge is connected */
829 /** @chain_node: used to form a bridge chain */
831 /** @of_node: device node pointer to the bridge */
838 * the timing specification for the bridge, if any (may be NULL)
843 /** @driver_private: pointer to the bridge driver's internal context */
845 /** @ops: bitmask of operations supported by the bridge */
848 * @type: Type of the connection at the bridge output
850 * identifies the type of connected display.
854 * @interlace_allowed: Indicate that the bridge can handle interlaced
859 * @ycbcr_420_allowed: Indicate that the bridge can handle YCbCr 420
864 * @pre_enable_prev_first: The bridge requires that the prev
865 * bridge @pre_enable function is called before its @pre_enable,
910 * @max_bpc: Maximum bits per char the HDMI bridge supports. Allowed
933 * @hdmi_audio_dai_port: sound DAI port, -1 if it is not enabled
944 void drm_bridge_add(struct drm_bridge *bridge);
945 int devm_drm_bridge_add(struct device *dev, struct drm_bridge *bridge);
946 void drm_bridge_remove(struct drm_bridge *bridge);
947 int drm_bridge_attach(struct drm_encoder *encoder, struct drm_bridge *bridge,
961 * drm_bridge_get_next_bridge() - Get the next bridge in the chain
962 * @bridge: bridge object
965 * the next bridge in the chain after @bridge, or NULL if @bridge is the last.
968 drm_bridge_get_next_bridge(struct drm_bridge *bridge) in drm_bridge_get_next_bridge() argument
970 if (list_is_last(&bridge->chain_node, &bridge->encoder->bridge_chain)) in drm_bridge_get_next_bridge()
973 return list_next_entry(bridge, chain_node); in drm_bridge_get_next_bridge()
977 * drm_bridge_get_prev_bridge() - Get the previous bridge in the chain
978 * @bridge: bridge object
981 * the previous bridge in the chain, or NULL if @bridge is the first.
984 drm_bridge_get_prev_bridge(struct drm_bridge *bridge) in drm_bridge_get_prev_bridge() argument
986 if (list_is_first(&bridge->chain_node, &bridge->encoder->bridge_chain)) in drm_bridge_get_prev_bridge()
989 return list_prev_entry(bridge, chain_node); in drm_bridge_get_prev_bridge()
993 * drm_bridge_chain_get_first_bridge() - Get the first bridge in the chain
997 * the first bridge in the chain, or NULL if @encoder has no bridge attached
1003 return list_first_entry_or_null(&encoder->bridge_chain, in drm_bridge_chain_get_first_bridge()
1008 * drm_for_each_bridge_in_chain() - Iterate over all bridges present in a chain
1010 * @bridge: a bridge pointer updated to point to the current bridge at each
1013 * Iterate over all bridges present in the bridge chain attached to @encoder.
1015 #define drm_for_each_bridge_in_chain(encoder, bridge) \ argument
1016 list_for_each_entry(bridge, &(encoder)->bridge_chain, chain_node)
1019 drm_bridge_chain_mode_valid(struct drm_bridge *bridge,
1022 void drm_bridge_chain_mode_set(struct drm_bridge *bridge,
1026 int drm_atomic_bridge_chain_check(struct drm_bridge *bridge,
1029 void drm_atomic_bridge_chain_disable(struct drm_bridge *bridge,
1031 void drm_atomic_bridge_chain_post_disable(struct drm_bridge *bridge,
1033 void drm_atomic_bridge_chain_pre_enable(struct drm_bridge *bridge,
1035 void drm_atomic_bridge_chain_enable(struct drm_bridge *bridge,
1039 drm_atomic_helper_bridge_propagate_bus_fmt(struct drm_bridge *bridge,
1046 enum drm_connector_status drm_bridge_detect(struct drm_bridge *bridge);
1047 int drm_bridge_get_modes(struct drm_bridge *bridge,
1049 const struct drm_edid *drm_bridge_edid_read(struct drm_bridge *bridge,
1051 void drm_bridge_hpd_enable(struct drm_bridge *bridge,
1055 void drm_bridge_hpd_disable(struct drm_bridge *bridge);
1056 void drm_bridge_hpd_notify(struct drm_bridge *bridge,
1060 bool drm_bridge_is_panel(const struct drm_bridge *bridge);
1064 void drm_panel_bridge_remove(struct drm_bridge *bridge);
1066 struct drm_bridge *bridge);
1074 struct drm_connector *drm_panel_bridge_connector(struct drm_bridge *bridge);
1076 static inline bool drm_bridge_is_panel(const struct drm_bridge *bridge) in drm_bridge_is_panel() argument
1082 struct drm_bridge *bridge) in drm_panel_bridge_set_orientation() argument
1084 return -EINVAL; in drm_panel_bridge_set_orientation()
1099 return ERR_PTR(-ENODEV); in devm_drm_of_get_bridge()
1107 return ERR_PTR(-ENODEV); in drmm_of_get_bridge()