78 lines
2.4 KiB
Diff
78 lines
2.4 KiB
Diff
From f9f510ccb87423812a31457ea302101dc683fe05 Mon Sep 17 00:00:00 2001
|
|
From: "yumei.jia" <yumei.jia@amlogic.com>
|
|
Date: Tue, 18 Aug 2026 02:56:10 +0000
|
|
Subject: [PATCH 3/3] encoder: CB1 buffer error. [1/1]
|
|
|
|
PD#SWPL-284946
|
|
|
|
Problem:
|
|
buffer error.
|
|
|
|
Solution:
|
|
buffer error.
|
|
|
|
Verify:
|
|
a9
|
|
|
|
Change-Id: Ic27f0154022d874f7e84d9d3bd7b8b50c75cb91b
|
|
Signed-off-by: yumei.jia <yumei.jia@amlogic.com>
|
|
---
|
|
tahoe_v4l/tahoe_entry.c | 13 +++++++++++++
|
|
1 file changed, 13 insertions(+)
|
|
|
|
diff --git a/tahoe_v4l/tahoe_entry.c b/tahoe_v4l/tahoe_entry.c
|
|
index ed330f7..e7a3291 100644
|
|
--- a/tahoe_v4l/tahoe_entry.c
|
|
+++ b/tahoe_v4l/tahoe_entry.c
|
|
@@ -1107,6 +1107,8 @@ static int tahoe_v4l_release(struct file *filp) {
|
|
codec_mm_free_for_dma(
|
|
DEVICE_NAME,
|
|
pinst->s_video_memory.phys_addr);
|
|
+ codec_mm_unmap_phyaddr(
|
|
+ (unsigned char *)pinst->s_video_memory.virt_addr);
|
|
memset(&pinst->s_video_memory,
|
|
0, sizeof(struct venc_drv_buffer_t));
|
|
}
|
|
@@ -1118,6 +1120,9 @@ static int tahoe_v4l_release(struct file *filp) {
|
|
codec_mm_free_for_dma(
|
|
DEVICE_NAME,
|
|
pinst->sps.phy_addr_alloc);
|
|
+ if (pinst->sps.vir_addr) {
|
|
+ memunmap((void *)pinst->sps.vir_addr);
|
|
+ }
|
|
memset(&pinst->sps,
|
|
0, sizeof(struct addr_info));
|
|
}
|
|
@@ -1129,6 +1134,9 @@ static int tahoe_v4l_release(struct file *filp) {
|
|
codec_mm_free_for_dma(
|
|
DEVICE_NAME,
|
|
pinst->pps.phy_addr_alloc);
|
|
+ if (pinst->pps.vir_addr) {
|
|
+ memunmap((void *)pinst->pps.vir_addr);
|
|
+ }
|
|
memset(&pinst->pps,
|
|
0, sizeof(struct addr_info));
|
|
}
|
|
@@ -1140,6 +1148,9 @@ static int tahoe_v4l_release(struct file *filp) {
|
|
codec_mm_free_for_dma(
|
|
DEVICE_NAME,
|
|
pinst->vps.phy_addr_alloc);
|
|
+ if (pinst->vps.vir_addr) {
|
|
+ memunmap((void *)pinst->vps.vir_addr);
|
|
+ }
|
|
memset(&pinst->vps,
|
|
0, sizeof(struct addr_info));
|
|
}
|
|
@@ -1155,6 +1166,8 @@ static int tahoe_v4l_release(struct file *filp) {
|
|
codec_mm_free_for_dma(
|
|
DEVICE_NAME,
|
|
dev->fw_buffer.phys_addr);
|
|
+ codec_mm_unmap_phyaddr(
|
|
+ (unsigned char *)dev->fw_buffer.virt_addr);
|
|
memset(&dev->fw_buffer,
|
|
0, sizeof(struct venc_drv_buffer_t));
|
|
}
|
|
--
|
|
2.43.2
|
|
|