vdec: mmjpeg call reset_process_time in wrong point [1/1]
authorapollo.ling <apollo.ling@amlogic.com>
Tue, 18 Aug 2020 12:07:42 +0000 (20:07 +0800)
committerSandy Luo <sandy.luo@amlogic.com>
Thu, 20 Aug 2020 08:43:46 +0000 (01:43 -0700)
PD#SWPL-31855

Problem:
The fullformat get stuck in M-JPEG-ADPCM U-Law-8524 Kbps-640x480.AVI

Solution:
Correct the wrong position of calling reset_process_time

Verify:
u212

Change-Id: I6c463915a0bb871eef188c4b7812046f87dbdd02
Signed-off-by: apollo.ling <apollo.ling@amlogic.com>
drivers/frame_provider/decoder/mjpeg/vmjpeg_multi.c

index 8f413df5abc10e45efeced764ed561e2561cb18b..06b2f50b63a5f1810ea6fc53cf0af60381306e93 100644 (file)
@@ -338,7 +338,6 @@ static irqreturn_t vmjpeg_isr_thread_fn(struct vdec_s *vdec, int irq)
        u64 pts_us64;
        u32 frame_size;
 
-       reset_process_time(hw);
        if (READ_VREG(AV_SCRATCH_D) != 0 &&
                (debug_enable & PRINT_FLAG_UCODE_DETAIL)) {
                pr_info("dbg%x: %x\n", READ_VREG(AV_SCRATCH_D),
@@ -376,6 +375,7 @@ static irqreturn_t vmjpeg_isr_thread_fn(struct vdec_s *vdec, int irq)
                        WRITE_VREG(DEC_STATUS_REG, 0);
                return IRQ_HANDLED;
        }
+       reset_process_time(hw);
 
        reg = READ_VREG(MREG_FROM_AMRISC);
        index = READ_VREG(AV_SCRATCH_5) & 0xffffff;
@@ -885,8 +885,6 @@ static void check_timer_func(unsigned long arg)
        }
 
        if (((debug_enable & PRINT_FLAG_TIMEOUT_STATUS) == 0) &&
-               (input_frame_based(vdec) ||
-               ((u32)READ_VREG(VLD_MEM_VIFIFO_LEVEL) > 0x100)) &&
                (timeout_val > 0) &&
                (hw->start_process_time > 0) &&
                ((1000 * (jiffies - hw->start_process_time) / HZ)