codec_mm: fix alloc fail issue

PD# 169831

1. if alloc bmmu idx fail, try free keep video
2. delete redundant code to set the connected status in vmjpeg_multi

Change-Id: I356be5cf530600c3b439b4beab6289eba98c9d1a
This commit is contained in:
rongrong zhou
2018-07-18 18:26:31 +08:00
committed by Dongjin Kim
parent 09700c2fbb
commit 7ff5d2db36
2 changed files with 5 additions and 2 deletions

View File

@@ -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);

View File

@@ -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;
}