STRUCT DRM_DP_MST_TOPOLOGY_MGR(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… NAME πŸ’…

okay bestie, welcome to the Kernel API Manual page for struct drm_dp_mst_topology_mgr β€” the header shortens it to struct drm_d...topology_mgr(9), but we know the full name, periodt πŸ’…. This is the DisplayPort MST manager, and it's lowkey the main character of MST topology setup.


✨ SYNOPSIS ✨

okay so here's the whole struct layout, copy-paste energy only bestie:

       struct drm_dp_mst_topology_mgr {
           struct drm_private_obj base;
           struct drm_device *dev;
           const struct drm_dp_mst_topology_cbs *cbs;
           int max_dpcd_transaction_bytes;
           struct drm_dp_aux *aux;
           int max_payloads;
           int conn_base_id;
           struct drm_dp_sideband_msg_rx up_req_recv;
           struct drm_dp_sideband_msg_rx down_rep_recv;
           struct mutex lock;
           struct mutex probe_lock;
           bool mst_state : 1;
           bool payload_id_table_cleared : 1;
           bool reset_rx_state : 1;
           u8 payload_count;
           u8 next_start_slot;
           struct drm_dp_mst_branch *mst_primary;
           u8 dpcd[DP_RECEIVER_CAP_SIZE];
           u8 sink_count;
           const struct drm_private_state_funcs *funcs;
           struct mutex qlock;
           struct list_head tx_msg_downq;
           wait_queue_head_t tx_waitq;
           struct work_struct work;
           struct work_struct tx_work;
           struct list_head destroy_port_list;
           struct list_head destroy_branch_device_list;
           struct mutex delayed_destroy_lock;
           struct workqueue_struct *delayed_destroy_wq;
           struct work_struct delayed_destroy_work;
           struct list_head up_req_list;
           struct mutex up_req_lock;
           struct work_struct up_req_work;
         #if IS_ENABLED(CONFIG_DRM_DEBUG_DP_MST_TOPOLOGY_REFS);
           struct mutex topology_ref_history_lock;
         #endif;
        };

🫢 Members 🫢

  • base β€” Base private object for atomic, bestie. It's giving foundation energy ✨.
  • dev β€” device pointer for adding i2c devices etc.
  • cbs β€” callbacks for connector addition and destruction.
  • max_dpcd_transaction_bytes β€” maximum number of bytes to read/write in one go. Don't try to do too much at once, okay? 😭
  • aux β€” AUX channel for the DP MST connector this topology manager is controlling.
  • max_payloads β€” maximum number of payloads the GPU can generate.
  • conn_base_id β€” DRM connector ID this mgr is connected to. Only used to build the MST connector path value.
  • up_req_recv β€” Message receiver state for up requests.
  • down_rep_recv β€” Message receiver state for replies to down requests.
  • lock β€” protects mst_state, mst_primary, dpcd, and payload_id_table_cleared.
  • probe_lock β€” Prevents work and up_req_work, the only writers of drm_dp_mst_port.mstb and drm_dp_mst_branch.ports, from racing while they update the topology. no racing besties 🏁
  • mst_state β€” If this manager is enabled for an MST capable port. False if no MST sink/branch devices is connected.
  • payload_id_table_cleared β€” Whether or not we've cleared the payload ID table for mst_primary. Protected by lock.
  • reset_rx_state β€” The down request's reply and up request message receiver state must be reset, after the topology manager got removed. Protected by lock.
  • payload_count β€” The number of currently active payloads in hardware. This value is only intended to be used internally by MST helpers for payload tracking, and is only safe to read/write from the atomic commit (not check) context.
  • next_start_slot β€” The starting timeslot to use for new VC payloads. This value is used internally by MST helpers for payload tracking, and is only safe to read/write from the atomic commit (not check) context.
  • mst_primary β€” Pointer to the primary/first branch device.
  • dpcd β€” Cache of DPCD for primary port.
  • sink_count β€” Sink count from DEVICE_SERVICE_IRQ_VECTOR_ESI0.
  • funcs β€” Atomic helper callbacks.
  • qlock β€” protects tx_msg_downq and drm_dp_sideband_msg_tx.state.
  • tx_msg_downq β€” List of pending down requests.
  • tx_waitq β€” Wait to queue stall for the tx worker.
  • work β€” Probe work.
  • tx_work β€” Sideband transmit worker. This can nest within the main work worker for each transaction work launches.
  • destroy_port_list β€” List of to be destroyed connectors.
  • destroy_branch_device_list β€” List of to be destroyed branch devices.
  • delayed_destroy_lock β€” Protects destroy_port_list and destroy_branch_device_list.
  • delayed_destroy_wq β€” Workqueue used for delayed_destroy_work items. A dedicated WQ makes it possible to drain any requeued work items on it.
  • delayed_destroy_work β€” Work item to destroy MST port and branch devices, needed to avoid locking inversion.
  • up_req_list β€” List of pending up requests from the topology that need to be processed, in chronological order.
  • up_req_lock β€” Protects up_req_list.
  • up_req_work β€” Work item to process up requests received from the topology. Needed to avoid blocking hotplug handling and sideband transmissions.
  • topology_ref_history_lock β€” protects drm_dp_mst_port.topology_ref_history and drm_dp_mst_branch.topology_ref_history. This one is inside the #if IS_ENABLED(CONFIG_DRM_DEBUG_DP_MST_TOPOLOGY_REFS); situation, iykyk 🫢.
bestie, for payload_count and next_start_slot: only safe to read/write from the atomic commit (not check) context. Do not mess with that vibe check πŸ’€.

🌸 Description 🌸

This struct represents the toplevel displayport MST topology manager. There should be one instance of this for every MST capable DP connector on the GPU. fr fr, one per capable connector β€” that's the assignment πŸ’–.


πŸŽ€ SEE ALSO πŸŽ€


mwah πŸ’‹ this page is from ./include/drm/display, dated October 2026, and the footer title is struct drm_d...topology_mgr(9). byeee bestie, go read the header and slay πŸ’–πŸ‘‘

πŸ“¦ where this page comes from