Skip to content

Commit

Permalink
amvecm: optimize amvecm update in vsync [1/1]
Browse files Browse the repository at this point in the history
PD#SWPL-6475

Problem:
hdmi input signal, video flicker

Solution:
optimize amvecm update in vsync

Verify:
verify on TL1

Change-Id: I3379333053fc52b8a33747ca83b1d6d68ea874ab
Signed-off-by: MingLiang Dong <mingliang.dong@amlogic.com>
  • Loading branch information
MingLiang Dong authored and kongsuozt committed May 7, 2019
1 parent 099f0e2 commit 2677784
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 23 deletions.
9 changes: 0 additions & 9 deletions drivers/amlogic/media/enhancement/amvecm/amcsc.c
Original file line number Diff line number Diff line change
Expand Up @@ -6375,15 +6375,6 @@ static void video_process(
pr_csc("saturation offset = %d.\n",
saturation_offset);
cur_csc_type = csc_type;

if (vf) {
if ((cur_csc_type == VPP_MATRIX_BT2020YUV_BT2020RGB) &&
(cur_csc_type != 0xffff) &&
(vf->source_type == VFRAME_SOURCE_TYPE_HDMI)) {
amvecm_wakeup_queue();
pr_csc("wake up hdr status queue.\n");
}
}
}
}

Expand Down
30 changes: 16 additions & 14 deletions drivers/amlogic/media/video_sink/video.c
Original file line number Diff line number Diff line change
Expand Up @@ -6820,20 +6820,6 @@ static irqreturn_t vsync_isr_in(int irq, void *dev_id)
set_hdr_to_frame(vf);
#endif

#if defined(CONFIG_AMLOGIC_MEDIA_ENHANCEMENT_VECM)
refresh_on_vs(vf);
if (amvecm_on_vs(
(cur_dispbuf != &vf_local)
? cur_dispbuf : NULL,
vf, CSC_FLAG_CHECK_OUTPUT,
cur_frame_par ?
cur_frame_par->supsc1_hori_ratio :
0,
cur_frame_par ?
cur_frame_par->supsc1_vert_ratio :
0) == 1)
break;
#endif
/*
*two special case:
*case1:4k display case,input buffer not enough &
Expand Down Expand Up @@ -6884,6 +6870,22 @@ static irqreturn_t vsync_isr_in(int irq, void *dev_id)
video_3d_format = vf->trans_fmt;
}
}

#if defined(CONFIG_AMLOGIC_MEDIA_ENHANCEMENT_VECM)
refresh_on_vs(vf);
if (amvecm_on_vs(
(cur_dispbuf != &vf_local)
? cur_dispbuf : NULL,
vf, CSC_FLAG_CHECK_OUTPUT,
cur_frame_par ?
cur_frame_par->supsc1_hori_ratio :
0,
cur_frame_par ?
cur_frame_par->supsc1_vert_ratio :
0) == 1)
break;
#endif

vsync_toggle_frame(vf, __LINE__);
toggle_frame = vf;
#ifdef CONFIG_AMLOGIC_MEDIA_ENHANCEMENT_DOLBYVISION
Expand Down

0 comments on commit 2677784

Please sign in to comment.