vpp: dynamic adjust scaler path according to supsc0 h&v ratio [2/2]
authorBencheng Jing <bencheng.jing@amlogic.com>
Wed, 16 Oct 2019 11:06:03 +0000 (19:06 +0800)
committerTao Zeng <tao.zeng@amlogic.com>
Thu, 17 Oct 2019 06:18:59 +0000 (23:18 -0700)
PD#SWPL-12202

Problem:
scaler path need adjust according to supsc0 h&v ratio

Solution:
add dynamic adjust scaler path

Verify:
g12a&sm1

Change-Id: If00b4c321e24910ff7abd166d9a828dc424ab0d0
Signed-off-by: Bencheng Jing <bencheng.jing@amlogic.com>
drivers/amlogic/media/video_sink/vpp.c

index 2338cdb..e61246f 100644 (file)
@@ -2101,7 +2101,11 @@ static void vpp_set_super_scaler(
                        is_meson_g12a_cpu() ||
                        is_meson_g12b_cpu() ||
                        is_meson_sm1_cpu()) {
-                       next_frame_par->supscl_path = CORE0_BEFORE_PPS;
+                       if (next_frame_par->supsc0_hori_ratio &&
+                           next_frame_par->supsc0_vert_ratio)
+                               next_frame_par->supscl_path = CORE0_BEFORE_PPS;
+                       else
+                               next_frame_par->supscl_path = CORE0_AFTER_PPS;
                } else
                        next_frame_par->supscl_path = CORE0_PPS_CORE1;
        } else