From f76eb5e4eee46d08c8efceca73cfeb4160aaf28f Mon Sep 17 00:00:00 2001 From: Nanxin Qin Date: Thu, 6 Feb 2020 18:41:55 +0800 Subject: [PATCH] decode: fixed issue of vmap fail when playback 8k. [2/2] PD#SWPL-30672 Problem: the vmap fail cause crash that reason is not enough addr map. Solution: split a big block mem to many piece area then mapping. Verify: u212 Change-Id: I2ba11789f66c3bfd1bf636243b5e7a0a2df2e1da Signed-off-by: Nanxin Qin --- drivers/frame_provider/decoder/h265/vh265.c | 16 ++-------------- 1 file changed, 2 insertions(+), 14 deletions(-) diff --git a/drivers/frame_provider/decoder/h265/vh265.c b/drivers/frame_provider/decoder/h265/vh265.c index ac497bd..0d5ea48 100644 --- a/drivers/frame_provider/decoder/h265/vh265.c +++ b/drivers/frame_provider/decoder/h265/vh265.c @@ -3319,20 +3319,8 @@ static int alloc_buf(struct hevc_state_s *hevc) codec_mm_dma_flush(mem_start_virt, hevc->m_BUF[i].size, DMA_TO_DEVICE); } else { - mem_start_virt = codec_mm_vmap( - hevc->m_BUF[i].start_adr, - hevc->m_BUF[i].size); - if (mem_start_virt) { - memset(mem_start_virt, 0, hevc->m_BUF[i].size); - codec_mm_dma_flush(mem_start_virt, - hevc->m_BUF[i].size, - DMA_TO_DEVICE); - codec_mm_unmap_phyaddr(mem_start_virt); - } else { - /*not virt for tvp playing, - may need clear on ucode.*/ - pr_err("ref %s mem_start_virt failed\n", __func__); - } + codec_mm_memset(hevc->m_BUF[i].start_adr, + 0, hevc->m_BUF[i].size); } } } -- 2.20.1