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 <ashekhar@codeaurora.org>
This commit is contained in:
Amit Shekhar 2019-08-20 17:40:07 -07:00
parent c8be54f0a9
commit b6d2a31088

View File

@ -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),