include/drm/drm_bridge.h
Source file repositories/reference/linux-study-clean/include/drm/drm_bridge.h
File Facts
- System
- Linux kernel
- Corpus path
include/drm/drm_bridge.h- Extension
.h- Size
- 56046 bytes
- Lines
- 1645
- Domain
- Repository Root And Misc
- Bucket
- include
- Inferred role
- Repository Root And Misc: implementation source
- Status
- source implementation candidate
Why This File Exists
Top-level or miscellaneous repository surface. Use this as map coverage unless a later manual pass promotes the file into a deeper subsystem dossier.
- Top-level or miscellaneous repository surface. Use this as map coverage unless a later manual pass promotes the file into a deeper subsystem dossier.
- Uses kernel synchronization; read lock ordering, sleepability, and interrupt context assumptions before translating.
- Allocates kernel memory; connect allocation flags and lifetime to context constraints.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
linux/cleanup.hlinux/ctype.hlinux/list.hlinux/mutex.hdrm/drm_atomic.hdrm/drm_encoder.hdrm/drm_mode_object.hdrm/drm_modes.h
Detected Declarations
struct cec_msgstruct device_nodestruct drm_bridgestruct drm_bridge_timingsstruct drm_connectorstruct drm_display_infostruct drm_minorstruct drm_panelstruct edidstruct hdmi_codec_daifmtstruct hdmi_codec_paramsstruct i2c_adapterstruct drm_bridge_funcsstruct drm_bridge_timingsstruct drm_bridgeenum drm_bridge_attach_flagsenum drm_bridge_opsfunction drm_priv_to_bridgefunction drm_bridge_is_lastfunction drm_bridge_get_current_statefunction drm_bridge_get_next_bridgefunction drm_bridge_get_prev_bridgefunction drm_bridge_chain_get_first_bridgefunction drm_bridge_chain_get_last_bridgefunction __drm_for_each_bridge_in_chain_scoped_startfunction __drm_for_each_bridge_in_chain_from_startfunction drm_bridge_is_panelfunction drm_panel_bridge_set_orientation
Annotated Snippet
struct drm_bridge_funcs {
/**
* @attach:
*
* This callback is invoked whenever our bridge is being attached to a
* &drm_encoder. The flags argument tunes the behaviour of the attach
* operation (see DRM_BRIDGE_ATTACH_*).
*
* The @attach callback is optional.
*
* RETURNS:
*
* Zero on success, error code on failure.
*/
int (*attach)(struct drm_bridge *bridge, struct drm_encoder *encoder,
enum drm_bridge_attach_flags flags);
/**
* @destroy:
*
* This callback is invoked when the bridge is about to be
* deallocated.
*
* The @destroy callback is optional.
*/
void (*destroy)(struct drm_bridge *bridge);
/**
* @detach:
*
* This callback is invoked whenever our bridge is being detached from a
* &drm_encoder.
*
* The @detach callback is optional.
*/
void (*detach)(struct drm_bridge *bridge);
/**
* @mode_valid:
*
* This callback is used to check if a specific mode is valid in this
* bridge. This should be implemented if the bridge has some sort of
* restriction in the modes it can display. For example, a given bridge
* may be responsible to set a clock value. If the clock can not
* produce all the values for the available modes then this callback
* can be used to restrict the number of modes to only the ones that
* can be displayed.
*
* This hook is used by the probe helpers to filter the mode list in
* drm_helper_probe_single_connector_modes(), and it is used by the
* atomic helpers to validate modes supplied by userspace in
* drm_atomic_helper_check_modeset().
*
* The @mode_valid callback is optional.
*
* NOTE:
*
* Since this function is both called from the check phase of an atomic
* commit, and the mode validation in the probe paths it is not allowed
* to look at anything else but the passed-in mode, and validate it
* against configuration-invariant hardware constraints. Any further
* limits which depend upon the configuration can only be checked in
* @mode_fixup.
*
* RETURNS:
*
* drm_mode_status Enum
*/
enum drm_mode_status (*mode_valid)(struct drm_bridge *bridge,
const struct drm_display_info *info,
const struct drm_display_mode *mode);
/**
* @mode_fixup:
*
* This callback is used to validate and adjust a mode. The parameter
* mode is the display mode that should be fed to the next element in
* the display chain, either the final &drm_connector or the next
* &drm_bridge. The parameter adjusted_mode is the input mode the bridge
* requires. It can be modified by this callback and does not need to
* match mode. See also &drm_crtc_state.adjusted_mode for more details.
*
* This is the only hook that allows a bridge to reject a modeset. If
* this function passes all other callbacks must succeed for this
* configuration.
*
* The mode_fixup callback is optional. &drm_bridge_funcs.mode_fixup()
* is not called when &drm_bridge_funcs.atomic_check() is implemented,
* so only one of them should be provided.
*
Annotation
- Immediate include surface: `linux/cleanup.h`, `linux/ctype.h`, `linux/list.h`, `linux/mutex.h`, `drm/drm_atomic.h`, `drm/drm_encoder.h`, `drm/drm_mode_object.h`, `drm/drm_modes.h`.
- Detected declarations: `struct cec_msg`, `struct device_node`, `struct drm_bridge`, `struct drm_bridge_timings`, `struct drm_connector`, `struct drm_display_info`, `struct drm_minor`, `struct drm_panel`, `struct edid`, `struct hdmi_codec_daifmt`.
- Atlas domain: Repository Root And Misc / include.
- Implementation status: source implementation candidate.
- Synchronization appears in or near this file; preserve lock ordering, sleepability, and interrupt-context constraints.
Implementation Notes
- This generated page is the file-by-file coverage layer; curated subsystem chapters should link here when they synthesize a multi-file control flow.
- Core OS pages should be promoted from atlas-only to deep-reviewed when they explain data structures, invariants, locking, lifecycle, and C implementation snippets.
- Driver-family pages are intentionally pattern-oriented unless they are part of the selected PCIe/NVMe representative device path.