diff options
author | Jerry Huang <huangjerry@google.com> | 2023-05-03 19:38:40 +0800 |
---|---|---|
committer | Jerry Huang <huangjerry@google.com> | 2023-05-08 14:06:52 +0800 |
commit | 44b578f70256623c159580af17452851fba976d8 (patch) | |
tree | b66c7a529502f809cf5e9a691a92a053b6edcae9 | |
parent | 7c9c8eb7872e1e4f591dae7a5b7048311f51f6c2 (diff) | |
download | video-driver-android-msm-redbull-4.19-android14.tar.gz |
video: driver: Return proper error codeandroid-u-qpr3-beta-2_r0.1android-u-qpr3-beta-2.1_r0.6android-u-qpr3-beta-1_r0.6android-u-qpr2-beta-3_r0.1android-u-qpr2-beta-3.1_r0.6android-u-qpr2-beta-1_r0.8android-u-qpr1-beta-1_r0.6android-u-beta-5_r0.6android-u-beta-5.3_r0.6android-u-beta-5.2_r0.2android-u-beta-4_r0.6android-u-beta-3_r0.1android-14.0.0_r0.68android-14.0.0_r0.58android-14.0.0_r0.47android-14.0.0_r0.46android-14.0.0_r0.32android-14.0.0_r0.20android-14.0.0_r0.12android-14.0.0_r0.1android-msm-redbull-4.19-u-beta5.3android-msm-redbull-4.19-u-beta5.2android-msm-redbull-4.19-u-beta5android-msm-redbull-4.19-u-beta4android-msm-redbull-4.19-u-beta3android-msm-redbull-4.19-android14-releaseandroid-msm-redbull-4.19-android14-qpr3-betaandroid-msm-redbull-4.19-android14-qpr2-betaandroid-msm-redbull-4.19-android14-qpr2android-msm-redbull-4.19-android14-qpr1-betaandroid-msm-redbull-4.19-android14-qpr1android-msm-redbull-4.19-android14
Return correct error code when session
is not supported since remaining memory
is not sufficient to proceed current session
Bug: 273301608
Test: CtsMediaMiscTestCases:android.media.misc.cts.ResourceManagerTest#testAVCVideoCodecReclaimHighResolution
Change-Id: Ib989b7ad41606303f2ff3359768105b10cf9393d
-rw-r--r-- | msm/vidc/msm_vidc_common.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/msm/vidc/msm_vidc_common.c b/msm/vidc/msm_vidc_common.c index 37d6f7f..cbbebbe 100644 --- a/msm/vidc/msm_vidc_common.c +++ b/msm/vidc/msm_vidc_common.c @@ -3557,7 +3557,7 @@ static int msm_vidc_load_resources(int flipped_state, "H/W is overloaded. needed: %d max: %d\n", video_load, max_video_load); msm_vidc_print_running_insts(inst->core); - return -EBUSY; + return -ENOMEM; } if (video_load + image_load > max_video_load + max_image_load) { @@ -3565,7 +3565,7 @@ static int msm_vidc_load_resources(int flipped_state, "H/W is overloaded. needed: [video + image][%d + %d], max: [video + image][%d + %d]\n", video_load, image_load, max_video_load, max_image_load); msm_vidc_print_running_insts(inst->core); - return -EBUSY; + return -ENOMEM; } hdev = core->device; @@ -5925,7 +5925,7 @@ int msm_comm_check_memory_supported(struct msm_vidc_inst *vidc_inst) "%s: video mem overshoot - reached %llu MB, max_limit %llu MB\n", __func__, total_mem_size >> 20, memory_limit_mbytes); msm_comm_print_insts_info(core); - return -EBUSY; + return -ENOMEM; } if (!is_secure_session(vidc_inst)) { @@ -5940,7 +5940,7 @@ int msm_comm_check_memory_supported(struct msm_vidc_inst *vidc_inst) "%s: insufficient device addr space, required %llu, available %llu\n", __func__, non_sec_mem_size, non_sec_cb_size); msm_comm_print_insts_info(core); - return -EINVAL; + return -ENOMEM; } } |