Skip to content

Commit

Permalink
vpp: add log switch in vpp_set_filters [1/1]
Browse files Browse the repository at this point in the history
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 <brian.zhu@amlogic.com>
  • Loading branch information
Brian Zhu committed Mar 15, 2019
1 parent 008e7e5 commit 233779e
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 10 deletions.
8 changes: 4 additions & 4 deletions drivers/amlogic/media/video_sink/video.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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;
Expand Down Expand Up @@ -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);
Expand Down
16 changes: 12 additions & 4 deletions drivers/amlogic/media/video_sink/vpp.c
Original file line number Diff line number Diff line change
Expand Up @@ -1417,7 +1417,8 @@ static int vpp_set_filters_internal(
(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);

Expand Down Expand Up @@ -2792,7 +2793,8 @@ static int vpp_set_filters_no_scaler_internal(
(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);

Expand Down Expand Up @@ -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;
Expand Down Expand Up @@ -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;
Expand All @@ -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;
Expand Down Expand Up @@ -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;
Expand Down
5 changes: 3 additions & 2 deletions include/linux/amlogic/media/video_sink/vpp.h
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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);
Expand Down

0 comments on commit 233779e

Please sign in to comment.