DV: FEL display black in adaptive mode [1/1]
authoryao liu <yao.liu@amlogic.com>
Wed, 2 Jun 2021 10:30:15 +0000 (18:30 +0800)
committerChristian Hoffmann <chrmhoffmann@gmail.com>
Sun, 12 Feb 2023 08:13:11 +0000 (09:13 +0100)
PD#SWPL-51701

Problem:
FEL is treat as SDR video, but still send
dv vsif pkt

Solution:
not send hdmi visf pkt ahead for FEL

Verify:
sc2

Signed-off-by: yao liu <yao.liu@amlogic.com>
Change-Id: I708af63d0e818083a6f1e8365bd19c5e8a065b22

drivers/amlogic/media/enhancement/amdolby_vision/amdolby_vision.c
drivers/amlogic/media/video_processor/v4lvideo/v4lvideo.c

index 5e336d07405f024f5935ff6b16139cac1f0f372e..aab1779698b70e1ad20788098a456b5862fa7b08 100644 (file)
@@ -8041,6 +8041,29 @@ int dolby_vision_parse_metadata(
 }
 EXPORT_SYMBOL(dolby_vision_parse_metadata);
 
+/*dual_layer && parse_ret_flags   =1 =>mel*/
+/*dual_layer && parse_ret_flags !=1 =>fel*/
+bool vf_is_fel(struct vframe_s *vf)
+{
+       enum vframe_signal_fmt_e fmt;
+       bool fel = false;
+
+       if (!vf)
+               return false;
+
+       fmt = get_vframe_src_fmt(vf);
+
+       if (fmt == VFRAME_SIGNAL_FMT_DOVI) {
+               if (debug_dolby & 0x1)
+                       pr_dolby_dbg("dual layer %d, parse ret flags %d\n",
+
+               vf->src_fmt.dual_layer, vf->src_fmt.parse_ret_flags);
+               if (vf->src_fmt.dual_layer && vf->src_fmt.parse_ret_flags != 1)
+                       fel = true;
+       }
+       return fel;
+}
+
 /* 0: no el; >0: with el */
 /* 1: need wait el vf    */
 /* 2: no match el found  */
@@ -8153,7 +8176,8 @@ int dolby_vision_wait_metadata(struct vframe_s *vf)
                                    DOLBY_VISION_OUTPUT_MODE_BYPASS &&
                                    mode ==
                                    DOLBY_VISION_OUTPUT_MODE_IPT_TUNNEL &&
-                                   dolby_vision_wait_delay > 0) {
+                                   dolby_vision_wait_delay > 0 &&
+                                   !vf_is_fel(vf)) {
                                        dolby_vision_wait_count =
                                        dolby_vision_wait_delay;
                                } else {
index ac0126dedc3073b4b4eb549d6d23f7e4aa0d7440..a00eea0c4922728aafe6914d9c4a32f04810a534 100644 (file)
@@ -1136,11 +1136,11 @@ static s32 v4lvideo_import_sei_data(
                                                            provider, NULL);
                                if (!ret) {
                                /* FIXME: work around for sei/el out of sync */
-                                       if ((dup_vf->src_fmt.fmt ==
-                                            VFRAME_SIGNAL_FMT_SDR) &&
-                                           !strcmp(provider, "dvbldec"))
-                                               dup_vf->src_fmt.fmt =
-                                                       VFRAME_SIGNAL_FMT_DOVI;
+                                       /*if ((dup_vf->src_fmt.fmt == */
+                                       /*     VFRAME_SIGNAL_FMT_SDR) && */
+                                       /*    !strcmp(provider, "dvbldec")) */
+                                       /*      dup_vf->src_fmt.fmt = */
+                                       /*      VFRAME_SIGNAL_FMT_DOVI; */
                                        atomic_inc(&global_set_cnt);
                                } else {
                                        vfree(p);