From c7abf3c23a55d68b408714a5acd02cf380e63e88 Mon Sep 17 00:00:00 2001 From: Evoke Zhang Date: Thu, 8 Aug 2019 19:02:26 +0800 Subject: [PATCH] tvafe: optimize avin NTSC Purple and green junctions display for tl1 [1/1] 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 --- drivers/amlogic/media/vin/tvin/tvafe/tvafe_cvd.c | 7 +++++++ drivers/amlogic/media/vin/tvin/tvafe/tvafe_regs.h | 2 ++ 2 files changed, 9 insertions(+) diff --git a/drivers/amlogic/media/vin/tvin/tvafe/tvafe_cvd.c b/drivers/amlogic/media/vin/tvin/tvafe/tvafe_cvd.c index 0a90607..87ba42a 100644 --- a/drivers/amlogic/media/vin/tvin/tvafe/tvafe_cvd.c +++ b/drivers/amlogic/media/vin/tvin/tvafe/tvafe_cvd.c @@ -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); diff --git a/drivers/amlogic/media/vin/tvin/tvafe/tvafe_regs.h b/drivers/amlogic/media/vin/tvin/tvafe/tvafe_regs.h index 70834f4..a3223e0 100644 --- a/drivers/amlogic/media/vin/tvin/tvafe/tvafe_regs.h +++ b/drivers/amlogic/media/vin/tvin/tvafe/tvafe_regs.h @@ -3896,6 +3896,8 @@ #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 -- 2.7.4