STRUCT DRM_BRIDGE(9)
π NAME π
Okay bestie, welcome to the struct drm_bridge(9) page from the Kernel API Manual. This is the central DRM bridge control structure, and it is literally the main-character struct of the bridge world ππ
struct drm_bridge β central DRM bridge control structure π«Ά
π¦ SYNOPSIS π¦
Okay so here is the whole struct, copied exactly, no cap:
struct drm_bridge {
struct drm_private_obj base;
struct drm_device *dev;
struct drm_encoder *encoder;
struct list_head chain_node;
struct device_node *of_node;
struct list_head list;
const struct drm_bridge_timings *timings;
const struct drm_bridge_funcs *funcs;
void *container;
struct kref refcount;
bool unplugged;
void *driver_private;
enum drm_bridge_ops ops;
int type;
bool interlace_allowed;
bool ycbcr_420_allowed;
bool pre_enable_prev_first;
bool support_hdcp;
struct i2c_adapter *ddc;
const char *vendor;
const char *product;
unsigned int supported_formats;
unsigned int max_bpc;
struct device *hdmi_cec_dev;
struct device *hdmi_audio_dev;
int hdmi_audio_max_i2s_playback_channels;
u64 hdmi_audio_i2s_formats;
unsigned int hdmi_audio_spdif_playback : 1;
int hdmi_audio_dai_port;
const char *hdmi_cec_adapter_name;
u8 hdmi_cec_available_las;
struct mutex hpd_mutex;
struct mutex hpd_state_mutex;
void (*hpd_cb)(void *data, enum drm_connector_status status);
void *hpd_data;
struct drm_bridge *next_bridge;
};
πΈ Members πΈ
Every single field gets its moment, because we do not skip, periodt π β¨
baseβ inherit fromdrm_private_objectπ§devβ DRM device this bridge belongs toencoderβ encoder to which this bridge is connectedchain_nodeβ used to form a bridge chain πof_nodeβ device node pointer to the bridgelistβ to keep track of all added bridgestimingsβ the timing specification for the bridge, if any (may beNULL) β³funcsβ control functionscontainerβ Pointer to the private driver struct embedding thisstruct drm_bridge.refcountβ reference count of users referencing this bridge.unpluggedβ Flag to tell if the bridge has been unplugged. Seedrm_bridge_enteranddrm_bridge_unplug.driver_privateβ pointer to the bridge driver's internal contextopsβ bitmask of operations supported by the bridgetypeβ Type of the connection at the bridge output (DRM_MODE_CONNECTOR_*). For bridges at the end of this chain this identifies the type of connected display.interlace_allowedβ Indicate that the bridge can handle interlaced modes.ycbcr_420_allowedβ Indicate that the bridge can handle YCbCr 420 output.pre_enable_prev_firstβ The bridge requires that the prev bridgepre_enablefunction is called before itspre_enable, and conversely forpost_disable. This is most frequently a requirement for DSI devices which need the host to be initialised before the peripheral.support_hdcpβ Indicate that the bridge supports HDCP.ddcβ Associated I2C adapter for DDC access, if any.vendorβ Vendor of the product to be used for the SPD InfoFrame generation. This is required ifDRM_BRIDGE_OP_HDMIis set.productβ Name of the product to be used for the SPD InfoFrame generation. This is required ifDRM_BRIDGE_OP_HDMIis set.supported_formatsβ Bitmask ofdrm_output_color_formatlisting supported output formats. This is only relevant ifDRM_BRIDGE_OP_HDMIis set.max_bpcβ Maximum bits per char the HDMI bridge supports. Allowed values are8,10and12. This is only relevant ifDRM_BRIDGE_OP_HDMIis set.hdmi_cec_devβ device to be used as a containing device for CEC functions.hdmi_audio_devβ device to be used as a parent for the HDMI Codec if either ofDRM_BRIDGE_OP_HDMI_AUDIOorDRM_BRIDGE_OP_DP_AUDIOis set.hdmi_audio_max_i2s_playback_channelsβ maximum number of playback I2S channels for theDRM_BRIDGE_OP_HDMI_AUDIOorDRM_BRIDGE_OP_DP_AUDIO.hdmi_audio_i2s_formatsβ supported I2S formats, optional. The default is to allow all formats supported by the corresponding I2S bus driver. This is only used for bridges settingDRM_BRIDGE_OP_HDMI_AUDIOorDRM_BRIDGE_OP_DP_AUDIO.hdmi_audio_spdif_playbackβ set if this bridge has S/PDIF playback port forDRM_BRIDGE_OP_HDMI_AUDIOorDRM_BRIDGE_OP_DP_AUDIO.hdmi_audio_dai_portβ sound DAI port for either ofDRM_BRIDGE_OP_HDMI_AUDIOandDRM_BRIDGE_OP_DP_AUDIO,-1if it is not used.hdmi_cec_adapter_nameβ the name of the adapter to registerhdmi_cec_available_lasβ number of logical addresses,CEC_MAX_LOG_ADDRSif unsethpd_mutexβ Protects thehpd_cbandhpd_datafields.hpd_state_mutexβ Protects the HPD en/disablement state for the bridge.hpd_cbβ Hot plug detection callback, registered withdrm_bridge_hpd_enable.hpd_dataβ Private data passed to the Hot plug detection callbackhpd_cb.next_bridgeβ Pointer to the following bridge, automatically put when this bridge is freed (i.e. at destroy time). This is for drivers needing to store a pointer to the next bridge in the chain, and ensures any code still holding a reference to this bridge after its removal cannot use-after-free the next bridge. Any other bridge pointers stored by the driver must be put in the.destroycallback by driver code.
π SEE ALSO π
Kernel file ./include/drm/drm_bridge.h β and here are all the bestie references, zero skipped:
enum drm_bridge_attach_flags(9)struct drm_bridge_funcs(9)struct drm_bridge_timings(9)enum drm_bridge_ops(9)devm_drm_bridge_alloc(9)drm_bridge_get_current_state(9)drm_bridge_get_next_bridge(9)drm_bridge_get_prev_bridge(9)drm_bridge_chain_get_first_bridge(9)drm_bridge_chain_get_last_bridge(9)drm_for_each_bridge_in_chain(9)drm_for_each_bridge_in_chain_from(9)
okay bestie, that's the whole struct drm_bridge page β source/version ./include/drm, dated October 2026. slay and goodbye π
β¨
π¦ where this page comes from
- nixpkgs unstable: linux-manual 7.3.1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms