vpp: enable sr function when DV enable with non-cert mode [1/1]
authorBrian Zhu <brian.zhu@amlogic.com>
Thu, 22 Aug 2019 13:27:26 +0000 (21:27 +0800)
committerTao Zeng <tao.zeng@amlogic.com>
Fri, 23 Aug 2019 07:08:07 +0000 (00:08 -0700)
PD#SWPL-12722

Problem:
Previously, disabled the SR function when DV on. Since we want
to pass the dv certification without any external flag setting.
But it will affect the PQ function in SR after g12a.

Solution:
Just enable SR function under DV on. Only disable it under
certification mode.

Verify:
Verified on u212

Change-Id: I01bb8cad3fd48246f5af884f84dcc280f85908a1
Signed-off-by: Brian Zhu <brian.zhu@amlogic.com>
drivers/amlogic/media/video_sink/video.c

index 421b50b543833838fbdc22777e292e8aab1d988d..ce2fda36971a40aaa1b902373d55d473d96c08ae 100644 (file)
@@ -639,15 +639,20 @@ static int scaler_pos_changed;
 #ifndef CONFIG_AMLOGIC_MEDIA_ENHANCEMENT_DOLBYVISION
 bool is_dolby_vision_enable(void)
 {
-       return 0;
+       return false;
 }
 bool is_dolby_vision_on(void)
 {
-       return 0;
+       return false;
 }
 bool is_dolby_vision_stb_mode(void)
 {
-       return 0;
+       return false;
+}
+
+bool for_dolby_vision_certification(void)
+{
+       return false;
 }
 #endif
 
@@ -4190,7 +4195,9 @@ static void vsync_toggle_frame(struct vframe_s *vf, int line)
                        &glayer_info[0], vf,
                        next_frame_par, vinfo,
                        (is_dolby_vision_on() &&
-                       is_dolby_vision_stb_mode()), 1);
+                       is_dolby_vision_stb_mode() &&
+                       for_dolby_vision_certification()),
+                       1);
 
                memcpy(&gPic_info[0], &vf->pic_mode,
                        sizeof(struct vframe_pic_mode_s));
@@ -7903,6 +7910,7 @@ SET_FILTER:
                                vinfo->height);
                        if (is_dolby_vision_on() &&
                                is_dolby_vision_stb_mode() &&
+                               for_dolby_vision_certification() &&
                                !cur_frame_par->supsc0_enable &&
                                !cur_frame_par->supsc1_enable) {
                                VSYNC_WR_MPEG_REG(VPP_SRSHARP0_CTRL, 0);
@@ -8723,7 +8731,9 @@ int get_current_vscale_skip_count(struct vframe_s *vf)
                &glayer_info[0],
                vf, &frame_par, vinfo,
                (is_dolby_vision_on() &&
-               is_dolby_vision_stb_mode()), 0);
+               is_dolby_vision_stb_mode() &&
+               for_dolby_vision_certification()),
+               0);
        ret = frame_par.vscale_skip_count;
        if (cur_frame_par && (process_3d_type & MODE_3D_ENABLE))
                ret |= (cur_frame_par->vpp_3d_mode<<8);