From 101c8e9cbbc07b4496d3a1dbdf716592902eff71 Mon Sep 17 00:00:00 2001 From: Evoke Zhang Date: Mon, 29 Jul 2019 15:56:45 +0800 Subject: [PATCH] tvafe: add more parameters for fine tune non-std signal [1/1] PD#TV-7783 Problem: some non-std signal is not stable Solution: add more parameters for fine tune non-std signal Verify: x301 Change-Id: I926833778569c4aa3a6eae45224a46eae97f3dcf Signed-off-by: Evoke Zhang --- .../dts/amlogic/tl1_t962x2_x301_1g_drm.dts | 6 + .../dts/amlogic/tl1_t962x2_x301_2g_drm.dts | 6 + .../dts/amlogic/tl1_t962x2_x301_1g_drm.dts | 6 + .../dts/amlogic/tl1_t962x2_x301_2g_drm.dts | 6 + drivers/amlogic/media/vin/tvin/tvafe/tvafe.c | 21 +++- drivers/amlogic/media/vin/tvin/tvafe/tvafe.h | 7 +- .../amlogic/media/vin/tvin/tvafe/tvafe_cvd.c | 112 +++++++++++------- .../amlogic/media/vin/tvin/tvafe/tvafe_cvd.h | 1 + .../media/vin/tvin/tvafe/tvafe_debug.c | 51 +++++++- 9 files changed, 164 insertions(+), 52 deletions(-) diff --git a/arch/arm/boot/dts/amlogic/tl1_t962x2_x301_1g_drm.dts b/arch/arm/boot/dts/amlogic/tl1_t962x2_x301_1g_drm.dts index efb814c86de3..92eb31b21013 100644 --- a/arch/arm/boot/dts/amlogic/tl1_t962x2_x301_1g_drm.dts +++ b/arch/arm/boot/dts/amlogic/tl1_t962x2_x301_1g_drm.dts @@ -645,6 +645,12 @@ * force_flag: force setting to std mode, default=0 */ nostd_vs_th = <0 0>; /* val, force_flag */ + /* no_vs_th: default=0xf0 + * vs_cntl: default=0x1, support 0x0~0x3 + * vloop_tc: default=0x2, support 0x0~0x3 + * dmd_clp_step: default=0x10 + */ + nostd_ctrl = <0xf0 0x1 0x2 0x10>; }; vbi { diff --git a/arch/arm/boot/dts/amlogic/tl1_t962x2_x301_2g_drm.dts b/arch/arm/boot/dts/amlogic/tl1_t962x2_x301_2g_drm.dts index 31d43afc8866..307f12c9e173 100644 --- a/arch/arm/boot/dts/amlogic/tl1_t962x2_x301_2g_drm.dts +++ b/arch/arm/boot/dts/amlogic/tl1_t962x2_x301_2g_drm.dts @@ -640,6 +640,12 @@ * force_flag: force setting to std mode, default=0 */ nostd_vs_th = <0 0>; /* val, force_flag */ + /* no_vs_th: default=0xf0 + * vs_cntl: default=0x1, support 0x0~0x3 + * vloop_tc: default=0x2, support 0x0~0x3 + * dmd_clp_step: default=0x10 + */ + nostd_ctrl = <0xf0 0x1 0x2 0x10>; }; vbi { diff --git a/arch/arm64/boot/dts/amlogic/tl1_t962x2_x301_1g_drm.dts b/arch/arm64/boot/dts/amlogic/tl1_t962x2_x301_1g_drm.dts index 2be39db34399..9c55819a3311 100644 --- a/arch/arm64/boot/dts/amlogic/tl1_t962x2_x301_1g_drm.dts +++ b/arch/arm64/boot/dts/amlogic/tl1_t962x2_x301_1g_drm.dts @@ -641,6 +641,12 @@ * force_flag: force setting to std mode, default=0 */ nostd_vs_th = <0 0>; /* val, force_flag */ + /* no_vs_th: default=0xf0 + * vs_cntl: default=0x1, support 0x0~0x3 + * vloop_tc: default=0x2, support 0x0~0x3 + * dmd_clp_step: default=0x10 + */ + nostd_ctrl = <0xf0 0x1 0x2 0x10>; }; vbi { diff --git a/arch/arm64/boot/dts/amlogic/tl1_t962x2_x301_2g_drm.dts b/arch/arm64/boot/dts/amlogic/tl1_t962x2_x301_2g_drm.dts index 0b708de6035a..a5aaf5a6f032 100644 --- a/arch/arm64/boot/dts/amlogic/tl1_t962x2_x301_2g_drm.dts +++ b/arch/arm64/boot/dts/amlogic/tl1_t962x2_x301_2g_drm.dts @@ -635,6 +635,12 @@ * force_flag: force setting to std mode, default=0 */ nostd_vs_th = <0 0>; /* val, force_flag */ + /* no_vs_th: default=0xf0 + * vs_cntl: default=0x1, support 0x0~0x3 + * vloop_tc: default=0x2, support 0x0~0x3 + * dmd_clp_step: default=0x10 + */ + nostd_ctrl = <0xf0 0x1 0x2 0x10>; }; vbi { diff --git a/drivers/amlogic/media/vin/tvin/tvafe/tvafe.c b/drivers/amlogic/media/vin/tvin/tvafe/tvafe.c index 46a1d09315d0..a4138aea8a51 100644 --- a/drivers/amlogic/media/vin/tvin/tvafe/tvafe.c +++ b/drivers/amlogic/media/vin/tvin/tvafe/tvafe.c @@ -136,9 +136,14 @@ static struct tvafe_user_param_s tvafe_user_param = { * bit[0]: auto cdto */ .auto_adj_en = 0x3e, + .vline_chk_cnt = 100, /* 100*10ms */ .nostd_vs_th = 0x0, + .nostd_no_vs_th = 0xf0, + .nostd_vs_cntl = 0x1, + .nostd_vloop_tc = 0x2, .force_vs_th_flag = 0, .nostd_stable_cnt = 3, + .nostd_dmd_clp_step = 0x10, /*4 is the test result@20171101 on fluke-54200 and DVD*/ .skip_vf_num = 4, @@ -1226,8 +1231,7 @@ static void tvafe_user_parameters_config(struct device_node *of_node) tvafe_user_param.auto_adj_en = val[0]; } - ret = of_property_read_u32_array(of_node, "nostd_vs_th", - val, 2); + ret = of_property_read_u32_array(of_node, "nostd_vs_th", val, 2); if (ret == 0) { tvafe_user_param.nostd_vs_th = val[0]; tvafe_user_param.force_vs_th_flag = val[1]; @@ -1235,6 +1239,19 @@ static void tvafe_user_parameters_config(struct device_node *of_node) tvafe_user_param.nostd_vs_th, tvafe_user_param.force_vs_th_flag); } + + ret = of_property_read_u32_array(of_node, "nostd_ctrl", val, 4); + if (ret == 0) { + tvafe_user_param.nostd_no_vs_th = val[0]; + tvafe_user_param.nostd_vs_cntl = val[1]; + tvafe_user_param.nostd_vloop_tc = val[2]; + tvafe_user_param.nostd_dmd_clp_step = val[3]; + tvafe_pr_info("find nostd_ctrl: 0x%x 0x%x 0x%x 0x%x\n", + tvafe_user_param.nostd_no_vs_th, + tvafe_user_param.nostd_vs_cntl, + tvafe_user_param.nostd_vloop_tc, + tvafe_user_param.nostd_dmd_clp_step); + } } struct meson_tvafe_data meson_gxtvbb_tvafe_data = { diff --git a/drivers/amlogic/media/vin/tvin/tvafe/tvafe.h b/drivers/amlogic/media/vin/tvin/tvafe/tvafe.h index 0924be4a9a3b..7fe7370d0153 100644 --- a/drivers/amlogic/media/vin/tvin/tvafe/tvafe.h +++ b/drivers/amlogic/media/vin/tvin/tvafe/tvafe.h @@ -32,7 +32,7 @@ /* ************************************************* */ /* *** macro definitions ********************************************* */ /* *********************************************************** */ -#define TVAFE_VER "Ref.2019/07/02" +#define TVAFE_VER "Ref.2019/08/08" /* used to set the flag of tvafe_dev_s */ #define TVAFE_FLAG_DEV_OPENED 0x00000010 @@ -73,9 +73,14 @@ struct tvafe_user_param_s { unsigned int cutwindow_val_v[5]; unsigned int cutwindow_val_vs_ve; unsigned int auto_adj_en; + unsigned int vline_chk_cnt; unsigned int nostd_vs_th; + unsigned int nostd_no_vs_th; + unsigned int nostd_vs_cntl; + unsigned int nostd_vloop_tc; unsigned int force_vs_th_flag; unsigned int nostd_stable_cnt; + unsigned int nostd_dmd_clp_step; unsigned int skip_vf_num; unsigned int avout_en; }; diff --git a/drivers/amlogic/media/vin/tvin/tvafe/tvafe_cvd.c b/drivers/amlogic/media/vin/tvin/tvafe/tvafe_cvd.c index 003888700f72..951bd60c5e55 100644 --- a/drivers/amlogic/media/vin/tvin/tvafe/tvafe_cvd.c +++ b/drivers/amlogic/media/vin/tvin/tvafe/tvafe_cvd.c @@ -108,21 +108,12 @@ static const unsigned int cvd_mem_4f_length[TVIN_SIG_FMT_CVBS_SECAM- 0x00015a60, /* TVIN_SIG_FMT_CVBS_SECAM, */ }; -static int cnt_dbg_en; static int force_fmt_flag; -static unsigned int scene_colorful = 1; -static int scene_colorful_old; -static int auto_de_en = 1; +static bool scene_colorful_old; static int lock_cnt; static unsigned int cvd_reg8a = 0xa; static bool ntsc50_en; -module_param(auto_de_en, int, 0664); -MODULE_PARM_DESC(auto_de_en, "auto_de_en\n"); - -module_param(cnt_dbg_en, int, 0664); -MODULE_PARM_DESC(cnt_dbg_en, "cnt_dbg_en\n"); - static int cdto_adj_th = TVAFE_CVD2_CDTO_ADJ_TH; module_param(cdto_adj_th, int, 0664); MODULE_PARM_DESC(cdto_adj_th, "cvd2_adj_diff_threshold"); @@ -147,12 +138,6 @@ MODULE_PARM_DESC(config_force_fmt, /*3:force don't nonstandard configure*/ unsigned int force_nostd = 2; -/*0x001:enable cdto adj 0x010:enable 3d adj 0x100:enable pga;*/ -/*0x1000:enable hs adj,which can instead cdto*/ -static unsigned int cvd_isr_en = 0x1110; -module_param(cvd_isr_en, uint, 0644); -MODULE_PARM_DESC(cvd_isr_en, "cvd_isr_en\n"); - static int ignore_pal_nt; module_param(ignore_pal_nt, int, 0644); MODULE_PARM_DESC(ignore_pal_nt, "ignore_pal_nt\n"); @@ -452,8 +437,8 @@ static void tvafe_cvd2_write_mode_reg(struct tvafe_cvd2_s *cvd2, (cvd2->vd_port == TVIN_PORT_CVBS0)) { /* atv */ if (cvd2->config_fmt == TVIN_SIG_FMT_CVBS_PAL_I) { if (user_param->force_vs_th_flag) - W_APB_BIT(CVD2_VSYNC_SIGNAL_THRESHOLD, - user_param->nostd_vs_th, 0, 8); + W_APB_REG(CVD2_VSYNC_SIGNAL_THRESHOLD, + (user_param->nostd_vs_th & 0xff)); } } @@ -622,7 +607,7 @@ void tvafe_cvd2_non_std_config(struct tvafe_cvd2_s *cvd2) W_APB_BIT(CVD2_VSYNC_SIGNAL_THRESHOLD, 1, VS_SIGNAL_AUTO_TH_BIT, VS_SIGNAL_AUTO_TH_WID); W_APB_REG(CVD2_NOISE_THRESHOLD, 0x04); - if (scene_colorful) + if (cvd2->info.scene_colorful) W_APB_REG(CVD2_VSYNC_CNTL, 0x02); if (noise_strenth > 48 && NOISE_JUDGE) W_APB_BIT(CVD2_H_LOOP_MAXSTATE, 4, @@ -645,7 +630,7 @@ void tvafe_cvd2_non_std_config(struct tvafe_cvd2_s *cvd2) else W_APB_BIT(CVD2_H_LOOP_MAXSTATE, 5, HSTATE_MAX_BIT, HSTATE_MAX_WID); - if (scene_colorful) + if (cvd2->info.scene_colorful) W_APB_REG(CVD2_VSYNC_CNTL, 0x02); W_APB_REG(CVD2_VSYNC_SIGNAL_THRESHOLD, 0x10); W_APB_REG(CVD2_NOISE_THRESHOLD, 0x08); @@ -660,15 +645,29 @@ void tvafe_cvd2_non_std_config(struct tvafe_cvd2_s *cvd2) /*config 0 for tuner R840/mxl661*/ /*si2151 si2159 r842 may need set 1*/ - W_APB_BIT(CVD2_VSYNC_SIGNAL_THRESHOLD, - user_param->nostd_vs_th, 0, 8); + W_APB_REG(CVD2_VSYNC_SIGNAL_THRESHOLD, + (user_param->nostd_vs_th & 0xff)); + W_APB_BIT(CVD2_VSYNC_NO_SIGNAL_THRESHOLD, + (user_param->nostd_no_vs_th & 0xff), + VS_NO_SIGNAL_TH_BIT, VS_NO_SIGNAL_TH_WID); + W_APB_BIT(CVD2_VSYNC_CNTL, + (user_param->nostd_vs_cntl & 0x3), + VS_CNTL_BIT, VS_CNTL_WID); + W_APB_BIT(CVD2_VSYNC_TIME_CONSTANT, + (user_param->nostd_vloop_tc & 0x3), + VLOOP_TC_BIT, VLOOP_TC_WID); + + W_APB_BIT(TVFE_ATV_DMD_CLP_CTRL, + (user_param->nostd_dmd_clp_step & 0xfffff), + ATV_DMD_IN_CLAMP_STEP_BIT, + ATV_DMD_IN_CLAMP_STEP_WID); /* vsync signal is not good */ W_APB_REG(CVD2_NOISE_THRESHOLD, 0x00); } else { - if (scene_colorful) + if (cvd2->info.scene_colorful) W_APB_REG(CVD2_VSYNC_CNTL, 0x02); W_APB_BIT(CVD2_VSYNC_SIGNAL_THRESHOLD, 1, VS_SIGNAL_AUTO_TH_BIT, VS_SIGNAL_AUTO_TH_WID); @@ -697,9 +696,10 @@ void tvafe_cvd2_non_std_config(struct tvafe_cvd2_s *cvd2) W_APB_REG(CVD2_VSYNC_SIGNAL_THRESHOLD, 0xf0); W_APB_REG(CVD2_VSYNC_CNTL, 0x2); - if (tvafe_dbg_print & TVAFE_DBG_NOSTD) + if (tvafe_dbg_print & TVAFE_DBG_NOSTD) { tvafe_pr_info("%s: out of non-std signal.rssi=%d\n", __func__, cvd_get_rf_strength()); + } } #else @@ -707,15 +707,22 @@ void tvafe_cvd2_non_std_config(struct tvafe_cvd2_s *cvd2) SYNC_SENSITIVITY) { W_APB_REG(CVD2_VSYNC_SIGNAL_THRESHOLD, 0xf0); W_APB_REG(CVD2_VSYNC_CNTL, 0x2); - if (tvafe_dbg_print & TVAFE_DBG_NOSTD) + if (tvafe_dbg_print & TVAFE_DBG_NOSTD) { tvafe_pr_info("%s: use the cvd register to judge the rssi.rssi=%u\n", - __func__, R_APB_REG(CVD2_SYNC_NOISE_STATUS)); + __func__, + R_APB_REG(CVD2_SYNC_NOISE_STATUS)); + } } #endif else{ W_APB_REG(CVD2_VSYNC_CNTL, 0x01); - W_APB_BIT(CVD2_VSYNC_SIGNAL_THRESHOLD, 0, - VS_SIGNAL_AUTO_TH_BIT, VS_SIGNAL_AUTO_TH_WID); + if (user_param->force_vs_th_flag) { + W_APB_REG(CVD2_VSYNC_SIGNAL_THRESHOLD, + (user_param->nostd_vs_th & 0xff)); + } else { + W_APB_REG(CVD2_VSYNC_SIGNAL_THRESHOLD, + 0); + } } W_APB_REG(CVD2_NOISE_THRESHOLD, 0x32); W_APB_BIT(CVD2_ACTIVE_VIDEO_VSTART, 0x2a, @@ -824,6 +831,15 @@ void tvafe_cvd2_set_default_cdto(struct tvafe_cvd2_s *cvd2) } #endif +static void tvafe_cvd2_info_init(struct tvafe_cvd2_s *cvd2) +{ + /* init variable */ + memset(&cvd2->info, 0, sizeof(struct tvafe_cvd2_info_s)); + + /* set default value if needed */ + cvd2->info.scene_colorful = 1; +} + /* * tvafe cvd2 write Reg table by different format */ @@ -846,8 +862,7 @@ inline void tvafe_cvd2_try_format(struct tvafe_cvd2_s *cvd2, __func__, tvin_sig_fmt_str(fmt)); cvd2->config_fmt = fmt; tvafe_cvd2_write_mode_reg(cvd2, mem); - /* init variable */ - memset(&cvd2->info, 0, sizeof(struct tvafe_cvd2_info_s)); + tvafe_cvd2_info_init(cvd2); } } @@ -1199,11 +1214,12 @@ static void tvafe_cvd2_non_std_signal_det(struct tvafe_cvd2_s *cvd2) chroma_sum_filt = chroma_sum_filt_tmp; if (chroma_sum_filt >= SCENE_COLORFUL_TH) - scene_colorful = 1; + cvd2->info.scene_colorful = 1; else - scene_colorful = 0; + cvd2->info.scene_colorful = 0; - if ((cvd2->hw.h_nonstd | (cvd2->hw.v_nonstd && scene_colorful)) && + if ((cvd2->hw.h_nonstd || + (cvd2->hw.v_nonstd && cvd2->info.scene_colorful)) && (cvd2->info.nonstd_cnt < CVD2_NONSTD_CNT_INC_LIMIT)) { cvd2->info.nonstd_cnt += CVD2_NONSTD_CNT_INC_STEP; @@ -1242,11 +1258,13 @@ static void tvafe_cvd2_non_std_signal_det(struct tvafe_cvd2_s *cvd2) cvd2->info.nonstd_stable_cnt = 0; if (tvafe_dbg_print & TVAFE_DBG_NOSTD) { tvafe_pr_info("%s: scene_colorful = %d, chroma_sum_filt = %ld, hw_h_nonstd=%d, hw_v_nonstd=%d\n", - __func__, scene_colorful, chroma_sum_filt, + __func__, cvd2->info.scene_colorful, + chroma_sum_filt, cvd2->hw.h_nonstd, cvd2->hw.v_nonstd); - tvafe_pr_info("%s: smr_cnt=%d, nonstd_cnt=%d, nonstd_flag=%d, dgain=0x%x, non_std_enable=%d\n", + tvafe_pr_info("%s: smr_cnt=%d, nonstd_cnt=%d, stabl_cnt=%d, nonstd_flag=%d, dgain=0x%x, non_std_enable=%d\n", __func__, cvd2->info.smr_cnt, cvd2->info.nonstd_cnt, + cvd2->info.nonstd_stable_cnt, cvd2->info.nonstd_flag, dgain, cvd2->info.non_std_enable); } @@ -1262,13 +1280,14 @@ static void tvafe_cvd2_non_std_signal_det(struct tvafe_cvd2_s *cvd2) cvd2->info.nonstd_stable_cnt++; if (tvafe_dbg_print & TVAFE_DBG_NOSTD) { tvafe_pr_info("%s: scene_colorful = %d, chroma_sum_filt = %ld, hw_h_nonstd=%d, hw_v_nonstd=%d\n", - __func__, scene_colorful, + __func__, cvd2->info.scene_colorful, chroma_sum_filt, cvd2->hw.h_nonstd, cvd2->hw.v_nonstd); - tvafe_pr_info("%s: smr_cnt=%d, nonstd_cnt=%d, nonstd_flag=%d, dgain=0x%x, non_std_enable=%d\n", + tvafe_pr_info("%s: smr_cnt=%d, nonstd_cnt=%d, stabl_cnt=%d, nonstd_flag=%d, dgain=0x%x, non_std_enable=%d\n", __func__, cvd2->info.smr_cnt, cvd2->info.nonstd_cnt, + cvd2->info.nonstd_stable_cnt, cvd2->info.nonstd_flag, dgain, cvd2->info.non_std_enable); } @@ -1882,10 +1901,12 @@ static void tvafe_cvd2_auto_de(struct tvafe_cvd2_s *cvd2) l_min = lines->val[i]; l_ave += lines->val[i]; } - if (lines->check_cnt++ == TVAFE_CVD2_AUTO_DE_CHECK_CNT) { + if (lines->check_cnt++ == user_param->vline_chk_cnt) { lines->check_cnt = 0; - /* if (tvafe_dbg_print & TVAFE_DBG_SMR) */ - /* tvafe_pr_info("%s: check lines every 100*10ms\n", __func__); */ + if (tvafe_dbg_print & TVAFE_DBG_SMR) { + tvafe_pr_info("%s: check lines every %d*10ms\n", + __func__, user_param->vline_chk_cnt); + } l_ave = (l_ave - l_max - l_min + 1) >> 1; /* get the average value */ if (l_ave > TVAFE_CVD2_AUTO_DE_TH) { @@ -1948,9 +1969,9 @@ static void tvafe_cvd2_adj_vs(struct tvafe_cvd2_s *cvd2) l_min = lines->val[i]; l_ave += lines->val[i]; } - if (lines->check_cnt++ == TVAFE_CVD2_AUTO_DE_CHECK_CNT) - lines->check_cnt = TVAFE_CVD2_AUTO_DE_CHECK_CNT; - if (lines->check_cnt == TVAFE_CVD2_AUTO_DE_CHECK_CNT) { + if (lines->check_cnt++ == user_param->vline_chk_cnt) + lines->check_cnt = user_param->vline_chk_cnt; + if (lines->check_cnt == user_param->vline_chk_cnt) { l_ave = (l_ave - l_max - l_min + 1) >> 1; if (l_ave > TVAFE_CVD2_AUTO_VS_TH) { cvd2->info.vs_adj_en = 1; @@ -2033,8 +2054,7 @@ static void tvafe_cvd2_reinit(struct tvafe_cvd2_s *cvd2) if (tvafe_dbg_print & TVAFE_DBG_SMR) pr_info("[tvafe..] %s: reset auto de.\n", __func__); } - /* init variable */ - memset(&cvd2->info, 0, sizeof(struct tvafe_cvd2_info_s)); + tvafe_cvd2_info_init(cvd2); cvd2->cvd2_init_en = true; if (tvafe_dbg_print & TVAFE_DBG_SMR) @@ -2072,7 +2092,7 @@ inline bool tvafe_cvd2_no_sig(struct tvafe_cvd2_s *cvd2, ret = false; cvd2->cvd2_init_en = false; #ifdef TVAFE_CVD2_AUTO_DE_ENABLE - if ((!scene_colorful) && + if ((!cvd2->info.scene_colorful) && ((user_param->auto_adj_en & TVAFE_AUTO_DE) || (user_param->auto_adj_en & TVAFE_AUTO_VS))) { tvafe_cvd2_auto_de(cvd2); diff --git a/drivers/amlogic/media/vin/tvin/tvafe/tvafe_cvd.h b/drivers/amlogic/media/vin/tvin/tvafe/tvafe_cvd.h index 5e2a15958324..ee0fc33f30df 100644 --- a/drivers/amlogic/media/vin/tvin/tvafe/tvafe_cvd.h +++ b/drivers/amlogic/media/vin/tvin/tvafe/tvafe_cvd.h @@ -141,6 +141,7 @@ struct tvafe_cvd2_info_s { unsigned short nonstd_cnt; unsigned short nonstd_stable_cnt; unsigned short nonstd_print_cnt; + bool scene_colorful; bool nonstd_flag; bool nonstd_flag_adv; bool non_std_enable; diff --git a/drivers/amlogic/media/vin/tvin/tvafe/tvafe_debug.c b/drivers/amlogic/media/vin/tvin/tvafe/tvafe_debug.c index d5788ad330f7..b6a7d6e86af9 100644 --- a/drivers/amlogic/media/vin/tvin/tvafe/tvafe_debug.c +++ b/drivers/amlogic/media/vin/tvin/tvafe/tvafe_debug.c @@ -97,6 +97,8 @@ static void tvafe_state(struct tvafe_dev_s *devp) tvafe_pr_info("tvafe_cvd2_info_s->state:0x%x\n", cvd2_info->state); tvafe_pr_info("tvafe_cvd2_info_s->state_cnt:%d\n", cvd2_info->state_cnt); + tvafe_pr_info("tvafe_cvd2_info_s->scene_colorful:%d\n", + cvd2_info->scene_colorful); tvafe_pr_info("tvafe_cvd2_info_s->non_std_enable:%d\n", cvd2_info->non_std_enable); tvafe_pr_info("tvafe_cvd2_info_s->non_std_config:%d\n", @@ -193,7 +195,8 @@ static void tvafe_state(struct tvafe_dev_s *devp) } tvafe_pr_info("cutwindow_val_vs_ve:%d\n", user_param->cutwindow_val_vs_ve); - tvafe_pr_info("auto_adj_en:%d\n", user_param->auto_adj_en); + tvafe_pr_info("auto_adj_en:0x%x\n", user_param->auto_adj_en); + tvafe_pr_info("vline_chk_cnt:%d\n", user_param->vline_chk_cnt); tvafe_pr_info("nostd_vs_th:0x%x\n", user_param->nostd_vs_th); tvafe_pr_info("nostd_no_vs_th:0x%x\n", user_param->nostd_no_vs_th); tvafe_pr_info("nostd_vs_cntl:0x%x\n", user_param->nostd_vs_cntl); @@ -371,7 +374,7 @@ static ssize_t tvafe_store(struct device *dev, &user_param->force_vs_th_flag) < 0) goto tvafe_store_err; } - pr_info("[tvafe..]%s: force_vs_th_flag = 0x%x\n", + pr_info("[tvafe..]%s: force_vs_th_flag = %d\n", __func__, user_param->force_vs_th_flag); } else if (!strncmp(buff, "nostd_vs_th", strlen("nostd_vs_th"))) { if (parm[1]) { @@ -381,13 +384,37 @@ static ssize_t tvafe_store(struct device *dev, } pr_info("[tvafe..]%s: nostd_vs_th = 0x%x\n", __func__, user_param->nostd_vs_th); + } else if (!strncmp(buff, "nostd_no_vs_th", strlen("nostd_no_vs_th"))) { + if (parm[1]) { + if (kstrtouint(parm[1], 16, + &user_param->nostd_no_vs_th) < 0) + goto tvafe_store_err; + } + pr_info("[tvafe..]%s: nostd_no_vs_th = 0x%x\n", + __func__, user_param->nostd_no_vs_th); + } else if (!strncmp(buff, "nostd_vs_cntl", strlen("nostd_vs_cntl"))) { + if (parm[1]) { + if (kstrtouint(parm[1], 16, + &user_param->nostd_vs_cntl) < 0) + goto tvafe_store_err; + } + pr_info("[tvafe..]%s: nostd_vs_cntl = 0x%x\n", + __func__, user_param->nostd_vs_cntl); + } else if (!strncmp(buff, "nostd_vloop_tc", strlen("nostd_vloop_tc"))) { + if (parm[1]) { + if (kstrtouint(parm[1], 16, + &user_param->nostd_vloop_tc) < 0) + goto tvafe_store_err; + } + pr_info("[tvafe..]%s: nostd_vloop_tc = 0x%x\n", + __func__, user_param->nostd_vloop_tc); } else if (!strncmp(buff, "nostd_cnt", strlen("nostd_cnt"))) { if (parm[1]) { if (kstrtouint(parm[1], 10, &user_param->nostd_stable_cnt) < 0) goto tvafe_store_err; } - pr_info("[tvafe..]%s: nostd_stable_cnt = 0x%x\n", + pr_info("[tvafe..]%s: nostd_stable_cnt = %d\n", __func__, user_param->nostd_stable_cnt); } else if (!strncmp(buff, "auto_adj", strlen("auto_adj"))) { if (parm[1]) { @@ -397,6 +424,24 @@ static ssize_t tvafe_store(struct device *dev, } pr_info("[tvafe..]%s: auto_adj_en = 0x%x\n", __func__, user_param->auto_adj_en); + } else if (!strncmp(buff, "vline_chk_cnt", + strlen("vline_chk_cnt"))) { + if (parm[1]) { + if (kstrtouint(parm[1], 10, + &user_param->vline_chk_cnt) < 0) + goto tvafe_store_err; + } + pr_info("[tvafe..]%s: vline_chk_cnt = 0x%x\n", + __func__, user_param->vline_chk_cnt); + } else if (!strncmp(buff, "nostd_dmd_clp_step", + strlen("nostd_dmd_clp_step"))) { + if (parm[1]) { + if (kstrtouint(parm[1], 16, + &user_param->nostd_dmd_clp_step) < 0) + goto tvafe_store_err; + } + pr_info("[tvafe..]%s: nostd_dmd_clp_step = 0x%x\n", + __func__, user_param->nostd_dmd_clp_step); } else if (!strncmp(buff, "skip_vf_num", strlen("skip_vf_num"))) { if (parm[1]) { if (kstrtouint(parm[1], 10,