From 8bfbae799db34ff1bc640b1b0256571cf0cfeaae Mon Sep 17 00:00:00 2001 From: Darshana Patil Date: Wed, 26 Jun 2019 13:25:23 -0700 Subject: [PATCH] msm: vidc: fix slice command buffer sizes Fix HEVC slice command buffer sizes. Change-Id: I8db40a80561eebb15fba9345d37b51bd42380c4f --- msm/vidc/msm_vidc_buffer_calculations.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/msm/vidc/msm_vidc_buffer_calculations.c b/msm/vidc/msm_vidc_buffer_calculations.c index 9735d44c5004..bc5e7e9d864e 100644 --- a/msm/vidc/msm_vidc_buffer_calculations.c +++ b/msm/vidc/msm_vidc_buffer_calculations.c @@ -1127,7 +1127,7 @@ static inline u32 size_h265d_bse_cmd_buf(u32 width, u32 height) { u32 size; - size = (ALIGN(width, LCU_MAX_SIZE_PELS) / LCU_MIN_SIZE_PELS) + + size = (ALIGN(width, LCU_MAX_SIZE_PELS) / LCU_MIN_SIZE_PELS) * (ALIGN(height, LCU_MAX_SIZE_PELS) / LCU_MIN_SIZE_PELS) * NUM_HW_PIC_BUF; size = min_t(u32, size, H265D_MAX_SLICE + 1); @@ -1141,7 +1141,7 @@ static inline u32 size_h265d_vpp_cmd_buf(u32 width, u32 height) { u32 size = 0; - size = (ALIGN(width, LCU_MAX_SIZE_PELS) / LCU_MIN_SIZE_PELS) + + size = (ALIGN(width, LCU_MAX_SIZE_PELS) / LCU_MIN_SIZE_PELS) * (ALIGN(height, LCU_MAX_SIZE_PELS) / LCU_MIN_SIZE_PELS) * NUM_HW_PIC_BUF; size = min_t(u32, size, H265D_MAX_SLICE + 1);