From fecdc2cd769ff3f922aca24de144d70066a90abf Mon Sep 17 00:00:00 2001 From: Mihir Ganu Date: Thu, 10 Sep 2020 16:51:19 -0700 Subject: [PATCH] msm: vidc: Increase decoder persist_1 buffer size Increase H264/H265 decoder persist_1 buffer size to acommodate t35 userdata. Change-Id: Ifb38d32ee0f3e737b3f8e518976511cf727d295f Signed-off-by: Mihir Ganu --- msm/vidc/msm_vidc_buffer_calculations.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/msm/vidc/msm_vidc_buffer_calculations.c b/msm/vidc/msm_vidc_buffer_calculations.c index 4b1a2bd287d9c..87dde605568e2 100644 --- a/msm/vidc/msm_vidc_buffer_calculations.c +++ b/msm/vidc/msm_vidc_buffer_calculations.c @@ -142,6 +142,7 @@ #define NUM_SLIST_BUF_H264 (256 + 32) #define SIZE_SLIST_BUF_H264 512 +#define SIZE_SEI_USERDATA 4096 #define LCU_MAX_SIZE_PELS 64 #define LCU_MIN_SIZE_PELS 16 @@ -1861,7 +1862,8 @@ static inline u32 calculate_h264d_persist1_size(void) { u32 size = 0; - size = ALIGN((SIZE_SLIST_BUF_H264 * NUM_SLIST_BUF_H264), + size = ALIGN((SIZE_SLIST_BUF_H264 * NUM_SLIST_BUF_H264 + + NUM_HW_PIC_BUF * SIZE_SEI_USERDATA), VENUS_DMA_ALIGNMENT); return size; } @@ -1871,7 +1873,8 @@ static inline u32 calculate_h265d_persist1_size(void) u32 size = 0; size = ALIGN((SIZE_SLIST_BUF_H265 * NUM_SLIST_BUF_H265 + H265_NUM_TILE - * sizeof(u32)), VENUS_DMA_ALIGNMENT); + * sizeof(u32) + NUM_HW_PIC_BUF * SIZE_SEI_USERDATA), + VENUS_DMA_ALIGNMENT); return size; }