video-driver: check max mbpf

check max mbpf as well while allowing
the real time session.

Change-Id: I1091582a02e01a4daa9c58ec5b50400b7d856610
Signed-off-by: Manikanta Kanamarlapudi <kmanikan@codeaurora.org>
This commit is contained in:
Manikanta Kanamarlapudi
2021-10-29 20:17:06 +05:30
committed by Gerrit - the friendly Code Review server
parent 7ac58c383b
commit f84053a13b
3 changed files with 8 additions and 1 deletions

View File

@@ -422,6 +422,7 @@ void msm_vidc_allow_dcvs(struct msm_vidc_inst *inst);
bool msm_vidc_allow_decode_batch(struct msm_vidc_inst *inst);
int msm_vidc_check_session_supported(struct msm_vidc_inst *inst);
int msm_vidc_check_core_mbps(struct msm_vidc_inst *inst);
int msm_vidc_check_core_mbpf(struct msm_vidc_inst *inst);
int msm_vidc_check_scaling_supported(struct msm_vidc_inst *inst);
int msm_vidc_update_timestamp(struct msm_vidc_inst *inst, u64 timestamp);
int msm_vidc_set_auto_framerate(struct msm_vidc_inst *inst, u64 timestamp);

View File

@@ -2352,6 +2352,12 @@ int msm_vidc_adjust_session_priority(void *instance, struct v4l2_ctrl *ctrl)
rc = -ENOMEM;
goto exit;
}
rc = msm_vidc_check_core_mbpf(inst);
if (rc) {
i_vpr_e(inst, "%s: unsupported load\n", __func__);
goto exit;
}
}
msm_vidc_update_cap_value(inst, PRIORITY, adjusted_value, __func__);

View File

@@ -5284,7 +5284,7 @@ int msm_vidc_check_core_mbps(struct msm_vidc_inst *inst)
return 0;
}
static int msm_vidc_check_core_mbpf(struct msm_vidc_inst *inst)
int msm_vidc_check_core_mbpf(struct msm_vidc_inst *inst)
{
u32 video_mbpf = 0, image_mbpf = 0, video_rt_mbpf = 0;
struct msm_vidc_core *core;