From: wenfeng.guo Date: Fri, 23 Nov 2018 09:38:00 +0000 (+0800) Subject: vpp: fix vpp covertiy error [1/1] X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=a0490c2ea3f98c42b94d64c99d8ffa7e9509a2c3;p=GitHub%2FLineageOS%2FG12%2Fandroid_kernel_amlogic_linux-4.9.git vpp: fix vpp covertiy error [1/1] PD#SWPL-2458 Problem: vpp has covertiy error Solution: fix vpp covertiy error Verify: r311 Change-Id: Ic755420107b72fa0a56d73e288b708ab421f7609 Signed-off-by: Wenfeng Guo --- diff --git a/drivers/amlogic/media/video_sink/vpp.c b/drivers/amlogic/media/video_sink/vpp.c index 2f003b8944a8..17d138499af4 100644 --- a/drivers/amlogic/media/video_sink/vpp.c +++ b/drivers/amlogic/media/video_sink/vpp.c @@ -644,6 +644,8 @@ vpp_process_speed_check(s32 width_in, if (vf) cur_vf_type = vf->type; + else + return 0; if (force_vskip_cnt == 0xff)/*for debug*/ return SPEED_CHECK_DONE; if (next_frame_par->vscale_skip_count < force_vskip_cnt) @@ -1537,14 +1539,12 @@ RESTART: } /* force overwrite filter setting */ - if ((vert_scaler_filter >= COEF_BICUBIC) && - (vert_scaler_filter <= COEF_3D_FILTER)) { + if (vert_scaler_filter <= COEF_3D_FILTER) { filter->vpp_vert_coeff = filter_table[vert_scaler_filter]; filter->vpp_vert_filter = vert_scaler_filter; } if (vert_chroma_filter_force_en && - (vert_chroma_scaler_filter >= COEF_BICUBIC) && - (vert_chroma_scaler_filter <= COEF_3D_FILTER)) { + vert_chroma_scaler_filter <= COEF_3D_FILTER) { cur_vert_chroma_filter = vert_chroma_scaler_filter; filter->vpp_vert_chroma_coeff = filter_table[cur_vert_chroma_filter]; @@ -1554,8 +1554,7 @@ RESTART: filter->vpp_vert_chroma_filter_en = false; } - if ((horz_scaler_filter >= COEF_BICUBIC) && - (horz_scaler_filter <= COEF_3D_FILTER)) { + if (horz_scaler_filter <= COEF_3D_FILTER) { filter->vpp_horz_coeff = filter_table[horz_scaler_filter]; filter->vpp_horz_filter = horz_scaler_filter; }