From: Pengfei Liu Date: Tue, 15 Jun 2021 09:07:46 +0000 (+0800) Subject: demux: clean demux output buffer [1/1] X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=1a195fe3684e40d27f024eea560b8a13e3c4ad7b;p=GitHub%2FLineageOS%2FG12%2Fandroid_kernel_amlogic_linux-4.9.git demux: clean demux output buffer [1/1] PD#SWPL-52784 Problem: dmx have remaining data. Solution: clean dmx output buffer Verify: verified at vo svp. Signed-off-by: Pengfei Liu Change-Id: Ia392e83533a0ec8e3b6d9ed13a219a07a23eced3 --- diff --git a/drivers/amlogic/dvb/demux/sc2_demux/mem_desc.c b/drivers/amlogic/dvb/demux/sc2_demux/mem_desc.c index 54c3b1458c37..73acd9eb497e 100644 --- a/drivers/amlogic/dvb/demux/sc2_demux/mem_desc.c +++ b/drivers/amlogic/dvb/demux/sc2_demux/mem_desc.c @@ -379,6 +379,9 @@ int _alloc_buff(unsigned int len, int sec_level, iret = cache_malloc(len, &buf_start_virt, &buf_start); if (iret == 0) { + pr_dbg("init cache phy:0x%lx, virt:0x%lx, len:%d\n", + buf_start, buf_start_virt, len); + memset((char *)buf_start_virt, 0, len); if (sec_level) { #ifdef CONFIG_AMLOGIC_TEE ret = tee_protect_mem_by_type(TEE_MEM_TYPE_DEMUX, @@ -405,6 +408,10 @@ int _alloc_buff(unsigned int len, int sec_level, dprint("%s fail\n", __func__); return -1; } + buf_start_virt = (unsigned long)codec_mm_phys_to_virt(buf_start); + pr_dbg("init phy:0x%lx, virt:0x%lx, len:%d\n", + buf_start, buf_start_virt, len); + memset((char *)buf_start_virt, 0, len); if (sec_level) { #ifdef CONFIG_AMLOGIC_TEE //ret = tee_protect_tvp_mem(buf_start, len, handle); @@ -414,7 +421,6 @@ int _alloc_buff(unsigned int len, int sec_level, pr_dbg("%s, protect 0x%lx, len:%d, ret:0x%x\n", __func__, buf_start, len, ret); } - buf_start_virt = (unsigned long)codec_mm_phys_to_virt(buf_start); *vir_mem = buf_start_virt; *phy_mem = buf_start;