diff --git a/drivers/media/video_processor/videodisplay/videodisplay_process.c b/drivers/media/video_processor/videodisplay/videodisplay_process.c index 55d567736..7842a78e3 100644 --- a/drivers/media/video_processor/videodisplay/videodisplay_process.c +++ b/drivers/media/video_processor/videodisplay/videodisplay_process.c @@ -2965,6 +2965,8 @@ static void vframe_display(struct videodisplay_dev *dev, dev->last_file = (struct file *)frame_info->dmabuf; vf->vc_private = vd_private_q_pop(dev); vf->vc_private->present_fence = frame_info->present_fence; + if (vf->vf_ext) + ((struct vframe_s *)vf->vf_ext)->vc_private = vf->vc_private; vf->file_vf = (struct file *)(frame_info->dmabuf); vf->repeat_count = 0; dev->vd_prepare_last = vd_prepare; @@ -3488,6 +3490,9 @@ static struct vframe_s *vd_vf_get(void *op_arg) enable_prelink = dim_get_pre_link(); #endif if (vf->vc_private) { + vd_print(dev->index, PRINT_OTHER, "%s:vc_p:%px, present_fence:%px\n", + __func__, vf->vc_private, vf->vc_private->present_fence); + vsync_index_diff = vf->vc_private->vsync_index - dev->last_vsync_index; dev->last_vsync_index = vf->vc_private->vsync_index; if (vf->frame_index < dev->last_vf_index) { diff --git a/drivers/media/video_sink/video_common.h b/drivers/media/video_sink/video_common.h index b254a701f..1554bac30 100644 --- a/drivers/media/video_sink/video_common.h +++ b/drivers/media/video_sink/video_common.h @@ -32,6 +32,7 @@ extern struct vd_proc_info_t vd_proc_amdv; #define DEBUG_FLAG_COMMON_SAFA BIT(5) #define DEBUG_FLAG_COMMON_PER_PREVSYNC BIT(6) #define DEBUG_FLAG_COMMON_LCEVC BIT(7) +#define DEBUG_FLAG_COMMON_FENCE BIT(9) extern struct vd_proc_info_t vd_proc_amdv; extern struct vd_proc_amvecm_info_t vd_proc_amvecm; diff --git a/drivers/media/video_sink/video_func.c b/drivers/media/video_sink/video_func.c index 694b4e740..6cdf780f0 100644 --- a/drivers/media/video_sink/video_func.c +++ b/drivers/media/video_sink/video_func.c @@ -2986,6 +2986,9 @@ static void signal_present_fence(u32 layer_id) if (dispbuf && dispbuf->vc_private) { vc = dispbuf->vc_private; if (vc->present_fence) { + if (debug_common_flag & DEBUG_FLAG_COMMON_FENCE) + pr_info("vf:%px index:%d vc_private:%px present_fence:%px\n", + dispbuf, dispbuf->frame_index, vc, vc->present_fence); dma_fence_signal(vc->present_fence); dma_fence_put(vc->present_fence); vc->present_fence = NULL;