Browse Source

video: driver: correct firmware debug log prints

Print firmware debug log message size to avoid
printing extra unnecessary data.

Change-Id: Ic6ed1bbbfdfeae9ba31b0bfaf06e15e6c7fc4b78
Signed-off-by: Maheshwar Ajja <[email protected]>
Maheshwar Ajja 4 years ago
parent
commit
cb9cd42f13
1 changed files with 3 additions and 3 deletions
  1. 3 3
      driver/vidc/src/venus_hfi.c

+ 3 - 3
driver/vidc/src/venus_hfi.c

@@ -993,13 +993,13 @@ static void __flush_debug_queue(struct msm_vidc_core *core,
 				__func__, pkt->size);
 			continue;
 		}
-		if (pkt->size > packet_size) {
-			d_vpr_e("%s: pkt size[%d] > packet_size[%d]\n",
+		if (pkt->size >= packet_size) {
+			d_vpr_e("%s: pkt size[%d] >= packet_size[%d]\n",
 				__func__, pkt->size, packet_size);
 			continue;
 		}
 
-		packet[packet_size - 1] = '\0';
+		packet[pkt->size] = '\0';
 		/*
 		 * All fw messages starts with new line character. This
 		 * causes dprintk to print this message in two lines