tvafe: fix vertical stripes for tl1 [1/1]
authorNian Jing <nian.jing@amlogic.com>
Tue, 26 Mar 2019 09:35:49 +0000 (17:35 +0800)
committerTao Zeng <tao.zeng@amlogic.com>
Fri, 29 Mar 2019 05:54:16 +0000 (22:54 -0700)
PD#SWPL-6349

Problem:
av vertical stripes on colobar

Solution:
fix vertical stripes

Verify:
verify on x301

Change-Id: I590f2b1da9b9a8f36973b00973b70a1c1c9dfb9e
Signed-off-by: Nian Jing <nian.jing@amlogic.com>
drivers/amlogic/media/vin/tvin/tvafe/tvafe_cvd.c

index 31ffdde..57fb669 100644 (file)
@@ -553,11 +553,13 @@ static void tvafe_cvd2_write_mode_reg(struct tvafe_cvd2_s *cvd2,
        }
 
        /*set for wipe off vertical stripes*/
-       if ((cvd2->vd_port > TVIN_PORT_CVBS0) &&
-               (cvd2->vd_port <= TVIN_PORT_CVBS3) &&
-               (cvd2->vd_port != TVIN_PORT_CVBS3) &&
-               (tvafe_cpu_type() >= CPU_TYPE_TXL))
-               W_APB_REG(ACD_REG_25, 0x00e941a8);
+       if (cvd2->vd_port == TVIN_PORT_CVBS1 ||
+               cvd2->vd_port == TVIN_PORT_CVBS2) {
+               if (tvafe_cpu_type() >= CPU_TYPE_TL1)
+                       W_APB_REG(ACD_REG_25, 0xeafb4e8e);
+               else if (tvafe_cpu_type() >= CPU_TYPE_TXL)
+                       W_APB_REG(ACD_REG_25, 0x00e941a8);
+       }
 
        /* enable CVD2 */
        W_APB_BIT(CVD2_RESET_REGISTER, 0, SOFT_RST_BIT, SOFT_RST_WID);