drm_dp_mst_t...try_get_port(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… drm_dp_mst_topology_try_get_port(9) ✨

okay bestie, welcome to the Kernel API Manual πŸŽ€ this one's a little refcount baddie and she's honestly serving main character energy β€” let's get into it πŸ’–


🌸 NAME 🌸

drm_dp_mst_topology_try_get_port β€” bumps up the topology refcount of a port, but only if it's not already zero ✨ like, she'll only hold your hand if you're still on the guest list, no cap πŸ’…


πŸ¦‹ SYNOPSIS πŸ¦‹

int drm_dp_mst_topology_try_get_port (struct drm_dp_mst_port *port );

πŸ“ ARGUMENTS πŸ“

  • port β€” the struct drm_dp_mst_port whose topology refcount we're trying to increment 🫢 that's the whole assignment, icon behavior

πŸ‘‘ DESCRIPTION πŸ‘‘

so here's the vibe πŸ’« this function attempts to grab a topology reference to port, and it'll only succeed if that port hasn't already been removed from the topology β€” like, if drm_dp_mst_port.topology_kref has already hit <hotpink>0</hotpink>, she's gone, the party's over, no reference for you πŸ™ˆ

and listen, this part matters: holding a topology reference implies that a malloc reference will be held to port for as long as the user holds that topology reference πŸ”₯ iykyk, they're linked like that.

⚠️ caveat time, bestie β€” care should be taken to ensure that the user has at least one malloc reference to port. do not skip this. fr fr.

and if you already have a topology reference to port? then you should use drm_dp_mst_topology_get_port instead πŸ’œ different tool, different job, don't mix them up.

See also: drm_dp_mst_topology_get_port drm_dp_mst_topology_put_port 🌈


⭐ RETURN ⭐

  • 1 β€” a topology reference was grabbed successfully, slay πŸŽ‰
  • 0 β€” port is no longer in the topology, so no reference was grabbed 😭 she's literally not in the group chat anymore

πŸ’€ SEE ALSO πŸ’€

okay this list is long long, but every single one of them is part of the lore 🧚 so here we go, no skipping:

Kernel file ./drivers/gpu/drm/display/drm_dp_mst_topology.c πŸ’–

dp mst helper(9), Branch device and port refcounting(9), drm_dp_mst_get_mstb_malloc(9), drm_dp_mst_put_mstb_malloc(9), drm_dp_mst_get_port_malloc(9), drm_dp_mst_put_port_malloc(9), drm_dp_mst_topology_try_get_mstb(9), drm_dp_mst_topology_get_mstb(9), drm_dp_mst_topology_put_mstb(9), drm_dp_mst_topology_get_port(9), drm_dp_mst_topology_put_port(9), drm_dp_mst_dpcd_read(9), drm_dp_mst_dpcd_write(9), drm_dp_mst_connector_late_register(9), drm_dp_mst_connector_early_unregister(9), drm_dp_add_payload_part1(9), drm_dp_remove_payload_part1(9), drm_dp_remove_payload_part2(9), drm_dp_add_payload_part2(9), drm_dp_get_vc_payload_bw(9), drm_dp_read_mst_cap(9), drm_dp_mst_topology_mgr_set_mst(9), drm_dp_mst_topology_queue_probe(9), drm_dp_mst_topology_mgr_suspend(9), drm_dp_mst_topology_mgr_resume(9), drm_dp_mst_hpd_irq_handle_event(9), drm_dp_mst_hpd_irq_send_new_request(9), drm_dp_mst_detect_port(9), drm_dp_mst_edid_read(9), drm_dp_mst_get_edid(9), drm_dp_atomic_find_time_slots(9), drm_dp_atomic_release_time_slots(9), drm_dp_mst_atomic_setup_commit(9), drm_dp_mst_atomic_wait_for_dependencies(9), drm_dp_mst_root_conn_atomic_check(9), drm_dp_mst_update_slots(9), drm_dp_check_act_status(9), drm_dp_calc_pbn_mode(9), drm_dp_mst_dump_topology(9), drm_dp_mst_port_downstream_of_parent(9), drm_dp_mst_add_affected_dsc_crtcs(9), drm_dp_mst_atomic_enable_dsc(9), drm_dp_mst_atomic_check_mgr(9), drm_dp_mst_atomic_check(9), drm_atomic_get_mst_topology_state(9), drm_atomic_get_old_mst_topology_state(9), drm_atomic_get_new_mst_topology_state(9), drm_dp_mst_topology_mgr_init(9), drm_dp_mst_topology_mgr_destroy(9), drm_dp_mst_register_i2c_bus(9), drm_dp_mst_unregister_i2c_bus(9), drm_dp_mst_is_virtual_dpcd(9), drm_dp_mst_aux_for_parent(9), drm_dp_mst_dsc_aux_for_port(9) 🌟


aaaand that's the whole page, bestie 🫢 this one lives out of ./drivers/gpu/drm/display, dated October 2026, and it's filed under Kernel API Manual β€” mwah, go grab those references responsibly πŸ’‹βœ¨

πŸ“¦ where this page comes from