From 3b5848f74eb459e93eef8f5fab770ad0bed1593f Mon Sep 17 00:00:00 2001 From: Hui Zhang Date: Tue, 30 Oct 2018 19:31:01 +0800 Subject: [PATCH] media_module: fix netflix test video freeze issue [1/1] PD#SWPL-809 Problem: in stream mode, decoder drivers with again check will be always in run_ready state. because of again_threshold not reach. but acutally there is enough data in vbuf. decoding hang up Solution: sync input buf status once again check appears Verify: QA test on ampere Change-Id: I72dc98461865f296fe0c625f8ca60a11561976ac Signed-off-by: Hui Zhang --- .../frame_provider/decoder/h264_multi/vmh264.c | 6 +++++- .../media_modules/frame_provider/decoder/h265/vh265.c | 6 +++++- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/drivers/amlogic/media_modules/frame_provider/decoder/h264_multi/vmh264.c b/drivers/amlogic/media_modules/frame_provider/decoder/h264_multi/vmh264.c index 2092b360f792..43ad4aaa3671 100644 --- a/drivers/amlogic/media_modules/frame_provider/decoder/h264_multi/vmh264.c +++ b/drivers/amlogic/media_modules/frame_provider/decoder/h264_multi/vmh264.c @@ -6758,8 +6758,12 @@ static unsigned long run_ready(struct vdec_s *vdec, unsigned long mask) READ_PARSER_REG(PARSER_VIDEO_WP); if (parser_wr_ptr >= hw->pre_parser_wr_ptr && (parser_wr_ptr - hw->pre_parser_wr_ptr) < - again_threshold) + again_threshold) { + int r = vdec_sync_input(vdec); + dpb_print(DECODE_ID(hw), PRINT_FLAG_VDEC_DETAIL, + "%s buf lelvel:%x\n", __func__, r); return 0; + } } if (h264_debug_flag & 0x20000000) { diff --git a/drivers/amlogic/media_modules/frame_provider/decoder/h265/vh265.c b/drivers/amlogic/media_modules/frame_provider/decoder/h265/vh265.c index 3cfabcb56207..750593fd72d5 100644 --- a/drivers/amlogic/media_modules/frame_provider/decoder/h265/vh265.c +++ b/drivers/amlogic/media_modules/frame_provider/decoder/h265/vh265.c @@ -10179,8 +10179,12 @@ static unsigned long run_ready(struct vdec_s *vdec, unsigned long mask) READ_PARSER_REG(PARSER_VIDEO_WP); if (parser_wr_ptr >= hevc->pre_parser_wr_ptr && (parser_wr_ptr - hevc->pre_parser_wr_ptr) < - again_threshold) + again_threshold) { + int r = vdec_sync_input(vdec); + hevc_print(hevc, + PRINT_FLAG_VDEC_DETAIL, "%s buf lelvel:%x\n", __func__, r); return 0; + } } #endif