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