mpeg12: fix vfifo data empty bug. [1/1]
authorshihong.zheng <shihong.zheng@amlogic.com>
Wed, 19 Aug 2020 11:31:06 +0000 (19:31 +0800)
committerHui Zhang <hui.zhang@amlogic.com>
Fri, 21 Aug 2020 03:19:42 +0000 (20:19 -0700)
PD#SWPL-31902

Problem:
fix mpeg12 vfifo data empty status bug.

Solution:
consume current chunk and do not get more chunk
for this run.

Verify:
ah212

Change-Id: I7c0eb7c7283937a4179246d5bce7ca8ad1d72893
Signed-off-by: shihong.zheng <shihong.zheng@amlogic.com>
drivers/frame_provider/decoder/mpeg12/vmpeg12_multi.c

index ef45eb8d3ec545aef8d414f2256a1c8e53539d13..832e3c3264ceffdc27f75b7e37870e0828fb31c0 100644 (file)
@@ -1894,14 +1894,8 @@ static irqreturn_t vmpeg12_isr_thread_fn(struct vdec_s *vdec, int irq)
                        READ_VREG(VLD_MEM_VIFIFO_CONTROL),
                        READ_VREG(VIFF_BIT_CNT));
                if (vdec_frame_based(vdec)) {
-                       u32 bitcnt = READ_VREG(VIFF_BIT_CNT);
-                       if (bitcnt < 32) {
-                               reset_process_time(hw);
-                               hw->dec_result = DEC_RESULT_GET_DATA;
-                       } else {
-                               userdata_pushed_drop(hw);
-                               hw->dec_result = DEC_RESULT_DONE;
-                       }
+                       userdata_pushed_drop(hw);
+                       hw->dec_result = DEC_RESULT_DONE;
                        vdec_schedule_work(&hw->work);
                } else {
                        hw->dec_result = DEC_RESULT_AGAIN;