diff --git a/drivers/amlogic/media_modules/frame_provider/decoder/mjpeg/vmjpeg_multi.c b/drivers/amlogic/media_modules/frame_provider/decoder/mjpeg/vmjpeg_multi.c index a0b449324efe..7364f35764d9 100644 --- a/drivers/amlogic/media_modules/frame_provider/decoder/mjpeg/vmjpeg_multi.c +++ b/drivers/amlogic/media_modules/frame_provider/decoder/mjpeg/vmjpeg_multi.c @@ -795,7 +795,6 @@ static void vmjpeg_work(struct work_struct *work) } amvdec_stop(); /* mark itself has all HW resource released and input released */ - vdec_set_status(hw_to_vdec(hw), VDEC_STATUS_CONNECTED); vdec_core_finish_run(hw_to_vdec(hw), CORE_MASK_VDEC_1 | CORE_MASK_HEVC); del_timer_sync(&hw->check_timer); diff --git a/drivers/amlogic/media_modules/frame_provider/decoder/utils/decoder_bmmu_box.c b/drivers/amlogic/media_modules/frame_provider/decoder/utils/decoder_bmmu_box.c index fe00832b061c..61810631551f 100644 --- a/drivers/amlogic/media_modules/frame_provider/decoder/utils/decoder_bmmu_box.c +++ b/drivers/amlogic/media_modules/frame_provider/decoder/utils/decoder_bmmu_box.c @@ -298,6 +298,10 @@ int decoder_bmmu_box_alloc_idx_wait( if (have_space) { ret = decoder_bmmu_box_alloc_idx(handle, idx, size, aligned_2n, mem_flags); + if (ret == -ENOMEM) { + pr_info("bmmu alloc idx fail, try free keep video.\n"); + try_free_keep_video(1); + } } else { try_free_keep_video(1); ret = -ENOMEM; @@ -335,7 +339,7 @@ int decoder_bmmu_box_alloc_buf_phy( * driver_name, idx, *buf_phy_addr, size); */ } else { - pr_info("%s malloc failed %d\n", driver_name, idx); + pr_info("%s malloc failed %d\n", driver_name, idx); return -ENOMEM; }