msm: venc: fix to skip mbpf checking for HEIF

Fix to add condition to skip mbpf capability checking
for HEIF image encoding.

Change-Id: Ife323366b8c08040c3f6fab8a0d15b89fe6f6777
Signed-off-by: Shi Zhongbo <zhongbos@codeaurora.org>
This commit is contained in:
Shi Zhongbo 2019-10-14 16:27:08 +08:00 • committed by Mihir Ganu
commit 3498fb8bbc

View file

@ -5477,7 +5477,7 @@ static int msm_vidc_check_mbpf_supported(struct msm_vidc_inst *inst)
if (is_thumbnail_session(temp))
continue;
/* ignore HEIF sessions */
if (is_image_session(temp))
if (is_image_session(temp) || is_grid_session(temp))
continue;
mbpf += NUM_MBS_PER_FRAME(
temp->fmts[INPUT_PORT].v4l2_fmt.fmt.pix_mp.height,
@ -5745,7 +5745,8 @@ int msm_vidc_check_session_supported(struct msm_vidc_inst *inst)
/* Image size max capability has equal width and height,
* hence, don't check mbpf for image sessions.
*/
if (!rc && !is_image_session(inst) &&
if (!rc && !(is_image_session(inst) ||
is_grid_session(inst)) &&
NUM_MBS_PER_FRAME(input_width, input_height) >
mbpf_max) {
s_vpr_e(sid, "Unsupported mbpf %d, max %d\n",