PD#SWPL-15748
Problem:
the program will stuck after the bitstream play for a cycle.
Solution:
flush dpb queue when error reset.
Verify:
x301
Change-Id: I8dfcc4ffe54fafdca0f9a9219476aa599147a258
Signed-off-by: Nanxin Qin <nanxin.qin@amlogic.com>
cancel_work_sync(&hw->work);
cancel_work_sync(&hw->notify_work);
if (hw->stat & STAT_VDEC_RUN) {
- amhevc_stop();
+ amvdec_stop();
+ if (hw->mmu_enable)
+ amhevc_stop();
hw->stat &= ~STAT_VDEC_RUN;
}
__func__, hw->decode_pic_count+1,
hw->skip_frame_count);
+ flush_dpb(&hw->dpb);
+
timeout = jiffies + HZ;
while (kfifo_len(&hw->display_q) > 0) {
if (time_after(jiffies, timeout))