mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-13 00:00:00 -04:00
msm: vidc: fix slice command buffer sizes
Fix HEVC slice command buffer sizes. Change-Id: I87138c75e7476e6da6c16cefed00d9a3f405b90e Signed-off-by: Darshana Patil <darshana@codeaurora.org>
This commit is contained in:
parent
8daa6110c7
commit
836b73ab5f
1 changed files with 9 additions and 7 deletions
|
|
@ -1109,11 +1109,13 @@ static inline u32 size_h265d_bse_cmd_buf(u32 width, u32 height)
|
|||
{
|
||||
u32 size;
|
||||
|
||||
size = ALIGN(((ALIGN(width, LCU_MAX_SIZE_PELS) / LCU_MIN_SIZE_PELS) +
|
||||
(ALIGN(height, LCU_MAX_SIZE_PELS) / LCU_MIN_SIZE_PELS)) *
|
||||
NUM_HW_PIC_BUF, VENUS_DMA_ALIGNMENT);
|
||||
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);
|
||||
size = 2 * size * SIZE_H265D_BSE_CMD_PER_BUF;
|
||||
size = ALIGN(size, VENUS_DMA_ALIGNMENT);
|
||||
|
||||
return size;
|
||||
}
|
||||
|
||||
|
|
@ -1121,13 +1123,13 @@ static inline u32 size_h265d_vpp_cmd_buf(u32 width, u32 height)
|
|||
{
|
||||
u32 size = 0;
|
||||
|
||||
size = ALIGN((
|
||||
(ALIGN(width, LCU_MAX_SIZE_PELS) / LCU_MIN_SIZE_PELS) +
|
||||
(ALIGN(height, LCU_MAX_SIZE_PELS) / LCU_MIN_SIZE_PELS)) *
|
||||
NUM_HW_PIC_BUF, VENUS_DMA_ALIGNMENT);
|
||||
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);
|
||||
size = ALIGN(size, 4);
|
||||
size = 2 * size * SIZE_H265D_VPP_CMD_PER_BUF;
|
||||
size = ALIGN(size, VENUS_DMA_ALIGNMENT);
|
||||
|
||||
return size;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue