msm: eva: Add CVP_CMD debug logging
Add cmd logging functionality as an alternative to pkt logging. This has advantages related to log dropping and log mangling. Change-Id: I0ff6801445821e1224f83fa7e2eb8bf8a849962b
Esse commit está contido em:

commit de
Gerrit - the friendly Code Review server

pai
668cfd6757
commit
db7c8ad719
@@ -405,6 +405,7 @@ static int __write_queue(struct cvp_iface_q_info *qinfo, u8 *packet,
|
||||
bool *rx_req_is_set)
|
||||
{
|
||||
struct cvp_hfi_queue_header *queue;
|
||||
struct cvp_hfi_cmd_session_hdr *cmd_pkt;
|
||||
u32 packet_size_in_words, new_write_idx;
|
||||
u32 empty_space, read_idx, write_idx;
|
||||
u32 *write_ptr;
|
||||
@@ -423,6 +424,14 @@ static int __write_queue(struct cvp_iface_q_info *qinfo, u8 *packet,
|
||||
return -ENOENT;
|
||||
}
|
||||
|
||||
cmd_pkt = (struct cvp_hfi_cmd_session_hdr *)packet;
|
||||
dprintk(CVP_CMD, "%s: "
|
||||
"pkt_type %08x sess_id %08x trans_id %u ktid %llu\n",
|
||||
__func__, cmd_pkt->packet_type,
|
||||
cmd_pkt->session_id,
|
||||
cmd_pkt->client_data.transaction_id,
|
||||
cmd_pkt->client_data.kdata & (FENCE_BIT - 1));
|
||||
|
||||
if (msm_cvp_debug & CVP_PKT) {
|
||||
dprintk(CVP_PKT, "%s: %pK\n", __func__, qinfo);
|
||||
__dump_packet(packet, CVP_PKT);
|
||||
@@ -495,6 +504,7 @@ static int __read_queue(struct cvp_iface_q_info *qinfo, u8 *packet,
|
||||
u32 *pb_tx_req_is_set)
|
||||
{
|
||||
struct cvp_hfi_queue_header *queue;
|
||||
struct cvp_hfi_msg_session_hdr *msg_pkt;
|
||||
u32 packet_size_in_words, new_read_idx;
|
||||
u32 *read_ptr;
|
||||
u32 receive_request = 0;
|
||||
@@ -613,6 +623,16 @@ static int __read_queue(struct cvp_iface_q_info *qinfo, u8 *packet,
|
||||
|
||||
spin_unlock(&qinfo->hfi_lock);
|
||||
|
||||
if (!(queue->qhdr_type & HFI_Q_ID_CTRL_TO_HOST_DEBUG_Q)) {
|
||||
msg_pkt = (struct cvp_hfi_msg_session_hdr *)packet;
|
||||
dprintk(CVP_CMD, "%s: "
|
||||
"pkt_type %08x sess_id %08x trans_id %u ktid %llu\n",
|
||||
__func__, msg_pkt->packet_type,
|
||||
msg_pkt->session_id,
|
||||
msg_pkt->client_data.transaction_id,
|
||||
msg_pkt->client_data.kdata & (FENCE_BIT - 1));
|
||||
}
|
||||
|
||||
if ((msm_cvp_debug & CVP_PKT) &&
|
||||
!(queue->qhdr_type & HFI_Q_ID_CTRL_TO_HOST_DEBUG_Q)) {
|
||||
dprintk(CVP_PKT, "%s: %pK\n", __func__, qinfo);
|
||||
|
Referência em uma nova issue
Block a user