From 70e44173d13f6397abae1c44b71aba55212ffeb3 Mon Sep 17 00:00:00 2001 From: Wenfeng Guo Date: Fri, 24 May 2019 15:41:26 +0800 Subject: [PATCH] vdin: fix input secam signal colorbar scale line jitter [2/2] PD#SWPL-8878 Problem: input secam signal colorbar scale line jitter Solution: setting some register for secam signal Verify: tl1 Change-Id: I59c370c2ab3f92c904b506d26022b165d521776c Signed-off-by: Wenfeng Guo --- drivers/amlogic/media/vin/tvin/tvin_format_table.c | 2 +- drivers/amlogic/media/vin/tvin/vdin/vdin_ctl.c | 6 +++++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/drivers/amlogic/media/vin/tvin/tvin_format_table.c b/drivers/amlogic/media/vin/tvin/tvin_format_table.c index e952d03..34ced0c 100644 --- a/drivers/amlogic/media/vin/tvin/tvin_format_table.c +++ b/drivers/amlogic/media/vin/tvin/tvin_format_table.c @@ -1255,7 +1255,7 @@ const unsigned int cvd_part3_table[TVIN_SIG_FMT_CVBS_NTSC_50 - }, /* TVIN_SIG_FMT_CVBS_PAL_CN, */ { 0x00000000, 0x98000000, 0x0000FF08, 0x00000000, 0x8b000000, - 0x0000008c, 0x00000080 + 0x0000008c, 0x00000020 }, /* TVIN_SIG_FMT_CVBS_SECAM, */ { 0x00000000, 0x98000000, 0x0000FF08, 0x00000000, 0x8b000000, diff --git a/drivers/amlogic/media/vin/tvin/vdin/vdin_ctl.c b/drivers/amlogic/media/vin/tvin/vdin/vdin_ctl.c index c8ac243..c37ba4b 100644 --- a/drivers/amlogic/media/vin/tvin/vdin/vdin_ctl.c +++ b/drivers/amlogic/media/vin/tvin/vdin/vdin_ctl.c @@ -1621,7 +1621,8 @@ void vdin_set_matrix(struct vdin_dev_s *devp) devp->color_range_mode); #ifdef CONFIG_AMLOGIC_MEDIA_ENHANCEMENT_DOLBYVISION if ((devp->dv.dolby_input & (1 << devp->index)) || - (devp->dv.dv_flag && is_dolby_vision_enable())) + (devp->dv.dv_flag && is_dolby_vision_enable()) || + devp->parm.info.fmt == TVIN_SIG_FMT_CVBS_SECAM) wr_bits(offset, VDIN_MATRIX_CTRL, 0, VDIN_MATRIX_EN_BIT, VDIN_MATRIX_EN_WID); #endif @@ -1653,6 +1654,9 @@ void vdin_set_matrix(struct vdin_dev_s *devp) devp->prop.color_fmt_range, devp->prop.vdin_hdr_Flag, devp->color_range_mode); + if (devp->parm.info.fmt == TVIN_SIG_FMT_CVBS_SECAM) + wr_bits(offset, VDIN_MATRIX_CTRL, 0, + VDIN_MATRIX_EN_BIT, VDIN_MATRIX_EN_WID); /* set xy */ wr_bits(offset, VDIN_MATRIX_PROBE_POS, rgb_info_y, PROBE_POX_Y_BIT, PROBE_POX_Y_WID); -- 2.7.4