vdin: add game interlace drop bottom [1/1]

PD#SWPL-139287

Problem:
game interlace bypass di will jitter

Solution:
add game interlace drop bottom

Verify:
txhd2

Change-Id: I8d596454499461803066d3ce6260afd310e8252c
Signed-off-by: qiang.liu <qiang.liu@amlogic.com>
This commit is contained in:
qiang.liu
2023-09-11 20:58:17 +08:00
committed by gerrit autosubmit
parent c712cfba47
commit fa675ff48c
4 changed files with 11 additions and 6 deletions
@@ -2494,8 +2494,6 @@ void vdin_set_all_regs_s5(struct vdin_dev_s *devp)
/* bbar sub-module */
//vdin_set_bbar_s5(devp->addr_offset, devp->v_active, devp->h_active);
#ifdef CONFIG_AML_LOCAL_DIMMING
devp->h_active, devp->v_active);
/* ldim sub-module */
/* vdin_set_ldim_max_init(devp->addr_offset, 1920, 1080, 8, 2); */
vdin_set_ldim_max_init_s5(devp->addr_offset, devp->h_active,
+8 -4
View File
@@ -502,10 +502,13 @@ static bool vdin_need_game_mode(struct vdin_dev_s *devp)
// 1080i maybe has game mode demand
if ((devp->vdin_function_sel & VDIN_INTERLACE_GAME_MODE) &&
devp->fmt_info_p->scan_mode == TVIN_SCAN_MODE_INTERLACED &&
devp->fmt_info_p->v_active == 540)
devp->fmt_info_p->v_active == 540) {
if (devp->vdin_function_sel & VDIN_INTERLACE_DROP_BOTTOM)
devp->interlace_drop_bottom = true;
return true;
else
} else {
return false;
}
}
static void vdin_game_mode_check(struct vdin_dev_s *devp)
@@ -1633,6 +1636,7 @@ void vdin_stop_dec(struct vdin_dev_s *devp)
devp->game_mode_bak = 0;
devp->game_mode_chg = VDIN_GAME_MODE_UN_CHG;
devp->common_divisor = 0;
devp->interlace_drop_bottom = 0;
if ((devp->vdin_function_sel & VDIN_SELF_STOP_START) &&
devp->self_stop_start) {
@@ -3203,11 +3207,11 @@ irqreturn_t vdin_isr(int irq, void *dev_id)
* give up bottom field to avoid odd/even phase different
*/
trans_fmt = devp->parm.info.trans_fmt;
if (vdin_is_3d_interlace_signal(devp) &&
if ((vdin_is_3d_interlace_signal(devp) || devp->interlace_drop_bottom) &&
((last_field_type & VIDTYPE_INTERLACE_BOTTOM) ==
VIDTYPE_INTERLACE_BOTTOM)) {
devp->vdin_irq_flag = VDIN_IRQ_FLG_FMT_TRANS_CHG;
vdin_drop_frame_info(devp, "tran fmt chg");
vdin_drop_frame_info(devp, "3d tran fmt or game interlace");
goto irq_handled;
}
/* Check whether frame written done */
+2
View File
@@ -335,6 +335,7 @@ struct match_data_s {
#define VDIN_MUX_VDIN0_HIST BIT(15) //sel vdin0 hist for txhd2
#define VDIN_SET_PCS_RESET BIT(16) //for report_active abnormal callback rx pcs_reset
#define VDIN_AFBCE_DOLBY BIT(17)
#define VDIN_INTERLACE_DROP_BOTTOM BIT(18)
/* vdin_function_sel control bits end */
@@ -1007,6 +1008,7 @@ struct vdin_dev_s {
bool black_bar_enable;
bool hist_bar_enable;
bool rdma_not_register;
bool interlace_drop_bottom;
unsigned int ignore_frames;
/*use frame rate to cal duration*/
unsigned int use_frame_rate;
+1
View File
@@ -757,6 +757,7 @@ void tvin_sig_chg_event_process(struct vdin_dev_s *devp, u32 chg)
if (sm_debug_enable & VDIN_SM_LOG_L_1)
pr_info("vdin reconfig, set unstable\n");
devp->parm.info.status = TVIN_SIG_STATUS_UNSTABLE;
sm_dev[devp->index].state = TVIN_SM_STATUS_UNSTABLE;
devp->frame_drop_num = vdin_re_cfg_drop_cnt;
}
devp->pre_event_info.event_sts = devp->event_info.event_sts;