Lines Matching refs:txmsg

684 				const struct drm_dp_sideband_msg_tx *txmsg)  in drm_dp_mst_dump_sideband_msg_tx()  argument
691 drm_dp_mst_rad_to_str(txmsg->dst->rad, txmsg->dst->lct, buf, in drm_dp_mst_dump_sideband_msg_tx()
694 txmsg->cur_offset, txmsg->cur_len, txmsg->seqno, in drm_dp_mst_dump_sideband_msg_tx()
695 drm_dp_mst_sideband_tx_state_str(txmsg->state), in drm_dp_mst_dump_sideband_msg_tx()
696 txmsg->path_msg, buf); in drm_dp_mst_dump_sideband_msg_tx()
698 ret = drm_dp_decode_sideband_req(txmsg, &req); in drm_dp_mst_dump_sideband_msg_tx()
1277 struct drm_dp_sideband_msg_tx *txmsg) in check_txmsg_state() argument
1286 state = READ_ONCE(txmsg->state); in check_txmsg_state()
1292 struct drm_dp_sideband_msg_tx *txmsg) in drm_dp_mst_wait_tx_reply() argument
1314 check_txmsg_state(mgr, txmsg), in drm_dp_mst_wait_tx_reply()
1328 if (txmsg->state == DRM_DP_SIDEBAND_TX_TIMEOUT) { in drm_dp_mst_wait_tx_reply()
1333 DRM_DEBUG_KMS("timedout msg send %p %d %d\n", txmsg, txmsg->state, txmsg->seqno); in drm_dp_mst_wait_tx_reply()
1339 if (txmsg->state == DRM_DP_SIDEBAND_TX_QUEUED || in drm_dp_mst_wait_tx_reply()
1340 txmsg->state == DRM_DP_SIDEBAND_TX_START_SEND || in drm_dp_mst_wait_tx_reply()
1341 txmsg->state == DRM_DP_SIDEBAND_TX_SENT) in drm_dp_mst_wait_tx_reply()
1342 list_del(&txmsg->next); in drm_dp_mst_wait_tx_reply()
1348 drm_dp_mst_dump_sideband_msg_tx(&p, txmsg); in drm_dp_mst_wait_tx_reply()
2819 struct drm_dp_sideband_msg_tx *txmsg) in set_hdr_from_dst_qlock() argument
2821 struct drm_dp_mst_branch *mstb = txmsg->dst; in set_hdr_from_dst_qlock()
2824 req_type = txmsg->msg[0] & 0x7f; in set_hdr_from_dst_qlock()
2830 hdr->path_msg = txmsg->path_msg; in set_hdr_from_dst_qlock()
2842 struct drm_dp_sideband_msg_tx *txmsg, in process_single_tx_qlock() argument
2850 if (txmsg->state == DRM_DP_SIDEBAND_TX_SENT) in process_single_tx_qlock()
2855 if (txmsg->state == DRM_DP_SIDEBAND_TX_QUEUED) in process_single_tx_qlock()
2856 txmsg->state = DRM_DP_SIDEBAND_TX_START_SEND; in process_single_tx_qlock()
2859 ret = set_hdr_from_dst_qlock(&hdr, txmsg); in process_single_tx_qlock()
2864 len = txmsg->cur_len - txmsg->cur_offset; in process_single_tx_qlock()
2870 if (len == txmsg->cur_len) in process_single_tx_qlock()
2878 memcpy(&chunk[idx], &txmsg->msg[txmsg->cur_offset], tosend); in process_single_tx_qlock()
2888 drm_dp_mst_dump_sideband_msg_tx(&p, txmsg); in process_single_tx_qlock()
2892 txmsg->cur_offset += tosend; in process_single_tx_qlock()
2893 if (txmsg->cur_offset == txmsg->cur_len) { in process_single_tx_qlock()
2894 txmsg->state = DRM_DP_SIDEBAND_TX_SENT; in process_single_tx_qlock()
2902 struct drm_dp_sideband_msg_tx *txmsg; in process_single_down_tx_qlock() local
2911 txmsg = list_first_entry(&mgr->tx_msg_downq, in process_single_down_tx_qlock()
2913 ret = process_single_tx_qlock(mgr, txmsg, false); in process_single_down_tx_qlock()
2916 list_del(&txmsg->next); in process_single_down_tx_qlock()
2917 txmsg->state = DRM_DP_SIDEBAND_TX_TIMEOUT; in process_single_down_tx_qlock()
2923 struct drm_dp_sideband_msg_tx *txmsg) in drm_dp_queue_down_tx() argument
2926 list_add_tail(&txmsg->next, &mgr->tx_msg_downq); in drm_dp_queue_down_tx()
2931 drm_dp_mst_dump_sideband_msg_tx(&p, txmsg); in drm_dp_queue_down_tx()
2964 struct drm_dp_sideband_msg_tx *txmsg; in drm_dp_send_link_address() local
2970 txmsg = kzalloc(sizeof(*txmsg), GFP_KERNEL); in drm_dp_send_link_address()
2971 if (!txmsg) in drm_dp_send_link_address()
2974 txmsg->dst = mstb; in drm_dp_send_link_address()
2975 build_link_address(txmsg); in drm_dp_send_link_address()
2978 drm_dp_queue_down_tx(mgr, txmsg); in drm_dp_send_link_address()
2981 ret = drm_dp_mst_wait_tx_reply(mstb, txmsg); in drm_dp_send_link_address()
2986 if (txmsg->reply.reply_type == DP_SIDEBAND_REPLY_NAK) { in drm_dp_send_link_address()
2992 reply = &txmsg->reply.u.link_addr; in drm_dp_send_link_address()
3037 kfree(txmsg); in drm_dp_send_link_address()
3045 struct drm_dp_sideband_msg_tx *txmsg; in drm_dp_send_clear_payload_id_table() local
3048 txmsg = kzalloc(sizeof(*txmsg), GFP_KERNEL); in drm_dp_send_clear_payload_id_table()
3049 if (!txmsg) in drm_dp_send_clear_payload_id_table()
3052 txmsg->dst = mstb; in drm_dp_send_clear_payload_id_table()
3053 build_clear_payload_id_table(txmsg); in drm_dp_send_clear_payload_id_table()
3055 drm_dp_queue_down_tx(mgr, txmsg); 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()
3058 if (ret > 0 && txmsg->reply.reply_type == DP_SIDEBAND_REPLY_NAK) in drm_dp_send_clear_payload_id_table()
3061 kfree(txmsg); in drm_dp_send_clear_payload_id_table()
3070 struct drm_dp_sideband_msg_tx *txmsg; in drm_dp_send_enum_path_resources() local
3073 txmsg = kzalloc(sizeof(*txmsg), GFP_KERNEL); in drm_dp_send_enum_path_resources()
3074 if (!txmsg) in drm_dp_send_enum_path_resources()
3077 txmsg->dst = mstb; in drm_dp_send_enum_path_resources()
3078 build_enum_path_resources(txmsg, port->port_num); in drm_dp_send_enum_path_resources()
3080 drm_dp_queue_down_tx(mgr, txmsg); in drm_dp_send_enum_path_resources()
3082 ret = drm_dp_mst_wait_tx_reply(mstb, txmsg); in drm_dp_send_enum_path_resources()
3085 path_res = &txmsg->reply.u.path_resources; in drm_dp_send_enum_path_resources()
3087 if (txmsg->reply.reply_type == DP_SIDEBAND_REPLY_NAK) { in drm_dp_send_enum_path_resources()
3111 kfree(txmsg); in drm_dp_send_enum_path_resources()
3169 struct drm_dp_sideband_msg_tx *txmsg; in drm_dp_payload_send_msg() local
3186 txmsg = kzalloc(sizeof(*txmsg), GFP_KERNEL); in drm_dp_payload_send_msg()
3187 if (!txmsg) { in drm_dp_payload_send_msg()
3195 txmsg->dst = mstb; in drm_dp_payload_send_msg()
3196 build_allocate_payload(txmsg, port_num, in drm_dp_payload_send_msg()
3200 drm_dp_queue_down_tx(mgr, txmsg); in drm_dp_payload_send_msg()
3210 ret = drm_dp_mst_wait_tx_reply(mstb, txmsg); in drm_dp_payload_send_msg()
3212 if (txmsg->reply.reply_type == DP_SIDEBAND_REPLY_NAK) in drm_dp_payload_send_msg()
3217 kfree(txmsg); in drm_dp_payload_send_msg()
3226 struct drm_dp_sideband_msg_tx *txmsg; in drm_dp_send_power_updown_phy() local
3233 txmsg = kzalloc(sizeof(*txmsg), GFP_KERNEL); in drm_dp_send_power_updown_phy()
3234 if (!txmsg) { in drm_dp_send_power_updown_phy()
3239 txmsg->dst = port->parent; in drm_dp_send_power_updown_phy()
3240 build_power_updown_phy(txmsg, port->port_num, power_up); in drm_dp_send_power_updown_phy()
3241 drm_dp_queue_down_tx(mgr, txmsg); in drm_dp_send_power_updown_phy()
3243 ret = drm_dp_mst_wait_tx_reply(port->parent, txmsg); in drm_dp_send_power_updown_phy()
3245 if (txmsg->reply.reply_type == DP_SIDEBAND_REPLY_NAK) in drm_dp_send_power_updown_phy()
3250 kfree(txmsg); in drm_dp_send_power_updown_phy()
3261 struct drm_dp_sideband_msg_tx *txmsg; in drm_dp_send_query_stream_enc_status() local
3265 txmsg = kzalloc(sizeof(*txmsg), GFP_KERNEL); in drm_dp_send_query_stream_enc_status()
3266 if (!txmsg) in drm_dp_send_query_stream_enc_status()
3282 txmsg->dst = mgr->mst_primary; in drm_dp_send_query_stream_enc_status()
3284 len = build_query_stream_enc_status(txmsg, port->vcpi.vcpi, nonce); in drm_dp_send_query_stream_enc_status()
3286 drm_dp_queue_down_tx(mgr, txmsg); in drm_dp_send_query_stream_enc_status()
3288 ret = drm_dp_mst_wait_tx_reply(mgr->mst_primary, txmsg); in drm_dp_send_query_stream_enc_status()
3291 } else if (txmsg->reply.reply_type == DP_SIDEBAND_REPLY_NAK) { in drm_dp_send_query_stream_enc_status()
3298 memcpy(status, &txmsg->reply.u.enc_status, sizeof(*status)); in drm_dp_send_query_stream_enc_status()
3303 kfree(txmsg); in drm_dp_send_query_stream_enc_status()
3516 struct drm_dp_sideband_msg_tx *txmsg; in drm_dp_send_dpcd_read() local
3523 txmsg = kzalloc(sizeof(*txmsg), GFP_KERNEL); in drm_dp_send_dpcd_read()
3524 if (!txmsg) { in drm_dp_send_dpcd_read()
3529 build_dpcd_read(txmsg, port->port_num, offset, size); in drm_dp_send_dpcd_read()
3530 txmsg->dst = port->parent; in drm_dp_send_dpcd_read()
3532 drm_dp_queue_down_tx(mgr, txmsg); in drm_dp_send_dpcd_read()
3534 ret = drm_dp_mst_wait_tx_reply(mstb, txmsg); in drm_dp_send_dpcd_read()
3539 if (txmsg->reply.reply_type == 1) { in drm_dp_send_dpcd_read()
3546 if (txmsg->reply.u.remote_dpcd_read_ack.num_bytes != size) { in drm_dp_send_dpcd_read()
3551 ret = min_t(size_t, txmsg->reply.u.remote_dpcd_read_ack.num_bytes, in drm_dp_send_dpcd_read()
3553 memcpy(bytes, txmsg->reply.u.remote_dpcd_read_ack.bytes, ret); in drm_dp_send_dpcd_read()
3556 kfree(txmsg); in drm_dp_send_dpcd_read()
3568 struct drm_dp_sideband_msg_tx *txmsg; in drm_dp_send_dpcd_write() local
3575 txmsg = kzalloc(sizeof(*txmsg), GFP_KERNEL); in drm_dp_send_dpcd_write()
3576 if (!txmsg) { in drm_dp_send_dpcd_write()
3581 build_dpcd_write(txmsg, port->port_num, offset, size, bytes); in drm_dp_send_dpcd_write()
3582 txmsg->dst = mstb; in drm_dp_send_dpcd_write()
3584 drm_dp_queue_down_tx(mgr, txmsg); in drm_dp_send_dpcd_write()
3586 ret = drm_dp_mst_wait_tx_reply(mstb, txmsg); in drm_dp_send_dpcd_write()
3588 if (txmsg->reply.reply_type == DP_SIDEBAND_REPLY_NAK) in drm_dp_send_dpcd_write()
3594 kfree(txmsg); in drm_dp_send_dpcd_write()
3614 struct drm_dp_sideband_msg_tx *txmsg; in drm_dp_send_up_ack_reply() local
3616 txmsg = kzalloc(sizeof(*txmsg), GFP_KERNEL); in drm_dp_send_up_ack_reply()
3617 if (!txmsg) in drm_dp_send_up_ack_reply()
3620 txmsg->dst = mstb; in drm_dp_send_up_ack_reply()
3621 drm_dp_encode_up_ack_reply(txmsg, req_type); in drm_dp_send_up_ack_reply()
3625 process_single_tx_qlock(mgr, txmsg, true); in drm_dp_send_up_ack_reply()
3628 kfree(txmsg); in drm_dp_send_up_ack_reply()
3954 struct drm_dp_sideband_msg_tx *txmsg; in drm_dp_mst_handle_down_rep() local
3967 txmsg = list_first_entry_or_null(&mgr->tx_msg_downq, in drm_dp_mst_handle_down_rep()
3972 if (!txmsg || txmsg->dst != mstb) { in drm_dp_mst_handle_down_rep()
3982 drm_dp_sideband_parse_reply(msg, &txmsg->reply); in drm_dp_mst_handle_down_rep()
3984 if (txmsg->reply.reply_type == DP_SIDEBAND_REPLY_NAK) { in drm_dp_mst_handle_down_rep()
3986 txmsg->reply.req_type, in drm_dp_mst_handle_down_rep()
3987 drm_dp_mst_req_type_str(txmsg->reply.req_type), in drm_dp_mst_handle_down_rep()
3988 txmsg->reply.u.nak.reason, in drm_dp_mst_handle_down_rep()
3989 drm_dp_mst_nak_reason_str(txmsg->reply.u.nak.reason), in drm_dp_mst_handle_down_rep()
3990 txmsg->reply.u.nak.nak_data); in drm_dp_mst_handle_down_rep()
3997 txmsg->state = DRM_DP_SIDEBAND_TX_RX; in drm_dp_mst_handle_down_rep()
3998 list_del(&txmsg->next); in drm_dp_mst_handle_down_rep()
4882 struct drm_dp_sideband_msg_tx *txmsg, *txmsg_tmp; in drm_dp_delayed_destroy_mstb() local
4894 list_for_each_entry_safe(txmsg, txmsg_tmp, &mgr->tx_msg_downq, next) { in drm_dp_delayed_destroy_mstb()
4895 if (txmsg->dst != mstb) in drm_dp_delayed_destroy_mstb()
4898 txmsg->state = DRM_DP_SIDEBAND_TX_TIMEOUT; in drm_dp_delayed_destroy_mstb()
4899 list_del(&txmsg->next); in drm_dp_delayed_destroy_mstb()
5524 struct drm_dp_sideband_msg_tx *txmsg = NULL; in drm_dp_mst_i2c_read() local
5540 txmsg = kzalloc(sizeof(*txmsg), GFP_KERNEL); in drm_dp_mst_i2c_read()
5541 if (!txmsg) { in drm_dp_mst_i2c_read()
5546 txmsg->dst = mstb; in drm_dp_mst_i2c_read()
5547 drm_dp_encode_sideband_req(&msg, txmsg); in drm_dp_mst_i2c_read()
5549 drm_dp_queue_down_tx(mgr, txmsg); in drm_dp_mst_i2c_read()
5551 ret = drm_dp_mst_wait_tx_reply(mstb, txmsg); in drm_dp_mst_i2c_read()
5554 if (txmsg->reply.reply_type == DP_SIDEBAND_REPLY_NAK) { in drm_dp_mst_i2c_read()
5558 if (txmsg->reply.u.remote_i2c_read_ack.num_bytes != msgs[num - 1].len) { in drm_dp_mst_i2c_read()
5562 memcpy(msgs[num - 1].buf, txmsg->reply.u.remote_i2c_read_ack.bytes, msgs[num - 1].len); in drm_dp_mst_i2c_read()
5566 kfree(txmsg); in drm_dp_mst_i2c_read()
5577 struct drm_dp_sideband_msg_tx *txmsg = NULL; in drm_dp_mst_i2c_write() local
5580 txmsg = kzalloc(sizeof(*txmsg), GFP_KERNEL); in drm_dp_mst_i2c_write()
5581 if (!txmsg) { in drm_dp_mst_i2c_write()
5593 memset(txmsg, 0, sizeof(*txmsg)); in drm_dp_mst_i2c_write()
5594 txmsg->dst = mstb; in drm_dp_mst_i2c_write()
5596 drm_dp_encode_sideband_req(&msg, txmsg); in drm_dp_mst_i2c_write()
5597 drm_dp_queue_down_tx(mgr, txmsg); in drm_dp_mst_i2c_write()
5599 ret = drm_dp_mst_wait_tx_reply(mstb, txmsg); in drm_dp_mst_i2c_write()
5601 if (txmsg->reply.reply_type == DP_SIDEBAND_REPLY_NAK) { in drm_dp_mst_i2c_write()
5611 kfree(txmsg); in drm_dp_mst_i2c_write()