summaryrefslogtreecommitdiff
Diffstat
-rw-r--r--drivers/amvdec_ports/aml_vcodec_adapt.c2
-rw-r--r--drivers/amvdec_ports/aml_vcodec_dec.c27
-rw-r--r--drivers/amvdec_ports/aml_vcodec_dec.h2
-rw-r--r--drivers/amvdec_ports/aml_vcodec_dec_drv.c30
-rw-r--r--drivers/amvdec_ports/aml_vcodec_drv.h19
-rw-r--r--drivers/amvdec_ports/decoder/vdec_h264_if.c1
-rw-r--r--drivers/amvdec_ports/decoder/vdec_hevc_if.c1
-rw-r--r--drivers/amvdec_ports/decoder/vdec_vp9_if.c1
-rw-r--r--drivers/frame_provider/decoder/h264_multi/vmh264.c12
-rw-r--r--drivers/frame_provider/decoder/h265/vh265.c183
-rw-r--r--drivers/frame_provider/decoder/utils/vdec.c2
-rw-r--r--drivers/frame_provider/decoder/vp9/vvp9.c94
12 files changed, 288 insertions, 86 deletions
diff --git a/drivers/frame_provider/decoder/h264_multi/vmh264.c b/drivers/frame_provider/decoder/h264_multi/vmh264.c
index 144cd9f..1038076 100644
--- a/drivers/frame_provider/decoder/h264_multi/vmh264.c
+++ b/drivers/frame_provider/decoder/h264_multi/vmh264.c
@@ -61,6 +61,7 @@
#include "../../../common/chips/decoder_cpu_ver_info.h"
#include "../utils/vdec_v4l2_buffer_ops.h"
#include <linux/crc32.h>
+#include <media/v4l2-mem2mem.h>
#undef pr_info
#define pr_info printk
@@ -159,6 +160,8 @@ static u32 run_ready_display_q_num;
static u32 run_ready_max_buf_num = 0xff;
#endif
+static u32 run_ready_min_buf_num = 2;
+
#define VDEC_ASSIST_CANVAS_BLK32 0x5
@@ -8210,10 +8213,11 @@ static unsigned long run_ready(struct vdec_s *vdec, unsigned long mask)
!ctx->v4l_codec_ready &&
hw->v4l_params_parsed) {
ret = 0; /*the params has parsed.*/
- } else if (!ctx->v4l_codec_dpb_ready)
- ret = 0;
- else if (hw->wait_reset_done_flag)
- ret = 0;
+ } else if (!ctx->v4l_codec_dpb_ready) {
+ if (v4l2_m2m_num_dst_bufs_ready(ctx->m2m_ctx) <
+ run_ready_min_buf_num)
+ ret = 0;
+ }
}
if (ret)