video: driver: allow two 8k sessions support
Allow one 8k + one 4k realtime sessions. Maximum allow two 8K sessions which includes RT and NRT sessions. Change-Id: I68acfc4942c5c930bed7d9584cd82f2667010136 Signed-off-by: Darshana Patil <darshana@codeaurora.org>
This commit is contained in:

committed by
Gerrit - the friendly Code Review server

parent
8e1ba950f0
commit
b965b9307f
@@ -306,6 +306,7 @@ enum msm_vidc_core_capability_type {
|
||||
MAX_SESSION_COUNT,
|
||||
MAX_SECURE_SESSION_COUNT,
|
||||
MAX_LOAD,
|
||||
MAX_RT_MBPF,
|
||||
MAX_MBPF,
|
||||
MAX_MBPS,
|
||||
MAX_IMAGE_MBPF,
|
||||
|
@@ -5164,7 +5164,7 @@ int msm_vidc_check_core_mbps(struct msm_vidc_inst *inst)
|
||||
|
||||
static int msm_vidc_check_core_mbpf(struct msm_vidc_inst *inst)
|
||||
{
|
||||
u32 video_mbpf = 0, image_mbpf = 0;
|
||||
u32 video_mbpf = 0, image_mbpf = 0, video_rt_mbpf = 0;
|
||||
struct msm_vidc_core *core;
|
||||
struct msm_vidc_inst *instance;
|
||||
|
||||
@@ -5199,6 +5199,24 @@ static int msm_vidc_check_core_mbpf(struct msm_vidc_inst *inst)
|
||||
return -ENOMEM;
|
||||
}
|
||||
|
||||
core_lock(core, __func__);
|
||||
/* check real-time video sessions max limit */
|
||||
list_for_each_entry(instance, &core->instances, list) {
|
||||
if (is_thumbnail_session(instance) ||
|
||||
is_image_session(instance) ||
|
||||
!is_realtime_session(instance))
|
||||
continue;
|
||||
|
||||
video_rt_mbpf += msm_vidc_get_mbs_per_frame(instance);
|
||||
}
|
||||
core_unlock(core, __func__);
|
||||
|
||||
if (video_rt_mbpf > core->capabilities[MAX_RT_MBPF].value) {
|
||||
i_vpr_e(inst, "%s: real-time video overloaded. needed %u, max %u",
|
||||
__func__, video_rt_mbpf, core->capabilities[MAX_RT_MBPF].value);
|
||||
return -ENOMEM;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user