Просмотр исходного кода

msm: eva: Avoid printing freed dma_buf name

Drop dma_buf name from debugging property of smem. fd can provide
similar debug value for EVA clients.

Change-Id: I8a6ccf394f274e990efa6e3eef33e1fd84b362df
Signed-off-by: George Shen <[email protected]>
George Shen 2 лет назад
Родитель
Сommit
064e379912
2 измененных файлов с 7 добавлено и 8 удалено
  1. 5 5
      msm/eva/msm_cvp_buf.c
  2. 2 3
      msm/eva/msm_cvp_common.c

+ 5 - 5
msm/eva/msm_cvp_buf.c

@@ -1,6 +1,7 @@
 // SPDX-License-Identifier: GPL-2.0-only
 /*
  * Copyright (c) 2020-2021, The Linux Foundation. All rights reserved.
+ * Copyright (c) 2023 Qualcomm Innovation Center, Inc. All rights reserved.
  */
 
 #include <linux/pid.h>
@@ -73,13 +74,13 @@ int print_smem(u32 tag, const char *str, struct msm_cvp_inst *inst,
 
 		if (!atomic_read(&smem->refcount))
 			dprintk(tag,
-				" UNUSED mapping %s: 0x%llx %s size %d iova %#x idx %d pkt_type %s buf_idx %#x fd %d",
-				str, smem->dma_buf, smem->dma_buf->name,
+				" UNUSED mapping %s: 0x%llx size %d iova %#x idx %d pkt_type %s buf_idx %#x fd %d",
+				str, smem->dma_buf,
 				smem->size, smem->device_addr, smem->bitmap_index, name, smem->buf_idx, smem->fd);
 		else
 			dprintk(tag,
-				"%s: %x : 0x%llx %s size %d flags %#x iova %#x idx %d ref %d pkt_type %s buf_idx %#x fd %d",
-				str, hash32_ptr(inst->session), smem->dma_buf, smem->dma_buf->name,
+				"%s: %x : 0x%llx size %d flags %#x iova %#x idx %d ref %d pkt_type %s buf_idx %#x fd %d",
+				str, hash32_ptr(inst->session), smem->dma_buf,
 				smem->size, smem->flags, smem->device_addr,
 				smem->bitmap_index, atomic_read(&smem->refcount),
 				name, smem->buf_idx, smem->fd);
@@ -1968,7 +1969,6 @@ void msm_cvp_print_inst_bufs(struct msm_cvp_inst *inst, bool log)
 	dprintk(CVP_ERR, "unmapped dsp bufs\n");
 	for (i = 0; i < inst->unused_dsp_bufs.nr; i++)
 		_log_smem(snap, inst, &inst->unused_dsp_bufs.smem[i], log);
-
 }
 
 struct cvp_internal_buf *cvp_allocate_arp_bufs(struct msm_cvp_inst *inst,

+ 2 - 3
msm/eva/msm_cvp_common.c

@@ -1,6 +1,7 @@
 // SPDX-License-Identifier: GPL-2.0-only
 /*
  * Copyright (c) 2018-2021, The Linux Foundation. All rights reserved.
+ * Copyright (c) 2023 Qualcomm Innovation Center, Inc. All rights reserved.
  */
 
 #include <linux/jiffies.h>
@@ -622,11 +623,9 @@ void handle_sys_error(enum hal_command_response cmd, void *data)
 			wake_up_all(&inst->event_handler.wq);
 		}
 
-		if (!core->trigger_ssr) {
-			cvp_print_inst(CVP_WARN, inst);
+		if (!core->trigger_ssr)
 			if (hfi_device->error != CVP_ERR_NOC_ERROR)
 				msm_cvp_print_inst_bufs(inst, false);
-		}
 	}
 
 	/* handle the hw error before core released to get full debug info */