Skip to contentSkip to conversation

media: cedrus: h264: Fix neighbour info buffer size

PATCH In review Jernej Skrabec 2 participants 2 messages Feb 14, 2022 – Feb 18, 2022

Subsystems (4)
lore
Share & tools
lore

Jernej Skrabec

author maintainer
#0 lore raw

PATCH 1/1 media: cedrus: h264: Fix neighbour info buffer size

According to BSP library source, H264 neighbour info buffer size needs to be 32 kiB for H6. This is similar to H265 decoding, which also needs double buffer size in comparison to older Cedrus core generations.

Increase buffer size to cover H6 needs. Since increase is not that big in absolute numbers, it doesn't make sense to complicate logic for older generations.

Issue was discovered using iommu and cross checked with BSP library source.

Fixes 6eb9b758e307 ("media: cedrus: Add H264 decoding support")
---
 drivers/staging/media/sunxi/cedrus/cedrus_h264.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/staging/media/sunxi/cedrus/cedrus_h264.c +1 -1
index b4173a8926d6..d8fb93035470 100644
@@ -38,7 +38,7 @@ struct cedrus_h264_sram_ref_pic {
 
 #define CEDRUS_H264_FRAME_NUM		18
 
-#define CEDRUS_NEIGHBOR_INFO_BUF_SIZE	(16 * SZ_1K)
+#define CEDRUS_NEIGHBOR_INFO_BUF_SIZE	(32 * SZ_1K)
 #define CEDRUS_MIN_PIC_INFO_BUF_SIZE       (130 * SZ_1K)
 
 static void cedrus_h264_write_sram(struct cedrus_dev *dev,
Signature · 1 line
2.35.1
Acked-by on v1 1/1
#1 lore raw

Le lundi 14 février 2022 à 20:08 +0100, Jernej Skrabec a écrit :

Quoted 8 lines

According to BSP library source, H264 neighbour info buffer size needs to be 32 kiB for H6. This is similar to H265 decoding, which also needs double buffer size in comparison to older Cedrus core generations.

Increase buffer size to cover H6 needs. Since increase is not that big in absolute numbers, it doesn't make sense to complicate logic for older generations.

Quoted 5 lines

Issue was discovered using iommu and cross checked with BSP library source.

Fixes 6eb9b758e307 ("media: cedrus: Add H264 decoding support")
Quoted 17 lines
---
 drivers/staging/media/sunxi/cedrus/cedrus_h264.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/staging/media/sunxi/cedrus/cedrus_h264.c +1 -1
index b4173a8926d6..d8fb93035470 100644
@@ -38,7 +38,7 @@ struct cedrus_h264_sram_ref_pic {
 
 #define CEDRUS_H264_FRAME_NUM		18
 
-#define CEDRUS_NEIGHBOR_INFO_BUF_SIZE	(16 * SZ_1K)
+#define CEDRUS_NEIGHBOR_INFO_BUF_SIZE	(32 * SZ_1K)
 #define CEDRUS_MIN_PIC_INFO_BUF_SIZE       (130 * SZ_1K)
 
 static void cedrus_h264_write_sram(struct cedrus_dev *dev,