Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 58ec831e authored by Praneeth Paladugu's avatar Praneeth Paladugu
Browse files

msm: vidc: Don't print message queues in error cases



While flushing debug queues, avoid touching message queues.
Bleeding message queues here can discard FW responses and
forward threads may timeout by not receiving them. This can
cause confusion about timeouts. Hence don't touch message
queues unless you process and send them to forward thread.

CRs-Fixed: 1066658
Change-Id: I7a5a89c32dc4b1284895d01202dcfdd8a90ccda0
Signed-off-by: default avatarPraneeth Paladugu <ppaladug@codeaurora.org>
parent 3c7400dc
Loading
Loading
Loading
Loading
+0 −18
Original line number Diff line number Diff line
@@ -3336,7 +3336,6 @@ static void __flush_debug_queue(struct venus_hfi_device *device, u8 *packet)
{
	bool local_packet = false;
	enum vidc_msg_prio log_level = VIDC_FW;
	unsigned int pending_packet_count = 0;

	if (!device) {
		dprintk(VIDC_ERR, "%s: Invalid params\n", __func__);
@@ -3361,23 +3360,6 @@ static void __flush_debug_queue(struct venus_hfi_device *device, u8 *packet)
		log_level = VIDC_ERR;
	}

	/*
	 * In FATAL situation, print all the pending messages in msg
	 * queue. This is useful for debugging. At this time, message
	 * queues may be corrupted. Hence don't trust them and just print
	 * first max_packets packets.
	 */

	if (local_packet) {
		dprintk(VIDC_ERR,
			"Printing all pending messages in message Queue\n");
		while (!__iface_msgq_read(device, packet) &&
				pending_packet_count < max_packets) {
			__dump_packet(packet, log_level);
			pending_packet_count++;
		}
	}

	while (!__iface_dbgq_read(device, packet)) {
		struct hfi_msg_sys_coverage_packet *pkt =
			(struct hfi_msg_sys_coverage_packet *) packet;