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()
1289 struct drm_dp_sideband_msg_tx *txmsg) in check_txmsg_state() argument
1298 state = READ_ONCE(txmsg->state); in check_txmsg_state()
1304 struct drm_dp_sideband_msg_tx *txmsg) in drm_dp_mst_wait_tx_reply() argument
1326 check_txmsg_state(mgr, txmsg), in drm_dp_mst_wait_tx_reply()
1340 if (txmsg->state == DRM_DP_SIDEBAND_TX_TIMEOUT) { in drm_dp_mst_wait_tx_reply()
1346 txmsg, txmsg->state, txmsg->seqno); in drm_dp_mst_wait_tx_reply()
1352 if (txmsg->state == DRM_DP_SIDEBAND_TX_QUEUED || in drm_dp_mst_wait_tx_reply()
1353 txmsg->state == DRM_DP_SIDEBAND_TX_START_SEND || in drm_dp_mst_wait_tx_reply()
1354 txmsg->state == DRM_DP_SIDEBAND_TX_SENT) in drm_dp_mst_wait_tx_reply()
1355 list_del(&txmsg->next); in drm_dp_mst_wait_tx_reply()
1361 drm_dp_mst_dump_sideband_msg_tx(&p, txmsg); in drm_dp_mst_wait_tx_reply()
2804 struct drm_dp_sideband_msg_tx *txmsg) in set_hdr_from_dst_qlock() argument
2806 struct drm_dp_mst_branch *mstb = txmsg->dst; in set_hdr_from_dst_qlock()
2809 req_type = txmsg->msg[0] & 0x7f; in set_hdr_from_dst_qlock()
2816 hdr->path_msg = txmsg->path_msg; in set_hdr_from_dst_qlock()
2833 struct drm_dp_sideband_msg_tx *txmsg, in process_single_tx_qlock() argument
2841 if (txmsg->state == DRM_DP_SIDEBAND_TX_SENT) in process_single_tx_qlock()
2846 if (txmsg->state == DRM_DP_SIDEBAND_TX_QUEUED) in process_single_tx_qlock()
2847 txmsg->state = DRM_DP_SIDEBAND_TX_START_SEND; in process_single_tx_qlock()
2850 ret = set_hdr_from_dst_qlock(&hdr, txmsg); in process_single_tx_qlock()
2855 len = txmsg->cur_len - txmsg->cur_offset; in process_single_tx_qlock()
2861 if (len == txmsg->cur_len) in process_single_tx_qlock()
2869 memcpy(&chunk[idx], &txmsg->msg[txmsg->cur_offset], tosend); in process_single_tx_qlock()
2880 drm_dp_mst_dump_sideband_msg_tx(&p, txmsg); in process_single_tx_qlock()
2885 txmsg->cur_offset += tosend; in process_single_tx_qlock()
2886 if (txmsg->cur_offset == txmsg->cur_len) { in process_single_tx_qlock()
2887 txmsg->state = DRM_DP_SIDEBAND_TX_SENT; in process_single_tx_qlock()
2895 struct drm_dp_sideband_msg_tx *txmsg; in process_single_down_tx_qlock() local
2904 txmsg = list_first_entry(&mgr->tx_msg_downq, in process_single_down_tx_qlock()
2906 ret = process_single_tx_qlock(mgr, txmsg, false); in process_single_down_tx_qlock()
2909 list_del(&txmsg->next); in process_single_down_tx_qlock()
2910 txmsg->state = DRM_DP_SIDEBAND_TX_TIMEOUT; in process_single_down_tx_qlock()
2916 struct drm_dp_sideband_msg_tx *txmsg) in drm_dp_queue_down_tx() argument
2919 list_add_tail(&txmsg->next, &mgr->tx_msg_downq); in drm_dp_queue_down_tx()
2924 drm_dp_mst_dump_sideband_msg_tx(&p, txmsg); in drm_dp_queue_down_tx()
2959 struct drm_dp_sideband_msg_tx *txmsg; in drm_dp_send_link_address() local
2965 txmsg = kzalloc(sizeof(*txmsg), GFP_KERNEL); in drm_dp_send_link_address()
2966 if (!txmsg) in drm_dp_send_link_address()
2969 txmsg->dst = mstb; in drm_dp_send_link_address()
2970 build_link_address(txmsg); in drm_dp_send_link_address()
2973 drm_dp_queue_down_tx(mgr, txmsg); in drm_dp_send_link_address()
2976 ret = drm_dp_mst_wait_tx_reply(mstb, txmsg); in drm_dp_send_link_address()
2981 if (txmsg->reply.reply_type == DP_SIDEBAND_REPLY_NAK) { in drm_dp_send_link_address()
2987 reply = &txmsg->reply.u.link_addr; in drm_dp_send_link_address()
3031 kfree(txmsg); in drm_dp_send_link_address()
3039 struct drm_dp_sideband_msg_tx *txmsg; in drm_dp_send_clear_payload_id_table() local
3042 txmsg = kzalloc(sizeof(*txmsg), GFP_KERNEL); in drm_dp_send_clear_payload_id_table()
3043 if (!txmsg) in drm_dp_send_clear_payload_id_table()
3046 txmsg->dst = mstb; in drm_dp_send_clear_payload_id_table()
3047 build_clear_payload_id_table(txmsg); in drm_dp_send_clear_payload_id_table()
3049 drm_dp_queue_down_tx(mgr, txmsg); in drm_dp_send_clear_payload_id_table()
3051 ret = drm_dp_mst_wait_tx_reply(mstb, txmsg); in drm_dp_send_clear_payload_id_table()
3052 if (ret > 0 && txmsg->reply.reply_type == DP_SIDEBAND_REPLY_NAK) in drm_dp_send_clear_payload_id_table()
3055 kfree(txmsg); in drm_dp_send_clear_payload_id_table()
3064 struct drm_dp_sideband_msg_tx *txmsg; in drm_dp_send_enum_path_resources() local
3067 txmsg = kzalloc(sizeof(*txmsg), GFP_KERNEL); in drm_dp_send_enum_path_resources()
3068 if (!txmsg) in drm_dp_send_enum_path_resources()
3071 txmsg->dst = mstb; in drm_dp_send_enum_path_resources()
3072 build_enum_path_resources(txmsg, port->port_num); in drm_dp_send_enum_path_resources()
3074 drm_dp_queue_down_tx(mgr, txmsg); in drm_dp_send_enum_path_resources()
3076 ret = drm_dp_mst_wait_tx_reply(mstb, txmsg); in drm_dp_send_enum_path_resources()
3079 path_res = &txmsg->reply.u.path_resources; in drm_dp_send_enum_path_resources()
3081 if (txmsg->reply.reply_type == DP_SIDEBAND_REPLY_NAK) { in drm_dp_send_enum_path_resources()
3105 kfree(txmsg); in drm_dp_send_enum_path_resources()
3163 struct drm_dp_sideband_msg_tx *txmsg; in drm_dp_payload_send_msg() local
3180 txmsg = kzalloc(sizeof(*txmsg), GFP_KERNEL); in drm_dp_payload_send_msg()
3181 if (!txmsg) { in drm_dp_payload_send_msg()
3189 txmsg->dst = mstb; in drm_dp_payload_send_msg()
3190 build_allocate_payload(txmsg, port_num, in drm_dp_payload_send_msg()
3194 drm_dp_queue_down_tx(mgr, txmsg); in drm_dp_payload_send_msg()
3204 ret = drm_dp_mst_wait_tx_reply(mstb, txmsg); in drm_dp_payload_send_msg()
3206 if (txmsg->reply.reply_type == DP_SIDEBAND_REPLY_NAK) in drm_dp_payload_send_msg()
3211 kfree(txmsg); in drm_dp_payload_send_msg()
3220 struct drm_dp_sideband_msg_tx *txmsg; in drm_dp_send_power_updown_phy() local
3227 txmsg = kzalloc(sizeof(*txmsg), GFP_KERNEL); in drm_dp_send_power_updown_phy()
3228 if (!txmsg) { in drm_dp_send_power_updown_phy()
3233 txmsg->dst = port->parent; in drm_dp_send_power_updown_phy()
3234 build_power_updown_phy(txmsg, port->port_num, power_up); in drm_dp_send_power_updown_phy()
3235 drm_dp_queue_down_tx(mgr, txmsg); in drm_dp_send_power_updown_phy()
3237 ret = drm_dp_mst_wait_tx_reply(port->parent, txmsg); in drm_dp_send_power_updown_phy()
3239 if (txmsg->reply.reply_type == DP_SIDEBAND_REPLY_NAK) in drm_dp_send_power_updown_phy()
3244 kfree(txmsg); in drm_dp_send_power_updown_phy()
3255 struct drm_dp_sideband_msg_tx *txmsg; in drm_dp_send_query_stream_enc_status() local
3259 txmsg = kzalloc(sizeof(*txmsg), GFP_KERNEL); in drm_dp_send_query_stream_enc_status()
3260 if (!txmsg) in drm_dp_send_query_stream_enc_status()
3276 txmsg->dst = mgr->mst_primary; in drm_dp_send_query_stream_enc_status()
3278 build_query_stream_enc_status(txmsg, port->vcpi.vcpi, nonce); in drm_dp_send_query_stream_enc_status()
3280 drm_dp_queue_down_tx(mgr, txmsg); in drm_dp_send_query_stream_enc_status()
3282 ret = drm_dp_mst_wait_tx_reply(mgr->mst_primary, txmsg); in drm_dp_send_query_stream_enc_status()
3285 } else if (txmsg->reply.reply_type == DP_SIDEBAND_REPLY_NAK) { in drm_dp_send_query_stream_enc_status()
3292 memcpy(status, &txmsg->reply.u.enc_status, sizeof(*status)); in drm_dp_send_query_stream_enc_status()
3297 kfree(txmsg); in drm_dp_send_query_stream_enc_status()
3537 struct drm_dp_sideband_msg_tx *txmsg; in drm_dp_send_dpcd_read() local
3544 txmsg = kzalloc(sizeof(*txmsg), GFP_KERNEL); in drm_dp_send_dpcd_read()
3545 if (!txmsg) { in drm_dp_send_dpcd_read()
3550 build_dpcd_read(txmsg, port->port_num, offset, size); in drm_dp_send_dpcd_read()
3551 txmsg->dst = port->parent; in drm_dp_send_dpcd_read()
3553 drm_dp_queue_down_tx(mgr, txmsg); in drm_dp_send_dpcd_read()
3555 ret = drm_dp_mst_wait_tx_reply(mstb, txmsg); in drm_dp_send_dpcd_read()
3560 if (txmsg->reply.reply_type == 1) { in drm_dp_send_dpcd_read()
3567 if (txmsg->reply.u.remote_dpcd_read_ack.num_bytes != size) { in drm_dp_send_dpcd_read()
3572 ret = min_t(size_t, txmsg->reply.u.remote_dpcd_read_ack.num_bytes, in drm_dp_send_dpcd_read()
3574 memcpy(bytes, txmsg->reply.u.remote_dpcd_read_ack.bytes, ret); in drm_dp_send_dpcd_read()
3577 kfree(txmsg); in drm_dp_send_dpcd_read()
3589 struct drm_dp_sideband_msg_tx *txmsg; in drm_dp_send_dpcd_write() local
3596 txmsg = kzalloc(sizeof(*txmsg), GFP_KERNEL); in drm_dp_send_dpcd_write()
3597 if (!txmsg) { in drm_dp_send_dpcd_write()
3602 build_dpcd_write(txmsg, port->port_num, offset, size, bytes); in drm_dp_send_dpcd_write()
3603 txmsg->dst = mstb; in drm_dp_send_dpcd_write()
3605 drm_dp_queue_down_tx(mgr, txmsg); in drm_dp_send_dpcd_write()
3607 ret = drm_dp_mst_wait_tx_reply(mstb, txmsg); in drm_dp_send_dpcd_write()
3609 if (txmsg->reply.reply_type == DP_SIDEBAND_REPLY_NAK) in drm_dp_send_dpcd_write()
3615 kfree(txmsg); in drm_dp_send_dpcd_write()
3635 struct drm_dp_sideband_msg_tx *txmsg; in drm_dp_send_up_ack_reply() local
3637 txmsg = kzalloc(sizeof(*txmsg), GFP_KERNEL); in drm_dp_send_up_ack_reply()
3638 if (!txmsg) in drm_dp_send_up_ack_reply()
3641 txmsg->dst = mstb; in drm_dp_send_up_ack_reply()
3642 drm_dp_encode_up_ack_reply(txmsg, req_type); in drm_dp_send_up_ack_reply()
3646 process_single_tx_qlock(mgr, txmsg, true); in drm_dp_send_up_ack_reply()
3649 kfree(txmsg); in drm_dp_send_up_ack_reply()
3994 struct drm_dp_sideband_msg_tx *txmsg; in drm_dp_mst_handle_down_rep() local
4007 txmsg = list_first_entry_or_null(&mgr->tx_msg_downq, in drm_dp_mst_handle_down_rep()
4012 if (!txmsg || txmsg->dst != mstb) { in drm_dp_mst_handle_down_rep()
4021 drm_dp_sideband_parse_reply(mgr, msg, &txmsg->reply); in drm_dp_mst_handle_down_rep()
4023 if (txmsg->reply.reply_type == DP_SIDEBAND_REPLY_NAK) { in drm_dp_mst_handle_down_rep()
4026 txmsg->reply.req_type, in drm_dp_mst_handle_down_rep()
4027 drm_dp_mst_req_type_str(txmsg->reply.req_type), in drm_dp_mst_handle_down_rep()
4028 txmsg->reply.u.nak.reason, in drm_dp_mst_handle_down_rep()
4029 drm_dp_mst_nak_reason_str(txmsg->reply.u.nak.reason), in drm_dp_mst_handle_down_rep()
4030 txmsg->reply.u.nak.nak_data); in drm_dp_mst_handle_down_rep()
4037 txmsg->state = DRM_DP_SIDEBAND_TX_RX; in drm_dp_mst_handle_down_rep()
4038 list_del(&txmsg->next); in drm_dp_mst_handle_down_rep()
4967 struct drm_dp_sideband_msg_tx *txmsg, *txmsg_tmp; in drm_dp_delayed_destroy_mstb() local
4979 list_for_each_entry_safe(txmsg, txmsg_tmp, &mgr->tx_msg_downq, next) { in drm_dp_delayed_destroy_mstb()
4980 if (txmsg->dst != mstb) in drm_dp_delayed_destroy_mstb()
4983 txmsg->state = DRM_DP_SIDEBAND_TX_TIMEOUT; in drm_dp_delayed_destroy_mstb()
4984 list_del(&txmsg->next); in drm_dp_delayed_destroy_mstb()
5621 struct drm_dp_sideband_msg_tx *txmsg = NULL; in drm_dp_mst_i2c_read() local
5637 txmsg = kzalloc(sizeof(*txmsg), GFP_KERNEL); in drm_dp_mst_i2c_read()
5638 if (!txmsg) { in drm_dp_mst_i2c_read()
5643 txmsg->dst = mstb; in drm_dp_mst_i2c_read()
5644 drm_dp_encode_sideband_req(&msg, txmsg); in drm_dp_mst_i2c_read()
5646 drm_dp_queue_down_tx(mgr, txmsg); in drm_dp_mst_i2c_read()
5648 ret = drm_dp_mst_wait_tx_reply(mstb, txmsg); in drm_dp_mst_i2c_read()
5651 if (txmsg->reply.reply_type == DP_SIDEBAND_REPLY_NAK) { in drm_dp_mst_i2c_read()
5655 if (txmsg->reply.u.remote_i2c_read_ack.num_bytes != msgs[num - 1].len) { in drm_dp_mst_i2c_read()
5659 memcpy(msgs[num - 1].buf, txmsg->reply.u.remote_i2c_read_ack.bytes, msgs[num - 1].len); in drm_dp_mst_i2c_read()
5663 kfree(txmsg); in drm_dp_mst_i2c_read()
5674 struct drm_dp_sideband_msg_tx *txmsg = NULL; in drm_dp_mst_i2c_write() local
5677 txmsg = kzalloc(sizeof(*txmsg), GFP_KERNEL); in drm_dp_mst_i2c_write()
5678 if (!txmsg) { in drm_dp_mst_i2c_write()
5690 memset(txmsg, 0, sizeof(*txmsg)); in drm_dp_mst_i2c_write()
5691 txmsg->dst = mstb; in drm_dp_mst_i2c_write()
5693 drm_dp_encode_sideband_req(&msg, txmsg); in drm_dp_mst_i2c_write()
5694 drm_dp_queue_down_tx(mgr, txmsg); in drm_dp_mst_i2c_write()
5696 ret = drm_dp_mst_wait_tx_reply(mstb, txmsg); in drm_dp_mst_i2c_write()
5698 if (txmsg->reply.reply_type == DP_SIDEBAND_REPLY_NAK) { in drm_dp_mst_i2c_write()
5708 kfree(txmsg); in drm_dp_mst_i2c_write()