From: Brian Zhu Date: Fri, 15 Mar 2019 07:43:56 +0000 (+0800) Subject: vpp: add log switch in vpp_set_filters [1/1] X-Git-Tag: hardkernel-4.9.236-104~1616 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=233779ef4d16d429fc62308020e82fe0806e4805;p=platform%2Fkernel%2Flinux-amlogic.git vpp: add log switch in vpp_set_filters [1/1] PD#SWPL-5942 Problem: Too many log when DI process called the vpp_set_filters with AFBC. Solution: Add log switch to disable it. Verify: verified on X301 Change-Id: I34c8573bed78e49d27ec386279e929e617bf76d5 Signed-off-by: Brian Zhu --- diff --git a/drivers/amlogic/media/video_sink/video.c b/drivers/amlogic/media/video_sink/video.c index 894cc90..46f3636 100644 --- a/drivers/amlogic/media/video_sink/video.c +++ b/drivers/amlogic/media/video_sink/video.c @@ -3153,12 +3153,12 @@ static void pip_toggle_frame(struct vframe_s *vf) if (legacy_vpp || is_meson_tl1_cpu()) iret = vpp_set_filters_no_scaler( &glayer_info[1], vf, - nextpip_frame_par, vinfo); + nextpip_frame_par, vinfo, 1); else iret = vpp_set_filters( &glayer_info[1], vf, nextpip_frame_par, vinfo, - true); + true, 1); if (iret == VppFilter_Success_and_Changed) pip_property_changed = 1; @@ -3959,7 +3959,7 @@ static void vsync_toggle_frame(struct vframe_s *vf, int line) &glayer_info[0], vf, next_frame_par, vinfo, (is_dolby_vision_on() && - is_dolby_vision_stb_mode())); + is_dolby_vision_stb_mode()), 1); if (iret == VppFilter_Success_and_Changed) video_property_changed = 1; @@ -8099,7 +8099,7 @@ int get_current_vscale_skip_count(struct vframe_s *vf) &glayer_info[0], vf, &frame_par, vinfo, (is_dolby_vision_on() && - is_dolby_vision_stb_mode())); + is_dolby_vision_stb_mode()), 0); ret = frame_par.vscale_skip_count; if (cur_frame_par && (process_3d_type & MODE_3D_ENABLE)) ret |= (cur_frame_par->vpp_3d_mode<<8); diff --git a/drivers/amlogic/media/video_sink/vpp.c b/drivers/amlogic/media/video_sink/vpp.c index 3d5db31..079470b 100644 --- a/drivers/amlogic/media/video_sink/vpp.c +++ b/drivers/amlogic/media/video_sink/vpp.c @@ -1417,7 +1417,8 @@ RESTART: (vf->canvas0Addr != 0) && (next_frame_par->vscale_skip_count > 1) && (!next_frame_par->nocomp)) { - pr_info( + if (vpp_flags & VPP_FLAG_MORE_LOG) + pr_info( "layer%d: Try DW buffer for compressed frame scaling.\n", input->layer_id); @@ -2792,7 +2793,8 @@ RESTART: (vf->canvas0Addr != 0) && (next_frame_par->vscale_skip_count > 1) && (!next_frame_par->nocomp)) { - pr_info( + if (vpp_flags & VPP_FLAG_MORE_LOG) + pr_info( "layer%d: Try DW buffer for compressed frame scaling.\n", input->layer_id); @@ -2850,7 +2852,7 @@ int vpp_set_filters( struct vframe_s *vf, struct vpp_frame_par_s *next_frame_par, const struct vinfo_s *vinfo, - bool bypass_sr) + bool bypass_sr, u32 op_flag) { u32 src_width = 0; u32 src_height = 0; @@ -2986,6 +2988,9 @@ int vpp_set_filters( if (vinfo->field_height != vinfo->height) vpp_flags |= VPP_FLAG_INTERLACE_OUT; + if (op_flag & 1) + vpp_flags |= VPP_FLAG_MORE_LOG; + next_frame_par->VPP_post_blend_vd_v_end_ = vinfo->field_height - 1; next_frame_par->VPP_post_blend_vd_h_end_ = vinfo->width - 1; next_frame_par->VPP_post_blend_h_size_ = vinfo->width; @@ -3009,7 +3014,7 @@ int vpp_set_filters_no_scaler( struct disp_info_s *input, struct vframe_s *vf, struct vpp_frame_par_s *next_frame_par, - const struct vinfo_s *vinfo) + const struct vinfo_s *vinfo, u32 op_flag) { u32 src_width = 0; u32 src_height = 0; @@ -3079,6 +3084,9 @@ int vpp_set_filters_no_scaler( if (vinfo->field_height != vinfo->height) vpp_flags |= VPP_FLAG_INTERLACE_OUT; + if (op_flag & 1) + vpp_flags |= VPP_FLAG_MORE_LOG; + next_frame_par->VPP_post_blend_vd_v_end_ = vinfo->field_height - 1; next_frame_par->VPP_post_blend_vd_h_end_ = vinfo->width - 1; next_frame_par->VPP_post_blend_h_size_ = vinfo->width; diff --git a/include/linux/amlogic/media/video_sink/vpp.h b/include/linux/amlogic/media/video_sink/vpp.h index f61c44d..22a143b 100644 --- a/include/linux/amlogic/media/video_sink/vpp.h +++ b/include/linux/amlogic/media/video_sink/vpp.h @@ -34,6 +34,7 @@ extern bool super_scaler; #define VPP_FLAG_AR_BITS 8 #define VPP_FLAG_PORTRAIT_MODE 0x00040000 #define VPP_FLAG_VSCALE_DISABLE 0x00080000 +#define VPP_FLAG_MORE_LOG 0x00100000 #define IDX_H (2 << 8) #define IDX_V_Y (1 << 13) @@ -285,13 +286,13 @@ extern int vpp_set_filters( struct vframe_s *vf, struct vpp_frame_par_s *next_frame_par, const struct vinfo_s *vinfo, - bool bypass_sr); + bool bypass_sr, u32 op_flag); extern int vpp_set_filters_no_scaler( struct disp_info_s *input, struct vframe_s *vf, struct vpp_frame_par_s *next_frame_par, - const struct vinfo_s *vinfo); + const struct vinfo_s *vinfo, u32 op_flag); extern s32 vpp_set_nonlinear_factor( struct disp_info_s *info, u32 f);