From b2efe16f8a94f653ad9f7ba8376b2fa325410d21 Mon Sep 17 00:00:00 2001 From: ming_qian Date: Wed, 24 Jul 2019 11:16:18 +0800 Subject: [PATCH] MMFMWK-8570: VPU Decoder: fix error in skip frames the amount of REL_FRAME_BUFF event may be much bigger the BUFF_RDY event. it means that some frame buffer are not used for decoding, and firmware just release it directly. The frame who is need to skip is decoded but not ready. Signed-off-by: ming_qian Reviewed-by: Shijie Qin --- drivers/mxc/vpu_malone/vpu_b0.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/mxc/vpu_malone/vpu_b0.c b/drivers/mxc/vpu_malone/vpu_b0.c index 029aa2aced2d..c58d1a187f71 100644 --- a/drivers/mxc/vpu_malone/vpu_b0.c +++ b/drivers/mxc/vpu_malone/vpu_b0.c @@ -4131,11 +4131,11 @@ static void vpu_api_event_handler(struct vpu_ctx *ctx, u_int32 uStrIdx, u_int32 vpu_dbg(LVL_INFO, "warning: normal release and previous status %s, frame not for display, queue the buffer to list again\n", bufstat[p_data_req->status]); - if ((p_data_req->status == FRAME_DECODED || p_data_req->status == FRAME_FREE)) { + if (p_data_req->status == FRAME_DECODED) { vpu_dec_skip_ts(ctx); send_skip_event(ctx); - add_buffer_to_queue(This, p_data_req); } + add_buffer_to_queue(This, p_data_req); } if (p_data_req->status != FRAME_ALLOC) { set_data_req_status(p_data_req, FRAME_RELEASE); -- 2.17.1