mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-07 19:30:30 +09:00
tvin: tvafe: fix black side on atv snow
PD#168366: tvin: tvafe: fix black side on atv snow Change-Id: I3e40ff3d6e9dbee5ba4db4f720ae3c2d7aebc690 Signed-off-by: Nian Jing <nian.jing@amlogic.com>
This commit is contained in:
@@ -643,22 +643,9 @@ bool tvafe_is_nosig(struct tvin_frontend_s *fe)
|
||||
if ((port >= TVIN_PORT_CVBS0) && (port <= TVIN_PORT_CVBS3)) {
|
||||
ret = tvafe_cvd2_no_sig(&tvafe->cvd2, &devp->mem);
|
||||
|
||||
/*fix black side when config atv snow*/
|
||||
if (ret && (port == TVIN_PORT_CVBS3) &&
|
||||
(devp->flags & TVAFE_FLAG_DEV_SNOW_FLAG) &&
|
||||
(tvafe->cvd2.config_fmt == TVIN_SIG_FMT_CVBS_PAL_I) &&
|
||||
(tvafe->cvd2.info.state != TVAFE_CVD2_STATE_FIND))
|
||||
tvafe_snow_config_acd();
|
||||
else if ((tvafe->cvd2.config_fmt == TVIN_SIG_FMT_CVBS_PAL_I) &&
|
||||
(tvafe->cvd2.info.state == TVAFE_CVD2_STATE_FIND) &&
|
||||
(port == TVIN_PORT_CVBS3))
|
||||
tvafe_snow_config_acd_resume();
|
||||
|
||||
/* normal sigal & adc reg error, reload source mux */
|
||||
if (tvafe->cvd2.info.adc_reload_en && !ret)
|
||||
|
||||
tvafe_set_source_muxing(port, devp->pinmux);
|
||||
|
||||
}
|
||||
|
||||
return ret;
|
||||
|
||||
@@ -640,13 +640,11 @@ static void tvafe_cvd2_non_std_config(struct tvafe_cvd2_s *cvd2)
|
||||
if ((cvd2->vd_port == TVIN_PORT_CVBS3) ||
|
||||
(cvd2->vd_port == TVIN_PORT_CVBS0)) {
|
||||
|
||||
#if ((defined CONFIG_AM_R840) || (defined CONFIG_AM_MXL661))
|
||||
/*config 0 for tuner R840/mxl661*/
|
||||
/*si2151 si2159 r842 may need set 1*/
|
||||
W_APB_BIT(CVD2_VSYNC_SIGNAL_THRESHOLD, 0,
|
||||
VS_SIGNAL_AUTO_TH_BIT, VS_SIGNAL_AUTO_TH_WID);
|
||||
#else
|
||||
W_APB_BIT(CVD2_VSYNC_SIGNAL_THRESHOLD, 1,
|
||||
VS_SIGNAL_AUTO_TH_BIT, VS_SIGNAL_AUTO_TH_WID);
|
||||
#endif
|
||||
|
||||
/* vsync signal is not good */
|
||||
W_APB_REG(CVD2_NOISE_THRESHOLD, 0x00);
|
||||
|
||||
@@ -2631,6 +2629,7 @@ void tvafe_snow_config_acd(void)
|
||||
/*0x8e035e is debug test result*/
|
||||
if (acd_h_config)
|
||||
W_APB_REG(ACD_REG_2D, acd_h_config);
|
||||
acd_h = acd_h_back;
|
||||
}
|
||||
/*only for pal-i*/
|
||||
void tvafe_snow_config_acd_resume(void)
|
||||
|
||||
@@ -335,6 +335,8 @@ extern void ldim_get_matrix(int *data, int reg_sel);
|
||||
extern void ldim_set_matrix(int *data, int reg_sel);
|
||||
extern void tvafe_snow_config(unsigned int onoff);
|
||||
extern void tvafe_snow_config_clamp(unsigned int onoff);
|
||||
extern void tvafe_snow_config_acd(void);
|
||||
extern void tvafe_snow_config_acd_resume(void);
|
||||
extern void vdin_vf_reg(struct vdin_dev_s *devp);
|
||||
extern void vdin_vf_unreg(struct vdin_dev_s *devp);
|
||||
extern void vdin_pause_dec(struct vdin_dev_s *devp);
|
||||
|
||||
@@ -332,8 +332,11 @@ void tvin_smr(struct vdin_dev_s *devp)
|
||||
++sm_p->state_cnt;
|
||||
#ifdef CONFIG_AMLOGIC_MEDIA_TVIN_AFE
|
||||
if ((port == TVIN_PORT_CVBS3) &&
|
||||
(devp->flags & VDIN_FLAG_SNOW_FLAG))
|
||||
(devp->flags & VDIN_FLAG_SNOW_FLAG)) {
|
||||
tvafe_snow_config_clamp(1);
|
||||
/*fix black side when config atv snow*/
|
||||
tvafe_snow_config_acd();
|
||||
}
|
||||
#endif
|
||||
if (sm_ops->nosig(devp->frontend)) {
|
||||
sm_p->exit_nosig_cnt = 0;
|
||||
@@ -472,8 +475,11 @@ void tvin_smr(struct vdin_dev_s *devp)
|
||||
devp->unstable_flag = true;
|
||||
#ifdef CONFIG_AMLOGIC_MEDIA_TVIN_AFE
|
||||
if ((port == TVIN_PORT_CVBS3) &&
|
||||
(devp->flags & VDIN_FLAG_SNOW_FLAG))
|
||||
(devp->flags & VDIN_FLAG_SNOW_FLAG)) {
|
||||
tvafe_snow_config_clamp(0);
|
||||
/*fix black side when config atv snow*/
|
||||
tvafe_snow_config_acd_resume();
|
||||
}
|
||||
#endif
|
||||
if (sm_ops->nosig(devp->frontend)) {
|
||||
nosig = true;
|
||||
|
||||
Reference in New Issue
Block a user