mirror of
https://github.com/hardkernel/kernel_common_drivers.git
synced 2026-06-25 12:03:48 +09:00
videodisplay: fix kernel panic caused by present fence. [1/1]
PD#SWPL-215901 Problem: fix kernel panic caused by present fence. Solution: fix kernel panic caused by present fence. Verify: TXHD2 Change-Id: Ibd952eb7080f43d4d1241581c5678982bd00ed8e Signed-off-by: Jian Cao <jian.cao@amlogic.com>
This commit is contained in:
committed by
gerrit autosubmit
parent
3a98cb06b2
commit
4ecc61dafa
@@ -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) {
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user