Lines Matching refs:txmsg

688 				const struct drm_dp_sideband_msg_tx *txmsg)  in drm_dp_mst_dump_sideband_msg_tx()  argument
695 drm_dp_mst_rad_to_str(txmsg->dst->rad, txmsg->dst->lct, buf, in drm_dp_mst_dump_sideband_msg_tx()
698 txmsg->cur_offset, txmsg->cur_len, txmsg->seqno, in drm_dp_mst_dump_sideband_msg_tx()
699 drm_dp_mst_sideband_tx_state_str(txmsg->state), in drm_dp_mst_dump_sideband_msg_tx()
700 txmsg->path_msg, buf); in drm_dp_mst_dump_sideband_msg_tx()
702 ret = drm_dp_decode_sideband_req(txmsg, &req); in drm_dp_mst_dump_sideband_msg_tx()
1238 struct drm_dp_sideband_msg_tx *txmsg) in check_txmsg_state() argument
1247 state = READ_ONCE(txmsg->state); in check_txmsg_state()
1253 struct drm_dp_sideband_msg_tx *txmsg) in drm_dp_mst_wait_tx_reply() argument
1275 check_txmsg_state(mgr, txmsg), in drm_dp_mst_wait_tx_reply()
1289 if (txmsg->state == DRM_DP_SIDEBAND_TX_TIMEOUT) { in drm_dp_mst_wait_tx_reply()
1295 txmsg, txmsg->state, txmsg->seqno); in drm_dp_mst_wait_tx_reply()
1301 if (txmsg->state == DRM_DP_SIDEBAND_TX_QUEUED || in drm_dp_mst_wait_tx_reply()
1302 txmsg->state == DRM_DP_SIDEBAND_TX_START_SEND || in drm_dp_mst_wait_tx_reply()
1303 txmsg->state == DRM_DP_SIDEBAND_TX_SENT) in drm_dp_mst_wait_tx_reply()
1304 list_del(&txmsg->next); in drm_dp_mst_wait_tx_reply()
1310 drm_dp_mst_dump_sideband_msg_tx(&p, txmsg); in drm_dp_mst_wait_tx_reply()
2753 struct drm_dp_sideband_msg_tx *txmsg) in set_hdr_from_dst_qlock() argument
2755 struct drm_dp_mst_branch *mstb = txmsg->dst; in set_hdr_from_dst_qlock()
2758 req_type = txmsg->msg[0] & 0x7f; in set_hdr_from_dst_qlock()
2765 hdr->path_msg = txmsg->path_msg; in set_hdr_from_dst_qlock()
2782 struct drm_dp_sideband_msg_tx *txmsg, in process_single_tx_qlock() argument
2790 if (txmsg->state == DRM_DP_SIDEBAND_TX_SENT) in process_single_tx_qlock()
2795 if (txmsg->state == DRM_DP_SIDEBAND_TX_QUEUED) in process_single_tx_qlock()
2796 txmsg->state = DRM_DP_SIDEBAND_TX_START_SEND; in process_single_tx_qlock()
2799 ret = set_hdr_from_dst_qlock(&hdr, txmsg); in process_single_tx_qlock()
2804 len = txmsg->cur_len - txmsg->cur_offset; in process_single_tx_qlock()
2810 if (len == txmsg->cur_len) in process_single_tx_qlock()
2818 memcpy(&chunk[idx], &txmsg->msg[txmsg->cur_offset], tosend); in process_single_tx_qlock()
2829 drm_dp_mst_dump_sideband_msg_tx(&p, txmsg); in process_single_tx_qlock()
2834 txmsg->cur_offset += tosend; in process_single_tx_qlock()
2835 if (txmsg->cur_offset == txmsg->cur_len) { in process_single_tx_qlock()
2836 txmsg->state = DRM_DP_SIDEBAND_TX_SENT; in process_single_tx_qlock()
2844 struct drm_dp_sideband_msg_tx *txmsg; in process_single_down_tx_qlock() local
2853 txmsg = list_first_entry(&mgr->tx_msg_downq, in process_single_down_tx_qlock()
2855 ret = process_single_tx_qlock(mgr, txmsg, false); in process_single_down_tx_qlock()
2858 list_del(&txmsg->next); in process_single_down_tx_qlock()
2859 txmsg->state = DRM_DP_SIDEBAND_TX_TIMEOUT; in process_single_down_tx_qlock()
2865 struct drm_dp_sideband_msg_tx *txmsg) in drm_dp_queue_down_tx() argument
2868 list_add_tail(&txmsg->next, &mgr->tx_msg_downq); in drm_dp_queue_down_tx()
2873 drm_dp_mst_dump_sideband_msg_tx(&p, txmsg); in drm_dp_queue_down_tx()
2908 struct drm_dp_sideband_msg_tx *txmsg; in drm_dp_send_link_address() local
2914 txmsg = kzalloc(sizeof(*txmsg), GFP_KERNEL); in drm_dp_send_link_address()
2915 if (!txmsg) in drm_dp_send_link_address()
2918 txmsg->dst = mstb; in drm_dp_send_link_address()
2919 build_link_address(txmsg); in drm_dp_send_link_address()
2922 drm_dp_queue_down_tx(mgr, txmsg); in drm_dp_send_link_address()
2925 ret = drm_dp_mst_wait_tx_reply(mstb, txmsg); in drm_dp_send_link_address()
2930 if (txmsg->reply.reply_type == DP_SIDEBAND_REPLY_NAK) { in drm_dp_send_link_address()
2936 reply = &txmsg->reply.u.link_addr; in drm_dp_send_link_address()
2980 kfree(txmsg); in drm_dp_send_link_address()
2988 struct drm_dp_sideband_msg_tx *txmsg; in drm_dp_send_clear_payload_id_table() local
2991 txmsg = kzalloc(sizeof(*txmsg), GFP_KERNEL); in drm_dp_send_clear_payload_id_table()
2992 if (!txmsg) in drm_dp_send_clear_payload_id_table()
2995 txmsg->dst = mstb; in drm_dp_send_clear_payload_id_table()
2996 build_clear_payload_id_table(txmsg); in drm_dp_send_clear_payload_id_table()
2998 drm_dp_queue_down_tx(mgr, txmsg); in drm_dp_send_clear_payload_id_table()
3000 ret = drm_dp_mst_wait_tx_reply(mstb, txmsg); in drm_dp_send_clear_payload_id_table()
3001 if (ret > 0 && txmsg->reply.reply_type == DP_SIDEBAND_REPLY_NAK) in drm_dp_send_clear_payload_id_table()
3004 kfree(txmsg); in drm_dp_send_clear_payload_id_table()
3013 struct drm_dp_sideband_msg_tx *txmsg; in drm_dp_send_enum_path_resources() local
3016 txmsg = kzalloc(sizeof(*txmsg), GFP_KERNEL); in drm_dp_send_enum_path_resources()
3017 if (!txmsg) in drm_dp_send_enum_path_resources()
3020 txmsg->dst = mstb; in drm_dp_send_enum_path_resources()
3021 build_enum_path_resources(txmsg, port->port_num); in drm_dp_send_enum_path_resources()
3023 drm_dp_queue_down_tx(mgr, txmsg); in drm_dp_send_enum_path_resources()
3025 ret = drm_dp_mst_wait_tx_reply(mstb, txmsg); in drm_dp_send_enum_path_resources()
3028 path_res = &txmsg->reply.u.path_resources; in drm_dp_send_enum_path_resources()
3030 if (txmsg->reply.reply_type == DP_SIDEBAND_REPLY_NAK) { in drm_dp_send_enum_path_resources()
3054 kfree(txmsg); in drm_dp_send_enum_path_resources()
3112 struct drm_dp_sideband_msg_tx *txmsg; in drm_dp_payload_send_msg() local
3129 txmsg = kzalloc(sizeof(*txmsg), GFP_KERNEL); in drm_dp_payload_send_msg()
3130 if (!txmsg) { in drm_dp_payload_send_msg()
3138 txmsg->dst = mstb; in drm_dp_payload_send_msg()
3139 build_allocate_payload(txmsg, port_num, in drm_dp_payload_send_msg()
3143 drm_dp_queue_down_tx(mgr, txmsg); in drm_dp_payload_send_msg()
3153 ret = drm_dp_mst_wait_tx_reply(mstb, txmsg); in drm_dp_payload_send_msg()
3155 if (txmsg->reply.reply_type == DP_SIDEBAND_REPLY_NAK) in drm_dp_payload_send_msg()
3160 kfree(txmsg); in drm_dp_payload_send_msg()
3169 struct drm_dp_sideband_msg_tx *txmsg; in drm_dp_send_power_updown_phy() local
3176 txmsg = kzalloc(sizeof(*txmsg), GFP_KERNEL); in drm_dp_send_power_updown_phy()
3177 if (!txmsg) { in drm_dp_send_power_updown_phy()
3182 txmsg->dst = port->parent; in drm_dp_send_power_updown_phy()
3183 build_power_updown_phy(txmsg, port->port_num, power_up); in drm_dp_send_power_updown_phy()
3184 drm_dp_queue_down_tx(mgr, txmsg); in drm_dp_send_power_updown_phy()
3186 ret = drm_dp_mst_wait_tx_reply(port->parent, txmsg); in drm_dp_send_power_updown_phy()
3188 if (txmsg->reply.reply_type == DP_SIDEBAND_REPLY_NAK) in drm_dp_send_power_updown_phy()
3193 kfree(txmsg); in drm_dp_send_power_updown_phy()
3206 struct drm_dp_sideband_msg_tx *txmsg; in drm_dp_send_query_stream_enc_status() local
3210 txmsg = kzalloc(sizeof(*txmsg), GFP_KERNEL); in drm_dp_send_query_stream_enc_status()
3211 if (!txmsg) in drm_dp_send_query_stream_enc_status()
3231 txmsg->dst = mgr->mst_primary; in drm_dp_send_query_stream_enc_status()
3233 build_query_stream_enc_status(txmsg, payload->vcpi, nonce); in drm_dp_send_query_stream_enc_status()
3235 drm_dp_queue_down_tx(mgr, txmsg); in drm_dp_send_query_stream_enc_status()
3237 ret = drm_dp_mst_wait_tx_reply(mgr->mst_primary, txmsg); in drm_dp_send_query_stream_enc_status()
3240 } else if (txmsg->reply.reply_type == DP_SIDEBAND_REPLY_NAK) { in drm_dp_send_query_stream_enc_status()
3247 memcpy(status, &txmsg->reply.u.enc_status, sizeof(*status)); in drm_dp_send_query_stream_enc_status()
3253 kfree(txmsg); in drm_dp_send_query_stream_enc_status()
3431 struct drm_dp_sideband_msg_tx *txmsg; in drm_dp_send_dpcd_read() local
3438 txmsg = kzalloc(sizeof(*txmsg), GFP_KERNEL); in drm_dp_send_dpcd_read()
3439 if (!txmsg) { in drm_dp_send_dpcd_read()
3444 build_dpcd_read(txmsg, port->port_num, offset, size); in drm_dp_send_dpcd_read()
3445 txmsg->dst = port->parent; in drm_dp_send_dpcd_read()
3447 drm_dp_queue_down_tx(mgr, txmsg); in drm_dp_send_dpcd_read()
3449 ret = drm_dp_mst_wait_tx_reply(mstb, txmsg); in drm_dp_send_dpcd_read()
3453 if (txmsg->reply.reply_type == 1) { in drm_dp_send_dpcd_read()
3460 if (txmsg->reply.u.remote_dpcd_read_ack.num_bytes != size) { in drm_dp_send_dpcd_read()
3465 ret = min_t(size_t, txmsg->reply.u.remote_dpcd_read_ack.num_bytes, in drm_dp_send_dpcd_read()
3467 memcpy(bytes, txmsg->reply.u.remote_dpcd_read_ack.bytes, ret); in drm_dp_send_dpcd_read()
3470 kfree(txmsg); in drm_dp_send_dpcd_read()
3482 struct drm_dp_sideband_msg_tx *txmsg; in drm_dp_send_dpcd_write() local
3489 txmsg = kzalloc(sizeof(*txmsg), GFP_KERNEL); in drm_dp_send_dpcd_write()
3490 if (!txmsg) { in drm_dp_send_dpcd_write()
3495 build_dpcd_write(txmsg, port->port_num, offset, size, bytes); in drm_dp_send_dpcd_write()
3496 txmsg->dst = mstb; in drm_dp_send_dpcd_write()
3498 drm_dp_queue_down_tx(mgr, txmsg); in drm_dp_send_dpcd_write()
3500 ret = drm_dp_mst_wait_tx_reply(mstb, txmsg); in drm_dp_send_dpcd_write()
3502 if (txmsg->reply.reply_type == DP_SIDEBAND_REPLY_NAK) in drm_dp_send_dpcd_write()
3508 kfree(txmsg); in drm_dp_send_dpcd_write()
3528 struct drm_dp_sideband_msg_tx *txmsg; in drm_dp_send_up_ack_reply() local
3530 txmsg = kzalloc(sizeof(*txmsg), GFP_KERNEL); in drm_dp_send_up_ack_reply()
3531 if (!txmsg) in drm_dp_send_up_ack_reply()
3534 txmsg->dst = mstb; in drm_dp_send_up_ack_reply()
3535 drm_dp_encode_up_ack_reply(txmsg, req_type); in drm_dp_send_up_ack_reply()
3539 process_single_tx_qlock(mgr, txmsg, true); in drm_dp_send_up_ack_reply()
3542 kfree(txmsg); in drm_dp_send_up_ack_reply()
3864 struct drm_dp_sideband_msg_tx *txmsg; in drm_dp_mst_handle_down_rep() local
3877 txmsg = list_first_entry_or_null(&mgr->tx_msg_downq, in drm_dp_mst_handle_down_rep()
3882 if (!txmsg || txmsg->dst != mstb) { in drm_dp_mst_handle_down_rep()
3891 drm_dp_sideband_parse_reply(mgr, msg, &txmsg->reply); in drm_dp_mst_handle_down_rep()
3893 if (txmsg->reply.reply_type == DP_SIDEBAND_REPLY_NAK) { in drm_dp_mst_handle_down_rep()
3896 txmsg->reply.req_type, in drm_dp_mst_handle_down_rep()
3897 drm_dp_mst_req_type_str(txmsg->reply.req_type), in drm_dp_mst_handle_down_rep()
3898 txmsg->reply.u.nak.reason, in drm_dp_mst_handle_down_rep()
3899 drm_dp_mst_nak_reason_str(txmsg->reply.u.nak.reason), in drm_dp_mst_handle_down_rep()
3900 txmsg->reply.u.nak.nak_data); in drm_dp_mst_handle_down_rep()
3907 txmsg->state = DRM_DP_SIDEBAND_TX_RX; in drm_dp_mst_handle_down_rep()
3908 list_del(&txmsg->next); in drm_dp_mst_handle_down_rep()
4116 struct drm_dp_sideband_msg_tx *txmsg; in drm_dp_mst_hpd_irq_send_new_request() local
4120 txmsg = list_first_entry_or_null(&mgr->tx_msg_downq, in drm_dp_mst_hpd_irq_send_new_request()
4123 if (!txmsg || in drm_dp_mst_hpd_irq_send_new_request()
4124 txmsg->state == DRM_DP_SIDEBAND_TX_START_SEND || in drm_dp_mst_hpd_irq_send_new_request()
4125 txmsg->state == DRM_DP_SIDEBAND_TX_SENT) in drm_dp_mst_hpd_irq_send_new_request()
4928 struct drm_dp_sideband_msg_tx *txmsg, *txmsg_tmp; in drm_dp_delayed_destroy_mstb() local
4940 list_for_each_entry_safe(txmsg, txmsg_tmp, &mgr->tx_msg_downq, next) { in drm_dp_delayed_destroy_mstb()
4941 if (txmsg->dst != mstb) in drm_dp_delayed_destroy_mstb()
4944 txmsg->state = DRM_DP_SIDEBAND_TX_TIMEOUT; in drm_dp_delayed_destroy_mstb()
4945 list_del(&txmsg->next); in drm_dp_delayed_destroy_mstb()
5613 struct drm_dp_sideband_msg_tx *txmsg = NULL; in drm_dp_mst_i2c_read() local
5629 txmsg = kzalloc(sizeof(*txmsg), GFP_KERNEL); in drm_dp_mst_i2c_read()
5630 if (!txmsg) { in drm_dp_mst_i2c_read()
5635 txmsg->dst = mstb; in drm_dp_mst_i2c_read()
5636 drm_dp_encode_sideband_req(&msg, txmsg); in drm_dp_mst_i2c_read()
5638 drm_dp_queue_down_tx(mgr, txmsg); in drm_dp_mst_i2c_read()
5640 ret = drm_dp_mst_wait_tx_reply(mstb, txmsg); in drm_dp_mst_i2c_read()
5643 if (txmsg->reply.reply_type == DP_SIDEBAND_REPLY_NAK) { in drm_dp_mst_i2c_read()
5647 if (txmsg->reply.u.remote_i2c_read_ack.num_bytes != msgs[num - 1].len) { in drm_dp_mst_i2c_read()
5651 memcpy(msgs[num - 1].buf, txmsg->reply.u.remote_i2c_read_ack.bytes, msgs[num - 1].len); in drm_dp_mst_i2c_read()
5655 kfree(txmsg); in drm_dp_mst_i2c_read()
5666 struct drm_dp_sideband_msg_tx *txmsg = NULL; in drm_dp_mst_i2c_write() local
5669 txmsg = kzalloc(sizeof(*txmsg), GFP_KERNEL); in drm_dp_mst_i2c_write()
5670 if (!txmsg) { in drm_dp_mst_i2c_write()
5682 memset(txmsg, 0, sizeof(*txmsg)); in drm_dp_mst_i2c_write()
5683 txmsg->dst = mstb; in drm_dp_mst_i2c_write()
5685 drm_dp_encode_sideband_req(&msg, txmsg); in drm_dp_mst_i2c_write()
5686 drm_dp_queue_down_tx(mgr, txmsg); in drm_dp_mst_i2c_write()
5688 ret = drm_dp_mst_wait_tx_reply(mstb, txmsg); in drm_dp_mst_i2c_write()
5690 if (txmsg->reply.reply_type == DP_SIDEBAND_REPLY_NAK) { in drm_dp_mst_i2c_write()
5700 kfree(txmsg); in drm_dp_mst_i2c_write()