tvafe: optimize avin NTSC Purple and green junctions display for tl1 [1/1]
authorEvoke Zhang <evoke.zhang@amlogic.com>
Thu, 8 Aug 2019 11:02:26 +0000 (19:02 +0800)
committerTao Zeng <tao.zeng@amlogic.com>
Mon, 12 Aug 2019 08:32:32 +0000 (01:32 -0700)
PD#SWPL-8326

Problem:
Purple and green junctions the bright side is wider

Solution:
change UV_FILTER_TYPE setting

Verify:
x301

Change-Id: Ib42f311b637f0bbf8224adbb19105f728adfad88
Signed-off-by: Evoke Zhang <evoke.zhang@amlogic.com>
drivers/amlogic/media/vin/tvin/tvafe/tvafe_cvd.c
drivers/amlogic/media/vin/tvin/tvafe/tvafe_regs.h

index 0a90607..87ba42a 100644 (file)
@@ -489,6 +489,13 @@ static void tvafe_cvd2_write_mode_reg(struct tvafe_cvd2_s *cvd2,
                        ADAPTIVE_CHROMA_MODE_BIT, ADAPTIVE_CHROMA_MODE_WID);
                        W_APB_REG(CVD2_CHROMA_EDGE_ENHANCEMENT, 0x22);
                }
+               if (cvd2->config_fmt == TVIN_SIG_FMT_CVBS_NTSC_M) {
+                       if (tvafe_cpu_type() >= CPU_TYPE_TL1) {
+                               /* fix Purple and green junctions is wider */
+                               W_APB_BIT(CVD2_REG_FA, 0,
+                                       UV_FILTER_TYPE_BIT, UV_FILTER_TYPE_WID);
+                       }
+               }
        }
 #ifdef TVAFE_CVD2_CC_ENABLE
        W_APB_REG(CVD2_VBI_DATA_TYPE_LINE21, 0x00000011);
index 70834f4..a3223e0 100644 (file)
 #define VBI_FIXGATE_EN_WID              1
 
 #define CVD2_REG_FA                     ((CVD_BASE_ADD+0xFA)<<2)
+#define UV_FILTER_TYPE_BIT              7
+#define UV_FILTER_TYPE_WID              1
 #define VLINES_SEL_BIT                  6
 #define VLINES_SEL_WID                  1
 #define UV_FILTER_BYPASS_BIT            5