vpp: set dv process after vd1_mif_correct [1/1]
authorPengcheng Chen <pengcheng.chen@amlogic.com>
Wed, 11 Dec 2019 08:02:04 +0000 (16:02 +0800)
committerTao Zeng <tao.zeng@amlogic.com>
Fri, 13 Dec 2019 09:15:32 +0000 (02:15 -0700)
PD#SWPL-17905

Problem:
set corp right/bottom to 1 caused video flash

Solution:
set dv process after vd1_mif_correct

Verify:
Verify on franklin

Change-Id: I040ed7d3e061fe48b29fd17c97d45ad2bfccc58e
Signed-off-by: Pengcheng Chen <pengcheng.chen@amlogic.com>
drivers/amlogic/media/video_sink/video.c

index 21a512593303dcef9e2d74e94d63b49eb64a2481..e35854aafcd7e643d8b7a6132b0e621d62bbad58 100644 (file)
@@ -3194,11 +3194,6 @@ static s32 primary_render_frame(struct video_layer_s *layer)
 
        frame_par = layer->cur_frame_par;
 
-       /* dolby vision process for each vsync */
-#ifdef CONFIG_AMLOGIC_MEDIA_ENHANCEMENT_DOLBYVISION
-       dolby_vision_proc(layer, frame_par);
-#endif
-
        /* process cur frame for each vsync */
        if (layer->dispbuf) {
                int need_afbc =
@@ -3246,9 +3241,13 @@ static s32 primary_render_frame(struct video_layer_s *layer)
        }
 
        /* no frame parameter change */
-       if ((!layer->new_vpp_setting && !force_setting) || !frame_par)
+       if ((!layer->new_vpp_setting && !force_setting) || !frame_par) {
+               /* dolby vision process for each vsync */
+#ifdef CONFIG_AMLOGIC_MEDIA_ENHANCEMENT_DOLBYVISION
+               dolby_vision_proc(layer, frame_par);
+#endif
                return 0;
-
+       }
        /* VPP one time settings */
        if (layer->dispbuf) {
 #ifdef CONFIG_AMLOGIC_MEDIA_ENHANCEMENT_DOLBYVISION
@@ -3351,6 +3350,11 @@ static s32 primary_render_frame(struct video_layer_s *layer)
                vd_scaler_setting(1, &local_vd2_pps);
                vd_blend_setting(1, &local_vd2_blend);
        }
+       /* dolby vision process for each vsync */
+       /* need set after correct_vd1_mif_size_for_DV */
+#ifdef CONFIG_AMLOGIC_MEDIA_ENHANCEMENT_DOLBYVISION
+       dolby_vision_proc(layer, frame_par);
+#endif
        layer->new_vpp_setting = false;
        return 1;
 }