From b6d2a310889cd187ff05a24fe1ea6140206fea9e Mon Sep 17 00:00:00 2001 From: Amit Shekhar Date: Tue, 20 Aug 2019 17:40:07 -0700 Subject: [PATCH] msm_vidc: Skip mbpf check for image sessions MBs per frame for HEIF encode can be pretty large for high resolution images. Skip mbpf check for image sessions. Change-Id: I993115743f4792377a3a008b341d4c8256b102b9 Signed-off-by: Amit Shekhar --- msm/vidc/msm_vidc_common.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/msm/vidc/msm_vidc_common.c b/msm/vidc/msm_vidc_common.c index f6b984f2dcc4..85a4a4aaca5d 100644 --- a/msm/vidc/msm_vidc_common.c +++ b/msm/vidc/msm_vidc_common.c @@ -5877,7 +5877,11 @@ int msm_vidc_check_session_supported(struct msm_vidc_inst *inst) width_max, height_max); rc = -ENOTSUPP; } - if (!rc && NUM_MBS_PER_FRAME(input_width, input_height) > + /* Image size max capability has equal width and height, + * hence, don't check mbpf for image sessions. + */ + if (!rc && !is_image_session(inst) && + NUM_MBS_PER_FRAME(input_width, input_height) > mbpf_max) { dprintk(VIDC_ERR, "Unsupported mbpf %d, max %d\n", NUM_MBS_PER_FRAME(input_width, input_height),