diff --git a/msm/vidc/msm_vidc_buffer_calculations.c b/msm/vidc/msm_vidc_buffer_calculations.c index 2db5696313c7..997c1ee62749 100644 --- a/msm/vidc/msm_vidc_buffer_calculations.c +++ b/msm/vidc/msm_vidc_buffer_calculations.c @@ -1439,7 +1439,7 @@ static inline u32 calculate_enc_scratch_size(struct msm_vidc_inst *inst, bitbin_size = ALIGN(bitstream_size, VENUS_DMA_ALIGNMENT); } if (aligned_width * aligned_height >= 3840 * 2160) - size_singlePipe = bitbin_size / 4; + size_singlePipe = bitbin_size / num_vpp_pipes; else if (num_vpp_pipes > 2) size_singlePipe = bitbin_size / 2; else diff --git a/msm/vidc/msm_vidc_common.c b/msm/vidc/msm_vidc_common.c index 7f6af02398e2..7ff136aff22e 100644 --- a/msm/vidc/msm_vidc_common.c +++ b/msm/vidc/msm_vidc_common.c @@ -1,6 +1,6 @@ // SPDX-License-Identifier: GPL-2.0-only /* - * Copyright (c) 2012-2020, The Linux Foundation. All rights reserved. + * Copyright (c) 2012-2021, The Linux Foundation. All rights reserved. */ #include @@ -6162,10 +6162,12 @@ int msm_vidc_check_session_supported(struct msm_vidc_inst *inst) width_min, height_min); rc = -ENOTSUPP; } - if (!rc && output_width > width_max) { + if (!rc && (output_width > width_max || + output_height > height_max)) { s_vpr_e(sid, - "Unsupported width = %u supported max width = %u\n", - output_width, width_max); + "Unsupported WxH (%u)x(%u), max supported is (%u)x(%u)\n", + output_width, output_height, + width_max, height_max); rc = -ENOTSUPP; }