MMFMWK-8570: VPU Decoder: fix error in skip frames
authorming_qian <ming.qian@nxp.com>
Wed, 24 Jul 2019 03:16:18 +0000 (11:16 +0800)
committerming_qian <ming.qian@nxp.com>
Thu, 25 Jul 2019 01:21:32 +0000 (09:21 +0800)
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 <ming.qian@nxp.com>
Reviewed-by: Shijie Qin <shijie.qin@nxp.com>
drivers/mxc/vpu_malone/vpu_b0.c

index 029aa2a..c58d1a1 100644 (file)
@@ -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);