STRUCT DRM_BRIDGE(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’– 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 from drm_private_object 🧚
  • dev β€” DRM device this bridge belongs to
  • encoder β€” encoder to which this bridge is connected
  • chain_node β€” used to form a bridge chain πŸ”—
  • of_node β€” device node pointer to the bridge
  • list β€” to keep track of all added bridges
  • timings β€” the timing specification for the bridge, if any (may be NULL) ⏳
  • funcs β€” control functions
  • container β€” Pointer to the private driver struct embedding this struct drm_bridge.
  • refcount β€” reference count of users referencing this bridge.
  • unplugged β€” Flag to tell if the bridge has been unplugged. See drm_bridge_enter and drm_bridge_unplug.
  • driver_private β€” pointer to the bridge driver's internal context
  • ops β€” bitmask of operations supported by the bridge
  • type β€” 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 bridge pre_enable function is called before its pre_enable, and conversely for post_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 if DRM_BRIDGE_OP_HDMI is set.
  • product β€” Name of the product to be used for the SPD InfoFrame generation. This is required if DRM_BRIDGE_OP_HDMI is set.
  • supported_formats β€” Bitmask of drm_output_color_format listing supported output formats. This is only relevant if DRM_BRIDGE_OP_HDMI is set.
  • max_bpc β€” Maximum bits per char the HDMI bridge supports. Allowed values are 8, 10 and 12. This is only relevant if DRM_BRIDGE_OP_HDMI is 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 of DRM_BRIDGE_OP_HDMI_AUDIO or DRM_BRIDGE_OP_DP_AUDIO is set.
  • hdmi_audio_max_i2s_playback_channels β€” maximum number of playback I2S channels for the DRM_BRIDGE_OP_HDMI_AUDIO or DRM_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 setting DRM_BRIDGE_OP_HDMI_AUDIO or DRM_BRIDGE_OP_DP_AUDIO.
  • hdmi_audio_spdif_playback β€” set if this bridge has S/PDIF playback port for DRM_BRIDGE_OP_HDMI_AUDIO or DRM_BRIDGE_OP_DP_AUDIO.
  • hdmi_audio_dai_port β€” sound DAI port for either of DRM_BRIDGE_OP_HDMI_AUDIO and DRM_BRIDGE_OP_DP_AUDIO, -1 if it is not used.
  • hdmi_cec_adapter_name β€” the name of the adapter to register
  • hdmi_cec_available_las β€” number of logical addresses, CEC_MAX_LOG_ADDRS if unset
  • hpd_mutex β€” Protects the hpd_cb and hpd_data fields.
  • hpd_state_mutex β€” Protects the HPD en/disablement state for the bridge.
  • hpd_cb β€” Hot plug detection callback, registered with drm_bridge_hpd_enable.
  • hpd_data β€” Private data passed to the Hot plug detection callback hpd_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 .destroy callback by driver code.

πŸ’œ SEE ALSO πŸ’œ

Kernel file ./include/drm/drm_bridge.h β€” and here are all the bestie references, zero skipped:


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