author | miaohong chen <miaohong.chen@amlogic.com> | 2020-07-23 07:34:46 (GMT) |
---|---|---|
committer | Miaohong Chen <miaohong.chen@amlogic.com> | 2020-07-24 07:53:24 (GMT) |
commit | 95ac8483ee82404a213828147ec2bdc6e6827462 (patch) | |
tree | 15bee8cc78a94c13757eadab429234a161b7c052 | |
parent | 4e1644528d9713cbff4c785d85bdadbfd6e5d71a (diff) | |
download | media_modules-95ac8483ee82404a213828147ec2bdc6e6827462.zip media_modules-95ac8483ee82404a213828147ec2bdc6e6827462.tar.gz media_modules-95ac8483ee82404a213828147ec2bdc6e6827462.tar.bz2 |
vmh264: fix video stuck bug [1/1]
PD#SWPL-24277
Problem:
Multi-instance h264 stream roasting machine stuck.
Solution:
Reset the stuck decoder in timer interrupt.
Verify:
u212
Change-Id: Ic7da08918b010ddd065be85c19df981b481337e1
Signed-off-by: miaohong chen <miaohong.chen@amlogic.com>
-rw-r--r-- | drivers/frame_provider/decoder/h264_multi/h264_dpb.h | 2 | ||||
-rw-r--r-- | drivers/frame_provider/decoder/h264_multi/vmh264.c | 8 |
2 files changed, 9 insertions, 1 deletions
diff --git a/drivers/frame_provider/decoder/h264_multi/h264_dpb.h b/drivers/frame_provider/decoder/h264_multi/h264_dpb.h index 550c293..3f5ad90 100644 --- a/drivers/frame_provider/decoder/h264_multi/h264_dpb.h +++ b/drivers/frame_provider/decoder/h264_multi/h264_dpb.h @@ -41,6 +41,8 @@ #define PRINT_FLAG_V4L_DETAIL 0x8000 #define DISABLE_ERROR_HANDLE 0x10000 #define DEBUG_DUMP_STAT 0x80000 +#define DEBUG_TIMEOUT_DEC_STAT 0x800000 + /*setting canvas mode and endian. if this flag is set, value of canvas mode will according to the value of mem_map_mode. diff --git a/drivers/frame_provider/decoder/h264_multi/vmh264.c b/drivers/frame_provider/decoder/h264_multi/vmh264.c index c215147..4257a8b 100644 --- a/drivers/frame_provider/decoder/h264_multi/vmh264.c +++ b/drivers/frame_provider/decoder/h264_multi/vmh264.c @@ -7010,7 +7010,13 @@ static void check_timer_func(unsigned long arg) u32 dpb_status = READ_VREG(DPB_STATUS_REG); u32 mby_mbx = READ_VREG(MBY_MBX); if ((dpb_status == H264_ACTION_DECODE_NEWPIC) || - (dpb_status == H264_ACTION_DECODE_SLICE)) { + (dpb_status == H264_ACTION_DECODE_SLICE) || + (dpb_status == H264_SEI_DATA_DONE) || + (dpb_status == H264_STATE_SEARCH_HEAD)) { + if (h264_debug_flag & DEBUG_TIMEOUT_DEC_STAT) + pr_debug("%s dpb_status = 0x%x last_mby_mbx = %u mby_mbx = %u\n", + __func__, dpb_status, hw->last_mby_mbx, mby_mbx); + if (hw->last_mby_mbx == mby_mbx) { if (hw->decode_timeout_count > 0) hw->decode_timeout_count--; |