1# SPDX-License-Identifier: GPL-2.0-only 2menuconfig DMABUF_HEAPS_ROCKCHIP 3 bool "DMA-BUF Userland Memory Heaps for RockChip" 4 select DMA_SHARED_BUFFER 5 help 6 Choose this option to enable the RockChip DMA-BUF userland memory heaps. 7 This options creates per heap chardevs in /dev/rk_dma_heap/ which 8 allows userspace to allocate dma-bufs that can be shared 9 between drivers. 10 11config DMABUF_HEAPS_ROCKCHIP_CMA_HEAP 12 tristate "DMA-BUF RockChip CMA Heap" 13 depends on DMABUF_HEAPS_ROCKCHIP 14 help 15 Choose this option to enable dma-buf RockChip CMA heap. This heap is backed 16 by the Contiguous Memory Allocator (CMA). If your system has these 17 regions, you should say Y here. 18 19config DMABUF_HEAPS_ROCKCHIP_CMA_ALIGNMENT 20 int "Maximum PAGE_SIZE order of alignment for RockChip CMA Heap" 21 range 0 12 22 depends on DMABUF_HEAPS_ROCKCHIP_CMA_HEAP 23 default 8 24 help 25 DMA mapping framework by default aligns all buffers to the smallest 26 PAGE_SIZE order which is greater than or equal to the requested buffer 27 size. This works well for buffers up to a few hundreds kilobytes, but 28 for larger buffers it just a memory waste. With this parameter you can 29 specify the maximum PAGE_SIZE order for contiguous buffers. Larger 30 buffers will be aligned only to this specified order. The order is 31 expressed as a power of two multiplied by the PAGE_SIZE. 32 33 For example, if your system defaults to 4KiB pages, the order value 34 of 8 means that the buffers will be aligned up to 1MiB only. 35 36 If unsure, leave the default value "8". 37 38config DMABUF_RK_HEAPS_DEBUG 39 bool "DMA-BUF RockChip Heap Debug" 40 depends on DMABUF_HEAPS_ROCKCHIP 41 help 42 Choose this option to enable dma-buf RockChip heap debug. 43 44config DMABUF_RK_HEAPS_DEBUG_PRINT 45 bool "DMA-BUF RockChip Heap Debug print log enable" 46 depends on DMABUF_HEAPS_ROCKCHIP 47 help 48 Choose this option to enable dma-buf RockChip heap debug. 49