From 3da02c846b5e311bacacc1b0b863e41bc27925e4 Mon Sep 17 00:00:00 2001 From: yao liu Date: Wed, 2 Jun 2021 18:30:15 +0800 Subject: [PATCH] DV: FEL display black in adaptive mode [1/1] 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 Change-Id: I708af63d0e818083a6f1e8365bd19c5e8a065b22 --- .../amdolby_vision/amdolby_vision.c | 26 ++++++++++++++++++- .../media/video_processor/v4lvideo/v4lvideo.c | 10 +++---- 2 files changed, 30 insertions(+), 6 deletions(-) diff --git a/drivers/amlogic/media/enhancement/amdolby_vision/amdolby_vision.c b/drivers/amlogic/media/enhancement/amdolby_vision/amdolby_vision.c index 5e336d07405f..aab1779698b7 100644 --- a/drivers/amlogic/media/enhancement/amdolby_vision/amdolby_vision.c +++ b/drivers/amlogic/media/enhancement/amdolby_vision/amdolby_vision.c @@ -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 { diff --git a/drivers/amlogic/media/video_processor/v4lvideo/v4lvideo.c b/drivers/amlogic/media/video_processor/v4lvideo/v4lvideo.c index ac0126dedc30..a00eea0c4922 100644 --- a/drivers/amlogic/media/video_processor/v4lvideo/v4lvideo.c +++ b/drivers/amlogic/media/video_processor/v4lvideo/v4lvideo.c @@ -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); -- 2.20.1