Skip to contentSkip to conversation

cma: decrease CMA_ALIGNMENT lower limit to 2

PATCH Applied Paul Cercueil 2 participants 2 messages Sep 30, 2020 – Oct 5, 2020 DMA mapping helpers

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 cma: decrease CMA_ALIGNMENT lower limit to 2

On an embedded system with a tiny (1 MiB) CMA area for video memory, and a simple enough video pipeline, we can decrease the CMA_ALIGNMENT by a factor of 2 to avoid wasting memory, as all the allocations for video buffers will be of the exact same size (dictated by the size of the screen).

---
 kernel/dma/Kconfig | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
kernel/dma/Kconfig +1 -1
index 847a9d1fa634..f15e782e19ca 100644
@@ -162,7 +162,7 @@ endchoice
 
 config CMA_ALIGNMENT
 	int "Maximum PAGE_SIZE order of alignment for contiguous buffers"
-	range 4 12
+	range 2 12
 	default 8
 	help
 	  DMA mapping framework by default aligns all buffers to the smallest
Signature · 1 line
2.28.0