di vpp: merge vskip condition from 3.14

PD#162624: di,vpp: merge vskip condition from 3.14

Change-Id: I2749a35758df814d4bf28806f7a9745801a0afbe
Signed-off-by: kele bai <kele.bai@amlogic.com>
This commit is contained in:
kele bai
2018-03-28 17:01:20 +08:00
committed by Yixun Lan
parent 9abac91e33
commit 37b2212c07
2 changed files with 32 additions and 3 deletions

View File

@@ -1459,6 +1459,10 @@ static unsigned char is_bypass(vframe_t *vf_in)
/*backup vtype,set type as progressive*/
vtype = vf_in->type;
vf_in->type &= (~VIDTYPE_TYPEMASK);
vf_in->type &= (~VIDTYPE_VIU_NV21);
vf_in->type |= VIDTYPE_VIU_SINGLE_PLANE;
vf_in->type |= VIDTYPE_VIU_FIELD;
vf_in->type |= VIDTYPE_PRE_INTERLACE;
vf_in->type |= VIDTYPE_VIU_422;
ret = get_current_vscale_skip_count(vf_in);
di_vscale_skip_count = (ret&0xff);

View File

@@ -619,7 +619,9 @@ vpp_process_speed_check(s32 width_in,
{
u32 cur_ratio, bpp = 1;
int min_ratio_1000 = 0;
u32 vtotal, clk_in_pps = 0;
u32 vtotal, htotal = 0, clk_in_pps = 0, clk_vpu = 0, clk_temp;
u32 input_time_us = 0, display_time_us = 0, dummy_time_us = 0;
u32 width_out = 0;
if (vf)
cur_vf_type = vf->type;
@@ -643,9 +645,32 @@ vpp_process_speed_check(s32 width_in,
min_ratio_1000 = 1750;
if (vinfo->field_height < vinfo->height)
vtotal = 525 / 2;//vinfo->vtotal/2;
vtotal = vinfo->vtotal/2;
else
vtotal = 525;//vinfo->vtotal;//DEBUG_TMP
vtotal = vinfo->vtotal;
/*according vlsi suggest,
*if di work need check mif input and vpu process speed
*/
if (vf->type & VIDTYPE_PRE_INTERLACE) {
htotal = vinfo->htotal;
clk_vpu = get_vpu_clk();
clk_temp = clk_in_pps / 1000000;
if (clk_temp)
input_time_us = height_in * width_in / clk_temp;
clk_temp = clk_vpu / 1000000;
width_out = next_frame_par->VPP_vsc_endp -
next_frame_par->VPP_vsc_startp + 1;
if (clk_temp)
dummy_time_us = (vtotal * htotal -
height_out * width_out) / clk_temp;
display_time_us = 1000000 * vinfo->sync_duration_den /
vinfo->sync_duration_num;
if (display_time_us > dummy_time_us)
display_time_us = display_time_us - dummy_time_us;
if (input_time_us > display_time_us)
return SPEED_CHECK_VSKIP;
}
/* #if (MESON_CPU_TYPE >= MESON_CPU_TYPE_MESON8) */
if ((get_cpu_type() >= MESON_CPU_MAJOR_ID_M8) && !is_meson_mtvd_cpu()) {
if ((width_in <= 0) || (height_in <= 0) || (height_out <= 0)