Merge "AFD: add print info for UD param [3/3]" into amlogic-5.15-dev
diff --git a/drivers/media/video_processor/di_process/di_process.c b/drivers/media/video_processor/di_process/di_process.c
index 2f42f08..bcba3d6 100644
--- a/drivers/media/video_processor/di_process/di_process.c
+++ b/drivers/media/video_processor/di_process/di_process.c
@@ -575,6 +575,14 @@
 
 	vf->vc_private = (struct video_composer_private *)di_buf->caller_mng.src_file;
 
+	dp_print(dev->index, PRINT_OTHER,
+		"%s: frame_index=%d, magic_code=0x%x, ud_addr=%p, ud_len=%d.\n",
+		__func__,
+		vf->frame_index,
+		vf->vf_ud_param.magic_code,
+		vf->vf_ud_param.ud_param.pbuf_addr,
+		vf->vf_ud_param.ud_param.buf_len);
+
 	if (vf->type & VIDTYPE_FORCE_SIGN_IP_JOINT) {
 		vf->type &= ~VIDTYPE_FORCE_SIGN_IP_JOINT;
 		dp_print(dev->index, PRINT_OTHER, "rm IP_JOINT type\n");
@@ -938,6 +946,14 @@
 		dev->fill_done_count,
 		total_fill_done_count);
 
+	dp_print(dev->index, PRINT_OTHER,
+		"%s: frame_index=%d, magic_code=0x%x, ud_addr=%p, ud_len=%d.\n",
+		__func__,
+		buf->vf->frame_index,
+		buf->vf->vf_ud_param.magic_code,
+		buf->vf->vf_ud_param.ud_param.pbuf_addr,
+		buf->vf->vf_ud_param.ud_param.buf_len);
+
 	if (buf->caller_mng.dropped) {
 		dp_print(dev->index, PRINT_OTHER, "%s:dropped\n", __func__);
 		if (di_bypass) {
@@ -1535,6 +1551,14 @@
 		vf->frame_index, vf->type, vf->flag, vf->compWidth, vf->compHeight, vf->width,
 		vf->height);
 
+	dp_print(dev->index, PRINT_OTHER,
+		"%s: frame_index=%d, magic_code=0x%x, ud_addr=%p, ud_len=%d.\n",
+		__func__,
+		vf->frame_index,
+		vf->vf_ud_param.magic_code,
+		vf->vf_ud_param.ud_param.pbuf_addr,
+		vf->vf_ud_param.ud_param.buf_len);
+
 	/*1080p->1080i; 4k->1080i*/
 	max_width_new = vf->compWidth >= vf->width ? vf->compWidth : vf->width;
 	max_width_last = dev->last_vf.compWidth >= dev->last_vf.width
diff --git a/drivers/media/video_processor/video_composer/video_composer.c b/drivers/media/video_processor/video_composer/video_composer.c
index 4c6ecf2..4697ce2 100644
--- a/drivers/media/video_processor/video_composer/video_composer.c
+++ b/drivers/media/video_processor/video_composer/video_composer.c
@@ -5062,6 +5062,14 @@
 				 vf->index_disp,
 				 vf->pts_us64,
 				 vf);
+
+			vc_print(dev->index, PRINT_FENCE,
+				"%s: frame_index=%d, magic_code=0x%x, ud_addr=%p, ud_len=%d.\n",
+				__func__,
+				vf->frame_index,
+				vf->vf_ud_param.magic_code,
+				vf->vf_ud_param.ud_param.pbuf_addr,
+				vf->vf_ud_param.ud_param.buf_len);
 #if IS_ENABLED(CONFIG_AMLOGIC_DEBUG_ATRACE)
 			ATRACE_COUNTER("video_composer_sf_frame_index", vf->frame_index);
 			ATRACE_COUNTER("video_composer_sf_frame_index", 0);
diff --git a/drivers/media/video_processor/video_composer/videodisplay.c b/drivers/media/video_processor/video_composer/videodisplay.c
index ec7f981..1cd77c6 100644
--- a/drivers/media/video_processor/video_composer/videodisplay.c
+++ b/drivers/media/video_processor/video_composer/videodisplay.c
@@ -1027,6 +1027,14 @@
 			vf->width,
 			vf->height);
 
+		vc_print(dev->index, PRINT_FENCE,
+			"%s: frame_index=%d, magic_code=0x%x, ud_addr=%p, ud_len=%d.\n",
+			__func__,
+			vf->frame_index,
+			vf->vf_ud_param.magic_code,
+			vf->vf_ud_param.ud_param.pbuf_addr,
+			vf->vf_ud_param.ud_param.buf_len);
+
 		vc_print(dev->index, PRINT_AXIS,
 			 "get:crop: %d %d %d %d, axis: %d %d %d %d.\n",
 			 vf->crop[0], vf->crop[1], vf->crop[2], vf->crop[3],
@@ -1147,6 +1155,14 @@
 		vf->width,
 		vf->height);
 
+	vc_print(dev->index, PRINT_FENCE,
+		"%s: frame_index=%d, magic_code=0x%x, ud_addr=%p, ud_len=%d.\n",
+		__func__,
+		vf->frame_index,
+		vf->vf_ud_param.magic_code,
+		vf->vf_ud_param.ud_param.pbuf_addr,
+		vf->vf_ud_param.ud_param.buf_len);
+
 #ifdef CONFIG_AMLOGIC_MEDIA_PROXY
 	ktime_get_real_ts64(&ts);
 	vc_notify_msg_to_mediaproxy(vf, dev->index, MEDIA_VIDEO_METRICS_FRAME_SIGNAFENCE_INFO, ts);
diff --git a/drivers/media/video_sink/video_hw.c b/drivers/media/video_sink/video_hw.c
index fc936aa..1221a27 100644
--- a/drivers/media/video_sink/video_hw.c
+++ b/drivers/media/video_sink/video_hw.c
@@ -10633,6 +10633,14 @@
 		layer_info->layer_top +
 		layer_info->layer_height - 1;
 
+	if (layer->global_debug & DEBUG_FLAG_AFD_INFO)
+		pr_info("%s: frame_index=%d, magic_code=0x%x, ud_addr=%p, ud_len=%d.\n",
+			__func__,
+			vf->frame_index,
+			vf->vf_ud_param.magic_code,
+			vf->vf_ud_param.ud_param.pbuf_addr,
+			vf->vf_ud_param.ud_param.buf_len);
+
 	ret = afd_process(id, &in_p, &out_p);
 	if (ret >= 0) {
 		layer_info->afd_enable = out_p.afd_enable;