mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-08 03:40:35 +09:00
vpp: hold the vpp setting when meet the non-dw afbc frame [1/1]
PD#SWPL-7513 Problem: When meet the non-dw afbc frame, vpp can not display with scaling down as expected. Solution: Hold the current vpp setting and wait provider to switch non-afbc. Verify: x301 Change-Id: I3c0e678d2da42376f3a77e334b8c5ce48460273b Signed-off-by: Brian Zhu <brian.zhu@amlogic.com>
This commit is contained in:
@@ -277,6 +277,8 @@ static u32 frame_detect_fps = 60000;
|
|||||||
static u32 frame_detect_receive_count;
|
static u32 frame_detect_receive_count;
|
||||||
static u32 frame_detect_drop_count;
|
static u32 frame_detect_drop_count;
|
||||||
|
|
||||||
|
static u32 vpp_hold_setting_cnt;
|
||||||
|
|
||||||
#ifdef FIQ_VSYNC
|
#ifdef FIQ_VSYNC
|
||||||
#define BRIDGE_IRQ INT_TIMER_C
|
#define BRIDGE_IRQ INT_TIMER_C
|
||||||
#define BRIDGE_IRQ_SET() WRITE_CBUS_REG(ISA_TIMERC, 1)
|
#define BRIDGE_IRQ_SET() WRITE_CBUS_REG(ISA_TIMERC, 1)
|
||||||
@@ -3172,7 +3174,7 @@ static void pip_toggle_frame(struct vframe_s *vf)
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (pip_property_changed) {
|
if (pip_property_changed) {
|
||||||
first_picture = 1;
|
force_toggle = true;
|
||||||
pip_property_changed = 0;
|
pip_property_changed = 0;
|
||||||
}
|
}
|
||||||
if (cur_pipbuf != vf)
|
if (cur_pipbuf != vf)
|
||||||
@@ -3795,11 +3797,11 @@ static void vsync_toggle_frame(struct vframe_s *vf, int line)
|
|||||||
if (video_property_changed) {
|
if (video_property_changed) {
|
||||||
property_changed_true = 2;
|
property_changed_true = 2;
|
||||||
video_property_changed = 0;
|
video_property_changed = 0;
|
||||||
first_picture = 1;
|
force_toggle = true;
|
||||||
}
|
}
|
||||||
if (property_changed_true > 0) {
|
if (property_changed_true > 0) {
|
||||||
property_changed_true--;
|
property_changed_true--;
|
||||||
first_picture = 1;
|
force_toggle = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((debug_flag & DEBUG_FLAG_BLACKOUT)
|
if ((debug_flag & DEBUG_FLAG_BLACKOUT)
|
||||||
@@ -4022,14 +4024,31 @@ static void vsync_toggle_frame(struct vframe_s *vf, int line)
|
|||||||
(is_dolby_vision_on() &&
|
(is_dolby_vision_on() &&
|
||||||
is_dolby_vision_stb_mode()), 1);
|
is_dolby_vision_stb_mode()), 1);
|
||||||
|
|
||||||
if (iret == VppFilter_Success_and_Changed)
|
|
||||||
video_property_changed = 1;
|
|
||||||
|
|
||||||
memcpy(&gPic_info[0], &vf->pic_mode,
|
memcpy(&gPic_info[0], &vf->pic_mode,
|
||||||
sizeof(struct vframe_pic_mode_s));
|
sizeof(struct vframe_pic_mode_s));
|
||||||
|
|
||||||
/* apply new vpp settings */
|
if ((iret == VppFilter_Success_and_Changed)
|
||||||
frame_par_ready_to_set = 1;
|
|| (iret == VppFilter_Changed_but_Hold))
|
||||||
|
video_property_changed = 1;
|
||||||
|
|
||||||
|
if (iret == VppFilter_Changed_but_Hold) {
|
||||||
|
video_notify_flag |=
|
||||||
|
VIDEO_NOTIFY_NEED_NO_COMP;
|
||||||
|
vpp_hold_setting_cnt++;
|
||||||
|
if (debug_flag & DEBUG_FLAG_BLACKOUT)
|
||||||
|
pr_info("toggle_frame vpp hold setting cnt: %d\n",
|
||||||
|
vpp_hold_setting_cnt);
|
||||||
|
} else {/* apply new vpp settings */
|
||||||
|
if ((next_frame_par->vscale_skip_count <= 1)
|
||||||
|
&& (vf->type & VIDTYPE_SUPPORT_COMPRESS)) {
|
||||||
|
video_notify_flag |=
|
||||||
|
VIDEO_NOTIFY_NEED_NO_COMP;
|
||||||
|
if (debug_flag & DEBUG_FLAG_BLACKOUT)
|
||||||
|
pr_info("disable no compress mode\n");
|
||||||
|
}
|
||||||
|
vpp_hold_setting_cnt = 0;
|
||||||
|
frame_par_ready_to_set = 1;
|
||||||
|
}
|
||||||
|
|
||||||
if (((vf->width > 1920) && (vf->height > 1088)) ||
|
if (((vf->width > 1920) && (vf->height > 1088)) ||
|
||||||
((vf->type & VIDTYPE_COMPRESS) &&
|
((vf->type & VIDTYPE_COMPRESS) &&
|
||||||
@@ -5595,6 +5614,13 @@ static void vsync_notify(void)
|
|||||||
video_notify_flag &=
|
video_notify_flag &=
|
||||||
~(VIDEO_NOTIFY_PROVIDER_GET | VIDEO_NOTIFY_PROVIDER_PUT);
|
~(VIDEO_NOTIFY_PROVIDER_GET | VIDEO_NOTIFY_PROVIDER_PUT);
|
||||||
}
|
}
|
||||||
|
if (video_notify_flag & VIDEO_NOTIFY_NEED_NO_COMP) {
|
||||||
|
/* FIXME: can not use fixed provider name */
|
||||||
|
vf_notify_provider_by_name("vdin0",
|
||||||
|
VFRAME_EVENT_RECEIVER_NEED_NO_COMP,
|
||||||
|
(void *)&vpp_hold_setting_cnt);
|
||||||
|
video_notify_flag &= ~VIDEO_NOTIFY_NEED_NO_COMP;
|
||||||
|
}
|
||||||
#ifdef CONFIG_CLK81_DFS
|
#ifdef CONFIG_CLK81_DFS
|
||||||
check_and_set_clk81();
|
check_and_set_clk81();
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
@@ -48,6 +48,7 @@
|
|||||||
#define VIDEO_NOTIFY_PROVIDER_PUT 0x04
|
#define VIDEO_NOTIFY_PROVIDER_PUT 0x04
|
||||||
#define VIDEO_NOTIFY_FRAME_WAIT 0x08
|
#define VIDEO_NOTIFY_FRAME_WAIT 0x08
|
||||||
#define VIDEO_NOTIFY_POS_CHANGED 0x10
|
#define VIDEO_NOTIFY_POS_CHANGED 0x10
|
||||||
|
#define VIDEO_NOTIFY_NEED_NO_COMP 0x20
|
||||||
|
|
||||||
struct video_dev_s {
|
struct video_dev_s {
|
||||||
int vpp_off;
|
int vpp_off;
|
||||||
|
|||||||
@@ -1487,6 +1487,7 @@ RESTART:
|
|||||||
}
|
}
|
||||||
|
|
||||||
if ((vf->type & VIDTYPE_COMPRESS) &&
|
if ((vf->type & VIDTYPE_COMPRESS) &&
|
||||||
|
!(vf->type & VIDTYPE_NO_DW) &&
|
||||||
(vf->canvas0Addr != 0) &&
|
(vf->canvas0Addr != 0) &&
|
||||||
(!next_frame_par->nocomp)) {
|
(!next_frame_par->nocomp)) {
|
||||||
if ((next_frame_par->vscale_skip_count > 1)
|
if ((next_frame_par->vscale_skip_count > 1)
|
||||||
@@ -1687,6 +1688,10 @@ RESTART:
|
|||||||
next_frame_par->vscale_skip_count;
|
next_frame_par->vscale_skip_count;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if ((next_frame_par->vscale_skip_count > 1)
|
||||||
|
&& (vf->type & VIDTYPE_COMPRESS)
|
||||||
|
&& (vf->type & VIDTYPE_NO_DW))
|
||||||
|
ret = VppFilter_Changed_but_Hold;
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
/*
|
/*
|
||||||
@@ -2890,6 +2895,7 @@ RESTART:
|
|||||||
}
|
}
|
||||||
|
|
||||||
if ((vf->type & VIDTYPE_COMPRESS) &&
|
if ((vf->type & VIDTYPE_COMPRESS) &&
|
||||||
|
!(vf->type & VIDTYPE_NO_DW) &&
|
||||||
(vf->canvas0Addr != 0) &&
|
(vf->canvas0Addr != 0) &&
|
||||||
(!next_frame_par->nocomp)) {
|
(!next_frame_par->nocomp)) {
|
||||||
if ((next_frame_par->vscale_skip_count > 1)
|
if ((next_frame_par->vscale_skip_count > 1)
|
||||||
@@ -2954,6 +2960,10 @@ RESTART:
|
|||||||
next_frame_par->VPP_line_in_length_ >>= 1;
|
next_frame_par->VPP_line_in_length_ >>= 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if ((next_frame_par->vscale_skip_count > 1)
|
||||||
|
&& (vf->type & VIDTYPE_COMPRESS)
|
||||||
|
&& (vf->type & VIDTYPE_NO_DW))
|
||||||
|
ret = VppFilter_Changed_but_Hold;
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -3122,6 +3132,9 @@ int vpp_set_filters(
|
|||||||
vinfo->width, vinfo->height,
|
vinfo->width, vinfo->height,
|
||||||
vinfo, vpp_flags, next_frame_par, vf);
|
vinfo, vpp_flags, next_frame_par, vf);
|
||||||
|
|
||||||
|
/* bypass sr since the input w/h may be wrong */
|
||||||
|
if (ret == VppFilter_Changed_but_Hold)
|
||||||
|
bypass_sr = true;
|
||||||
/*config super scaler after set next_frame_par is calc ok for pps*/
|
/*config super scaler after set next_frame_par is calc ok for pps*/
|
||||||
if (local_input.layer_id == 0)
|
if (local_input.layer_id == 0)
|
||||||
vpp_set_super_scaler(
|
vpp_set_super_scaler(
|
||||||
|
|||||||
@@ -53,6 +53,7 @@ enum vppfilter_state_e {
|
|||||||
VppFilter_Fail = -1,
|
VppFilter_Fail = -1,
|
||||||
VppFilter_Success = 0,
|
VppFilter_Success = 0,
|
||||||
VppFilter_Success_and_Changed,
|
VppFilter_Success_and_Changed,
|
||||||
|
VppFilter_Changed_but_Hold,
|
||||||
};
|
};
|
||||||
|
|
||||||
enum f2v_vphase_type_e {
|
enum f2v_vphase_type_e {
|
||||||
|
|||||||
Reference in New Issue
Block a user