Lines Matching refs:mstb
81 struct drm_dp_mst_branch *mstb);
85 struct drm_dp_mst_branch *mstb);
88 struct drm_dp_mst_branch *mstb,
1291 static int drm_dp_mst_wait_tx_reply(struct drm_dp_mst_branch *mstb, in drm_dp_mst_wait_tx_reply() argument
1294 struct drm_dp_mst_topology_mgr *mgr = mstb->mgr; in drm_dp_mst_wait_tx_reply()
1358 struct drm_dp_mst_branch *mstb; in drm_dp_add_mst_branch_device() local
1360 mstb = kzalloc(sizeof(*mstb), GFP_KERNEL); in drm_dp_add_mst_branch_device()
1361 if (!mstb) in drm_dp_add_mst_branch_device()
1364 mstb->lct = lct; in drm_dp_add_mst_branch_device()
1366 memcpy(mstb->rad, rad, lct / 2); in drm_dp_add_mst_branch_device()
1367 INIT_LIST_HEAD(&mstb->ports); in drm_dp_add_mst_branch_device()
1368 kref_init(&mstb->topology_kref); in drm_dp_add_mst_branch_device()
1369 kref_init(&mstb->malloc_kref); in drm_dp_add_mst_branch_device()
1370 return mstb; in drm_dp_add_mst_branch_device()
1375 struct drm_dp_mst_branch *mstb = in drm_dp_free_mst_branch_device() local
1378 if (mstb->port_parent) in drm_dp_free_mst_branch_device()
1379 drm_dp_mst_put_port_malloc(mstb->port_parent); in drm_dp_free_mst_branch_device()
1381 kfree(mstb); in drm_dp_free_mst_branch_device()
1484 drm_dp_mst_get_mstb_malloc(struct drm_dp_mst_branch *mstb) in drm_dp_mst_get_mstb_malloc() argument
1486 kref_get(&mstb->malloc_kref); in drm_dp_mst_get_mstb_malloc()
1487 DRM_DEBUG("mstb %p (%d)\n", mstb, kref_read(&mstb->malloc_kref)); in drm_dp_mst_get_mstb_malloc()
1502 drm_dp_mst_put_mstb_malloc(struct drm_dp_mst_branch *mstb) in drm_dp_mst_put_mstb_malloc() argument
1504 DRM_DEBUG("mstb %p (%d)\n", mstb, kref_read(&mstb->malloc_kref) - 1); in drm_dp_mst_put_mstb_malloc()
1505 kref_put(&mstb->malloc_kref, drm_dp_free_mst_branch_device); in drm_dp_mst_put_mstb_malloc()
1679 drm_dp_mst_dump_mstb_topology_history(struct drm_dp_mst_branch *mstb) in drm_dp_mst_dump_mstb_topology_history() argument
1681 __dump_topology_ref_history(&mstb->topology_ref_history, mstb, in drm_dp_mst_dump_mstb_topology_history()
1693 save_mstb_topology_ref(struct drm_dp_mst_branch *mstb, in save_mstb_topology_ref() argument
1696 __topology_ref_save(mstb->mgr, &mstb->topology_ref_history, type); in save_mstb_topology_ref()
1723 drm_dp_mst_dump_mstb_topology_history(struct drm_dp_mst_branch *mstb) {} in drm_dp_mst_dump_mstb_topology_history() argument
1726 #define save_mstb_topology_ref(mstb, type) argument
1732 struct drm_dp_mst_branch *mstb = in drm_dp_destroy_mst_branch_device() local
1734 struct drm_dp_mst_topology_mgr *mgr = mstb->mgr; in drm_dp_destroy_mst_branch_device()
1736 drm_dp_mst_dump_mstb_topology_history(mstb); in drm_dp_destroy_mst_branch_device()
1738 INIT_LIST_HEAD(&mstb->destroy_next); in drm_dp_destroy_mst_branch_device()
1745 list_add(&mstb->destroy_next, &mgr->destroy_branch_device_list); in drm_dp_destroy_mst_branch_device()
1773 drm_dp_mst_topology_try_get_mstb(struct drm_dp_mst_branch *mstb) in drm_dp_mst_topology_try_get_mstb() argument
1777 topology_ref_history_lock(mstb->mgr); in drm_dp_mst_topology_try_get_mstb()
1778 ret = kref_get_unless_zero(&mstb->topology_kref); in drm_dp_mst_topology_try_get_mstb()
1781 mstb, kref_read(&mstb->topology_kref)); in drm_dp_mst_topology_try_get_mstb()
1782 save_mstb_topology_ref(mstb, DRM_DP_MST_TOPOLOGY_REF_GET); in drm_dp_mst_topology_try_get_mstb()
1785 topology_ref_history_unlock(mstb->mgr); in drm_dp_mst_topology_try_get_mstb()
1804 static void drm_dp_mst_topology_get_mstb(struct drm_dp_mst_branch *mstb) in drm_dp_mst_topology_get_mstb() argument
1806 topology_ref_history_lock(mstb->mgr); in drm_dp_mst_topology_get_mstb()
1808 save_mstb_topology_ref(mstb, DRM_DP_MST_TOPOLOGY_REF_GET); in drm_dp_mst_topology_get_mstb()
1809 WARN_ON(kref_read(&mstb->topology_kref) == 0); in drm_dp_mst_topology_get_mstb()
1810 kref_get(&mstb->topology_kref); in drm_dp_mst_topology_get_mstb()
1811 DRM_DEBUG("mstb %p (%d)\n", mstb, kref_read(&mstb->topology_kref)); in drm_dp_mst_topology_get_mstb()
1813 topology_ref_history_unlock(mstb->mgr); in drm_dp_mst_topology_get_mstb()
1829 drm_dp_mst_topology_put_mstb(struct drm_dp_mst_branch *mstb) in drm_dp_mst_topology_put_mstb() argument
1831 topology_ref_history_lock(mstb->mgr); in drm_dp_mst_topology_put_mstb()
1834 mstb, kref_read(&mstb->topology_kref) - 1); in drm_dp_mst_topology_put_mstb()
1835 save_mstb_topology_ref(mstb, DRM_DP_MST_TOPOLOGY_REF_PUT); in drm_dp_mst_topology_put_mstb()
1837 topology_ref_history_unlock(mstb->mgr); in drm_dp_mst_topology_put_mstb()
1838 kref_put(&mstb->topology_kref, drm_dp_destroy_mst_branch_device); in drm_dp_mst_topology_put_mstb()
1955 drm_dp_mst_topology_get_mstb_validated_locked(struct drm_dp_mst_branch *mstb, in drm_dp_mst_topology_get_mstb_validated_locked() argument
1961 if (to_find == mstb) in drm_dp_mst_topology_get_mstb_validated_locked()
1962 return mstb; in drm_dp_mst_topology_get_mstb_validated_locked()
1964 list_for_each_entry(port, &mstb->ports, next) { in drm_dp_mst_topology_get_mstb_validated_locked()
1965 if (port->mstb) { in drm_dp_mst_topology_get_mstb_validated_locked()
1967 port->mstb, to_find); in drm_dp_mst_topology_get_mstb_validated_locked()
1977 struct drm_dp_mst_branch *mstb) in drm_dp_mst_topology_get_mstb_validated() argument
1984 mgr->mst_primary, mstb); in drm_dp_mst_topology_get_mstb_validated()
1994 drm_dp_mst_topology_get_port_validated_locked(struct drm_dp_mst_branch *mstb, in drm_dp_mst_topology_get_port_validated_locked() argument
1999 list_for_each_entry(port, &mstb->ports, next) { in drm_dp_mst_topology_get_port_validated_locked()
2003 if (port->mstb) { in drm_dp_mst_topology_get_port_validated_locked()
2005 port->mstb, to_find); in drm_dp_mst_topology_get_port_validated_locked()
2031 static struct drm_dp_mst_port *drm_dp_get_port(struct drm_dp_mst_branch *mstb, u8 port_num) in drm_dp_get_port() argument
2036 list_for_each_entry(port, &mstb->ports, next) { in drm_dp_get_port()
2089 struct drm_dp_mst_branch *mstb; in drm_dp_port_set_pdt() local
2114 drm_dp_mst_topology_put_mstb(port->mstb); in drm_dp_port_set_pdt()
2115 port->mstb = NULL; in drm_dp_port_set_pdt()
2129 mstb = drm_dp_add_mst_branch_device(lct, rad); in drm_dp_port_set_pdt()
2130 if (!mstb) { in drm_dp_port_set_pdt()
2138 port->mstb = mstb; in drm_dp_port_set_pdt()
2139 mstb->mgr = port->mgr; in drm_dp_port_set_pdt()
2140 mstb->port_parent = port; in drm_dp_port_set_pdt()
2206 static int drm_dp_check_mstb_guid(struct drm_dp_mst_branch *mstb, u8 *guid) in drm_dp_check_mstb_guid() argument
2210 memcpy(mstb->guid, guid, 16); in drm_dp_check_mstb_guid()
2212 if (!drm_dp_validate_guid(mstb->mgr, mstb->guid)) { in drm_dp_check_mstb_guid()
2213 if (mstb->port_parent) { in drm_dp_check_mstb_guid()
2214 ret = drm_dp_send_dpcd_write(mstb->mgr, in drm_dp_check_mstb_guid()
2215 mstb->port_parent, in drm_dp_check_mstb_guid()
2216 DP_GUID, 16, mstb->guid); in drm_dp_check_mstb_guid()
2218 ret = drm_dp_dpcd_write(mstb->mgr->aux, in drm_dp_check_mstb_guid()
2219 DP_GUID, mstb->guid, 16); in drm_dp_check_mstb_guid()
2229 static void build_mst_prop_path(const struct drm_dp_mst_branch *mstb, in build_mst_prop_path() argument
2237 snprintf(proppath, proppath_size, "mst:%d", mstb->mgr->conn_base_id); in build_mst_prop_path()
2238 for (i = 0; i < (mstb->lct - 1); i++) { in build_mst_prop_path()
2240 int port_num = (mstb->rad[i / 2] >> shift) & 0xf; in build_mst_prop_path()
2290 drm_dp_mst_port_add_connector(struct drm_dp_mst_branch *mstb, in drm_dp_mst_port_add_connector() argument
2297 build_mst_prop_path(mstb, port->port_num, proppath, sizeof(proppath)); in drm_dp_mst_port_add_connector()
2336 struct drm_dp_mst_branch *mstb, u8 port_number) in drm_dp_mst_add_port() argument
2345 port->parent = mstb; in drm_dp_mst_add_port()
2359 drm_dp_mst_get_mstb_malloc(mstb); in drm_dp_mst_add_port()
2365 drm_dp_mst_handle_link_address_port(struct drm_dp_mst_branch *mstb, in drm_dp_mst_handle_link_address_port() argument
2369 struct drm_dp_mst_topology_mgr *mgr = mstb->mgr; in drm_dp_mst_handle_link_address_port()
2376 port = drm_dp_get_port(mstb, port_msg->port_number); in drm_dp_mst_handle_link_address_port()
2378 port = drm_dp_mst_add_port(dev, mgr, mstb, in drm_dp_mst_handle_link_address_port()
2390 port = drm_dp_mst_add_port(dev, mgr, mstb, in drm_dp_mst_handle_link_address_port()
2430 list_add(&port->next, &mstb->ports); in drm_dp_mst_handle_link_address_port()
2431 mstb->num_ports++; in drm_dp_mst_handle_link_address_port()
2441 ret = drm_dp_send_enum_path_resources(mgr, mstb, in drm_dp_mst_handle_link_address_port()
2471 drm_dp_mst_port_add_connector(mstb, port); in drm_dp_mst_handle_link_address_port()
2473 if (send_link_addr && port->mstb) { in drm_dp_mst_handle_link_address_port()
2474 ret = drm_dp_send_link_address(mgr, port->mstb); in drm_dp_mst_handle_link_address_port()
2495 drm_dp_mst_handle_conn_stat(struct drm_dp_mst_branch *mstb, in drm_dp_mst_handle_conn_stat() argument
2498 struct drm_dp_mst_topology_mgr *mgr = mstb->mgr; in drm_dp_mst_handle_conn_stat()
2505 port = drm_dp_get_port(mstb, conn_stat->port_number); in drm_dp_mst_handle_conn_stat()
2517 mstb->link_address_sent = false; in drm_dp_mst_handle_conn_stat()
2527 mstb->link_address_sent = false; in drm_dp_mst_handle_conn_stat()
2539 drm_dp_send_enum_path_resources(mgr, mstb, port); in drm_dp_mst_handle_conn_stat()
2580 drm_dp_mst_port_add_connector(mstb, port); in drm_dp_mst_handle_conn_stat()
2585 queue_work(system_long_wq, &mstb->mgr->work); in drm_dp_mst_handle_conn_stat()
2591 struct drm_dp_mst_branch *mstb; in drm_dp_get_mst_branch_device() local
2597 mstb = mgr->mst_primary; in drm_dp_get_mst_branch_device()
2599 if (!mstb) in drm_dp_get_mst_branch_device()
2606 list_for_each_entry(port, &mstb->ports, next) { in drm_dp_get_mst_branch_device()
2608 mstb = port->mstb; in drm_dp_get_mst_branch_device()
2609 if (!mstb) { in drm_dp_get_mst_branch_device()
2618 ret = drm_dp_mst_topology_try_get_mstb(mstb); in drm_dp_get_mst_branch_device()
2620 mstb = NULL; in drm_dp_get_mst_branch_device()
2623 return mstb; in drm_dp_get_mst_branch_device()
2627 struct drm_dp_mst_branch *mstb, in get_mst_branch_device_by_guid_helper() argument
2633 if (memcmp(mstb->guid, guid, 16) == 0) in get_mst_branch_device_by_guid_helper()
2634 return mstb; in get_mst_branch_device_by_guid_helper()
2637 list_for_each_entry(port, &mstb->ports, next) { in get_mst_branch_device_by_guid_helper()
2638 if (!port->mstb) in get_mst_branch_device_by_guid_helper()
2641 found_mstb = get_mst_branch_device_by_guid_helper(port->mstb, guid); in get_mst_branch_device_by_guid_helper()
2654 struct drm_dp_mst_branch *mstb; in drm_dp_get_mst_branch_device_by_guid() local
2660 mstb = get_mst_branch_device_by_guid_helper(mgr->mst_primary, guid); in drm_dp_get_mst_branch_device_by_guid()
2661 if (mstb) { in drm_dp_get_mst_branch_device_by_guid()
2662 ret = drm_dp_mst_topology_try_get_mstb(mstb); in drm_dp_get_mst_branch_device_by_guid()
2664 mstb = NULL; in drm_dp_get_mst_branch_device_by_guid()
2668 return mstb; in drm_dp_get_mst_branch_device_by_guid()
2672 struct drm_dp_mst_branch *mstb) in drm_dp_check_and_send_link_address() argument
2678 if (!mstb->link_address_sent) { in drm_dp_check_and_send_link_address()
2679 ret = drm_dp_send_link_address(mgr, mstb); in drm_dp_check_and_send_link_address()
2686 list_for_each_entry(port, &mstb->ports, next) { in drm_dp_check_and_send_link_address()
2692 if (port->mstb) in drm_dp_check_and_send_link_address()
2694 mgr, port->mstb); in drm_dp_check_and_send_link_address()
2715 struct drm_dp_mst_branch *mstb; in drm_dp_mst_link_probe_work() local
2725 mstb = mgr->mst_primary; in drm_dp_mst_link_probe_work()
2726 if (mstb) { in drm_dp_mst_link_probe_work()
2727 ret = drm_dp_mst_topology_try_get_mstb(mstb); in drm_dp_mst_link_probe_work()
2729 mstb = NULL; in drm_dp_mst_link_probe_work()
2732 if (!mstb) { in drm_dp_mst_link_probe_work()
2747 drm_dp_send_clear_payload_id_table(mgr, mstb); in drm_dp_mst_link_probe_work()
2750 ret = drm_dp_check_and_send_link_address(mgr, mstb); in drm_dp_mst_link_probe_work()
2751 drm_dp_mst_topology_put_mstb(mstb); in drm_dp_mst_link_probe_work()
2821 struct drm_dp_mst_branch *mstb = txmsg->dst; in set_hdr_from_dst_qlock() local
2831 hdr->lct = mstb->lct; in set_hdr_from_dst_qlock()
2832 hdr->lcr = mstb->lct - 1; in set_hdr_from_dst_qlock()
2833 if (mstb->lct > 1) in set_hdr_from_dst_qlock()
2834 memcpy(hdr->rad, mstb->rad, mstb->lct / 2); in set_hdr_from_dst_qlock()
2962 struct drm_dp_mst_branch *mstb) in drm_dp_send_link_address() argument
2974 txmsg->dst = mstb; in drm_dp_send_link_address()
2977 mstb->link_address_sent = true; in drm_dp_send_link_address()
2981 ret = drm_dp_mst_wait_tx_reply(mstb, txmsg); in drm_dp_send_link_address()
2996 ret = drm_dp_check_mstb_guid(mstb, reply->guid); in drm_dp_send_link_address()
3000 drm_dp_mst_rad_to_str(mstb->rad, mstb->lct, buf, sizeof(buf)); in drm_dp_send_link_address()
3008 ret = drm_dp_mst_handle_link_address_port(mstb, mgr->dev, in drm_dp_send_link_address()
3022 list_for_each_entry_safe(port, tmp, &mstb->ports, next) { in drm_dp_send_link_address()
3036 mstb->link_address_sent = false; in drm_dp_send_link_address()
3043 struct drm_dp_mst_branch *mstb) in drm_dp_send_clear_payload_id_table() argument
3052 txmsg->dst = mstb; in drm_dp_send_clear_payload_id_table()
3057 ret = drm_dp_mst_wait_tx_reply(mstb, txmsg); in drm_dp_send_clear_payload_id_table()
3066 struct drm_dp_mst_branch *mstb, in drm_dp_send_enum_path_resources() argument
3077 txmsg->dst = mstb; in drm_dp_send_enum_path_resources()
3082 ret = drm_dp_mst_wait_tx_reply(mstb, txmsg); in drm_dp_send_enum_path_resources()
3115 …atic struct drm_dp_mst_port *drm_dp_get_last_connected_port_to_mstb(struct drm_dp_mst_branch *mstb) in drm_dp_get_last_connected_port_to_mstb() argument
3117 if (!mstb->port_parent) in drm_dp_get_last_connected_port_to_mstb()
3120 if (mstb->port_parent->mstb != mstb) in drm_dp_get_last_connected_port_to_mstb()
3121 return mstb->port_parent; in drm_dp_get_last_connected_port_to_mstb()
3123 return drm_dp_get_last_connected_port_to_mstb(mstb->port_parent->parent); in drm_dp_get_last_connected_port_to_mstb()
3136 struct drm_dp_mst_branch *mstb, in drm_dp_get_last_connected_port_and_mstb() argument
3147 found_port = drm_dp_get_last_connected_port_to_mstb(mstb); in drm_dp_get_last_connected_port_and_mstb()
3156 mstb = found_port->parent; in drm_dp_get_last_connected_port_and_mstb()
3170 struct drm_dp_mst_branch *mstb; in drm_dp_payload_send_msg() local
3176 mstb = drm_dp_mst_topology_get_mstb_validated(mgr, port->parent); in drm_dp_payload_send_msg()
3177 if (!mstb) { in drm_dp_payload_send_msg()
3178 mstb = drm_dp_get_last_connected_port_and_mstb(mgr, in drm_dp_payload_send_msg()
3182 if (!mstb) in drm_dp_payload_send_msg()
3195 txmsg->dst = mstb; in drm_dp_payload_send_msg()
3210 ret = drm_dp_mst_wait_tx_reply(mstb, txmsg); in drm_dp_payload_send_msg()
3219 drm_dp_mst_topology_put_mstb(mstb); in drm_dp_payload_send_msg()
3517 struct drm_dp_mst_branch *mstb; in drm_dp_send_dpcd_read() local
3519 mstb = drm_dp_mst_topology_get_mstb_validated(mgr, port->parent); in drm_dp_send_dpcd_read()
3520 if (!mstb) in drm_dp_send_dpcd_read()
3534 ret = drm_dp_mst_wait_tx_reply(mstb, txmsg); in drm_dp_send_dpcd_read()
3541 mstb, port->port_num, offset, size); in drm_dp_send_dpcd_read()
3558 drm_dp_mst_topology_put_mstb(mstb); in drm_dp_send_dpcd_read()
3569 struct drm_dp_mst_branch *mstb; in drm_dp_send_dpcd_write() local
3571 mstb = drm_dp_mst_topology_get_mstb_validated(mgr, port->parent); in drm_dp_send_dpcd_write()
3572 if (!mstb) in drm_dp_send_dpcd_write()
3582 txmsg->dst = mstb; in drm_dp_send_dpcd_write()
3586 ret = drm_dp_mst_wait_tx_reply(mstb, txmsg); in drm_dp_send_dpcd_write()
3596 drm_dp_mst_topology_put_mstb(mstb); in drm_dp_send_dpcd_write()
3611 struct drm_dp_mst_branch *mstb, in drm_dp_send_up_ack_reply() argument
3620 txmsg->dst = mstb; in drm_dp_send_up_ack_reply()
3674 struct drm_dp_mst_branch *mstb = NULL; in drm_dp_mst_topology_mgr_set_mst() local
3703 mstb = drm_dp_add_mst_branch_device(1, NULL); in drm_dp_mst_topology_mgr_set_mst()
3704 if (mstb == NULL) { in drm_dp_mst_topology_mgr_set_mst()
3708 mstb->mgr = mgr; in drm_dp_mst_topology_mgr_set_mst()
3711 mgr->mst_primary = mstb; in drm_dp_mst_topology_mgr_set_mst()
3730 mstb = mgr->mst_primary; in drm_dp_mst_topology_mgr_set_mst()
3748 if (mstb) in drm_dp_mst_topology_mgr_set_mst()
3749 drm_dp_mst_topology_put_mstb(mstb); in drm_dp_mst_topology_mgr_set_mst()
3756 drm_dp_mst_topology_mgr_invalidate_mstb(struct drm_dp_mst_branch *mstb) in drm_dp_mst_topology_mgr_invalidate_mstb() argument
3761 mstb->link_address_sent = false; in drm_dp_mst_topology_mgr_invalidate_mstb()
3763 list_for_each_entry(port, &mstb->ports, next) in drm_dp_mst_topology_mgr_invalidate_mstb()
3764 if (port->mstb) in drm_dp_mst_topology_mgr_invalidate_mstb()
3765 drm_dp_mst_topology_mgr_invalidate_mstb(port->mstb); in drm_dp_mst_topology_mgr_invalidate_mstb()
3874 struct drm_dp_mst_branch **mstb) in drm_dp_get_one_sb_msg() argument
3888 *mstb = NULL; in drm_dp_get_one_sb_msg()
3907 *mstb = drm_dp_get_mst_branch_device(mgr, hdr.lct, hdr.rad); in drm_dp_get_one_sb_msg()
3908 if (!*mstb) { in drm_dp_get_one_sb_msg()
3955 struct drm_dp_mst_branch *mstb = NULL; in drm_dp_mst_handle_down_rep() local
3958 if (!drm_dp_get_one_sb_msg(mgr, false, &mstb)) in drm_dp_mst_handle_down_rep()
3972 if (!txmsg || txmsg->dst != mstb) { in drm_dp_mst_handle_down_rep()
3977 mstb, hdr->seqno, hdr->lct, hdr->rad[0], in drm_dp_mst_handle_down_rep()
3994 drm_dp_mst_topology_put_mstb(mstb); in drm_dp_mst_handle_down_rep()
4008 if (mstb) in drm_dp_mst_handle_down_rep()
4009 drm_dp_mst_topology_put_mstb(mstb); in drm_dp_mst_handle_down_rep()
4018 struct drm_dp_mst_branch *mstb = NULL; in drm_dp_mst_process_up_req() local
4032 mstb = drm_dp_get_mst_branch_device_by_guid(mgr, guid); in drm_dp_mst_process_up_req()
4034 mstb = drm_dp_get_mst_branch_device(mgr, hdr->lct, hdr->rad); in drm_dp_mst_process_up_req()
4037 if (!mstb) { in drm_dp_mst_process_up_req()
4045 drm_dp_mst_handle_conn_stat(mstb, &msg->u.conn_stat); in drm_dp_mst_process_up_req()
4049 drm_dp_mst_topology_put_mstb(mstb); in drm_dp_mst_process_up_req()
4713 struct drm_dp_mst_branch *mstb) in drm_dp_mst_dump_mstb() argument
4716 int tabs = mstb->lct; in drm_dp_mst_dump_mstb()
4724 seq_printf(m, "%smst: %p, %d\n", prefix, mstb, mstb->num_ports); in drm_dp_mst_dump_mstb()
4725 list_for_each_entry(port, &mstb->ports, next) { in drm_dp_mst_dump_mstb()
4727 if (port->mstb) in drm_dp_mst_dump_mstb()
4728 drm_dp_mst_dump_mstb(m, port->mstb); in drm_dp_mst_dump_mstb()
4878 drm_dp_delayed_destroy_mstb(struct drm_dp_mst_branch *mstb) in drm_dp_delayed_destroy_mstb() argument
4880 struct drm_dp_mst_topology_mgr *mgr = mstb->mgr; in drm_dp_delayed_destroy_mstb()
4886 list_for_each_entry_safe(port, port_tmp, &mstb->ports, next) { in drm_dp_delayed_destroy_mstb()
4893 mutex_lock(&mstb->mgr->qlock); in drm_dp_delayed_destroy_mstb()
4895 if (txmsg->dst != mstb) in drm_dp_delayed_destroy_mstb()
4902 mutex_unlock(&mstb->mgr->qlock); in drm_dp_delayed_destroy_mstb()
4905 wake_up_all(&mstb->mgr->tx_waitq); in drm_dp_delayed_destroy_mstb()
4907 drm_dp_mst_put_mstb_malloc(mstb); in drm_dp_delayed_destroy_mstb()
4926 struct drm_dp_mst_branch *mstb; in drm_dp_delayed_destroy_work() local
4929 mstb = list_first_entry_or_null(&mgr->destroy_branch_device_list, in drm_dp_delayed_destroy_work()
4932 if (mstb) in drm_dp_delayed_destroy_work()
4933 list_del(&mstb->destroy_next); in drm_dp_delayed_destroy_work()
4936 if (!mstb) in drm_dp_delayed_destroy_work()
4939 drm_dp_delayed_destroy_mstb(mstb); in drm_dp_delayed_destroy_work()
5044 drm_dp_mst_atomic_check_mstb_bw_limit(struct drm_dp_mst_branch *mstb, in drm_dp_mst_atomic_check_mstb_bw_limit() argument
5057 !drm_dp_mst_port_downstream_of_branch(vcpi->port, mstb)) in drm_dp_mst_atomic_check_mstb_bw_limit()
5066 if (mstb->port_parent) in drm_dp_mst_atomic_check_mstb_bw_limit()
5068 mstb->port_parent->parent, mstb->port_parent, in drm_dp_mst_atomic_check_mstb_bw_limit()
5069 mstb); in drm_dp_mst_atomic_check_mstb_bw_limit()
5072 mstb); in drm_dp_mst_atomic_check_mstb_bw_limit()
5074 list_for_each_entry(port, &mstb->ports, next) { in drm_dp_mst_atomic_check_mstb_bw_limit()
5118 pbn_used = drm_dp_mst_atomic_check_mstb_bw_limit(port->mstb, in drm_dp_mst_atomic_check_port_bw_limit()
5517 static int drm_dp_mst_i2c_read(struct drm_dp_mst_branch *mstb, in drm_dp_mst_i2c_read() argument
5546 txmsg->dst = mstb; in drm_dp_mst_i2c_read()
5551 ret = drm_dp_mst_wait_tx_reply(mstb, txmsg); in drm_dp_mst_i2c_read()
5570 static int drm_dp_mst_i2c_write(struct drm_dp_mst_branch *mstb, in drm_dp_mst_i2c_write() argument
5594 txmsg->dst = mstb; in drm_dp_mst_i2c_write()
5599 ret = drm_dp_mst_wait_tx_reply(mstb, txmsg); in drm_dp_mst_i2c_write()
5622 struct drm_dp_mst_branch *mstb; in drm_dp_mst_i2c_xfer() local
5626 mstb = drm_dp_mst_topology_get_mstb_validated(mgr, port->parent); in drm_dp_mst_i2c_xfer()
5627 if (!mstb) in drm_dp_mst_i2c_xfer()
5631 ret = drm_dp_mst_i2c_read(mstb, port, msgs, num); in drm_dp_mst_i2c_xfer()
5633 ret = drm_dp_mst_i2c_write(mstb, port, msgs, num); in drm_dp_mst_i2c_xfer()
5639 drm_dp_mst_topology_put_mstb(mstb); in drm_dp_mst_i2c_xfer()
5728 port->mstb && in drm_dp_mst_is_virtual_dpcd()
5729 port->mstb->num_ports == 2) { in drm_dp_mst_is_virtual_dpcd()
5730 list_for_each_entry(downstream_port, &port->mstb->ports, next) { in drm_dp_mst_is_virtual_dpcd()