amvecm: fix pq load fail
authorMingLiang Dong <mingliang.dong@amlogic.com>
Sat, 3 Feb 2018 05:54:10 +0000 (13:54 +0800)
committerMingliang Dong <mingliang.dong@amlogic.com>
Mon, 5 Feb 2018 11:34:45 +0000 (03:34 -0800)
PD#158996: amvecm: fix pq load fail

Change-Id: I23d26427ebff2d13c2ea95ffa0b97c9b9a14f865
Signed-off-by: MingLiang Dong <mingliang.dong@amlogic.com>
drivers/amlogic/media/enhancement/amvecm/amve.c
drivers/amlogic/media/enhancement/amvecm/arch/ve_regs.h
drivers/amlogic/media/video_sink/video.c

index 8341619..a0f86c0 100644 (file)
@@ -3971,10 +3971,12 @@ void ve_enable_dnlp(void)
        ve_en = 1;
 /* #ifdef NEW_DNLP_IN_SHARPNESS */
 /* if(dnlp_sel == NEW_DNLP_IN_SHARPNESS){ */
-       if (is_meson_gxtvbb_cpu() &&
-               (dnlp_sel == NEW_DNLP_IN_SHARPNESS))
-               WRITE_VPP_REG_BITS(SRSHARP0_DNLP_EN, 1, 0, 1);
-       else
+       if (dnlp_sel == NEW_DNLP_IN_SHARPNESS) {
+               if (is_meson_gxlx_cpu())
+                       WRITE_VPP_REG_BITS(SRSHARP1_DNLP_EN, 1, 0, 1);
+               else
+                       WRITE_VPP_REG_BITS(SRSHARP0_DNLP_EN, 1, 0, 1);
+       } else
                /* #endif */
                WRITE_VPP_REG_BITS(VPP_VE_ENABLE_CTRL,
                                1, DNLP_EN_BIT, DNLP_EN_WID);
@@ -3983,17 +3985,14 @@ void ve_enable_dnlp(void)
 void ve_disable_dnlp(void)
 {
        ve_en = 0;
-/* #ifdef NEW_DNLP_IN_SHARPNESS */
-/* if(dnlp_sel == NEW_DNLP_IN_SHARPNESS){ */
-       if (is_meson_gxtvbb_cpu() &&
-               (dnlp_sel == NEW_DNLP_IN_SHARPNESS))
-               WRITE_VPP_REG_BITS(SRSHARP0_DNLP_EN, 0, 0, 1);
+       if (dnlp_sel == NEW_DNLP_IN_SHARPNESS)
+               if (is_meson_gxlx_cpu())
+                       WRITE_VPP_REG_BITS(SRSHARP1_DNLP_EN, 0, 0, 1);
+               else
+                       WRITE_VPP_REG_BITS(SRSHARP0_DNLP_EN, 0, 0, 1);
        else
-/* #endif */
-/* { */
                WRITE_VPP_REG_BITS(VPP_VE_ENABLE_CTRL,
                                0, DNLP_EN_BIT, DNLP_EN_WID);
-/* } */
 }
 
 void ve_set_dnlp(struct ve_dnlp_s *p)
index 89ae0c8..bc38b62 100644 (file)
 #define SRSHARP0_DNLP_15                                       0x3255
 #define SRSHARP0_DEMO_CRTL                                     0x3256
 
+#define SRSHARP1_DNLP_EN                                       0x32c5
+#define SRSHARP1_DNLP_00                                       0x32c6
+#define SRSHARP1_DNLP_01                                       0x32c7
+#define SRSHARP1_DNLP_02                                       0x32c8
+#define SRSHARP1_DNLP_03                                       0x32c9
+#define SRSHARP1_DNLP_04                                       0x32ca
+#define SRSHARP1_DNLP_05                                       0x32cb
+#define SRSHARP1_DNLP_06                                       0x32cc
+#define SRSHARP1_DNLP_07                                       0x32cd
+#define SRSHARP1_DNLP_08                                       0x32ce
+#define SRSHARP1_DNLP_09                                       0x32cf
+#define SRSHARP1_DNLP_10                                       0x32d0
+#define SRSHARP1_DNLP_11                                       0x32d1
+#define SRSHARP1_DNLP_12                                       0x32d2
+#define SRSHARP1_DNLP_13                                       0x32d3
+#define SRSHARP1_DNLP_14                                       0x32d4
+#define SRSHARP1_DNLP_15                                       0x32d5
+#define SRSHARP1_DEMO_CRTL                                     0x32d6
+
 #endif /* _VE_REG_H */
index 315fe21..1f5fcfb 100644 (file)
@@ -4887,7 +4887,8 @@ SET_FILTER:
                amvecm_on_vs(
                        (cur_dispbuf != &vf_local)
                        ? cur_dispbuf : NULL,
-                       vf, CSC_FLAG_CHECK_OUTPUT,
+                       toggle_frame,
+                       toggle_frame ? CSC_FLAG_TOGGLE_FRAME : 0,
                        cur_frame_par ?
                        cur_frame_par->supsc1_hori_ratio :
                        0,