1# SPDX-License-Identifier: GPL-2.0-only 2menu "DMABUF options" 3 4config DMABUF_CACHE 5 bool "DMABUF cache attachment" 6 default ARCH_ROCKCHIP 7 depends on NO_GKI 8 help 9 This option support to store attachments in a list and destroy them by 10 set to a callback list in the dtor of dma-buf. 11 12config RK_DMABUF_DEBUG 13 bool "Rockchip DMABUF debug option" 14 depends on NO_GKI 15 select RK_DMABUF_PROCFS 16 help 17 This option support to debug all the dmabuf on db_list, allows to set 18 a name for dmabuf. If not sure, say N 19 20config RK_DMABUF_DEBUG_ADVANCED 21 bool "Rockchip DMABUF debug advanced option" 22 depends on RK_DMABUF_DEBUG 23 help 24 This option support to debug all the dmabuf on db_list, allows to attach 25 and map a dmabuf who has no attachment. If not sure, say N 26 27config DMABUF_PARTIAL 28 bool "Support for partial cache maintenance" 29 default y 30 help 31 In order to improve performance, allow dma-buf clients to 32 apply cache maintenance to only a subset of a dma-buf. 33 34 Kernel clients will be able to use the dma_buf_begin_cpu_access_partial 35 and dma_buf_end_cpu_access_partial functions to only apply cache 36 maintenance to a range within the dma-buf. 37 38config SYNC_FILE 39 bool "Explicit Synchronization Framework" 40 default n 41 select DMA_SHARED_BUFFER 42 help 43 The Sync File Framework adds explicit synchronization via 44 userspace. It enables send/receive 'struct dma_fence' objects to/from 45 userspace via Sync File fds for synchronization between drivers via 46 userspace components. It has been ported from Android. 47 48 The first and main user for this is graphics in which a fence is 49 associated with a buffer. When a job is submitted to the GPU a fence 50 is attached to the buffer and is transferred via userspace, using Sync 51 Files fds, to the DRM driver for example. More details at 52 Documentation/driver-api/sync_file.rst. 53 54config SW_SYNC 55 tristate "Sync File Validation Framework" 56 default n 57 depends on SYNC_FILE 58 help 59 A sync object driver that uses a 32bit counter to coordinate 60 synchronization. Useful when there is no hardware primitive backing 61 the synchronization. 62 63 WARNING: improper use of this can result in deadlocking kernel 64 drivers from userspace. Intended for test and debug only. 65 66config SW_SYNC_DEBUG 67 bool "SW Sync Debug" 68 depends on DEBUG_FS && SW_SYNC && NO_GKI 69 default SW_SYNC 70 help 71 To get current fence point and timeline status. 72 73config UDMABUF 74 bool "userspace dmabuf misc driver" 75 default n 76 depends on DMA_SHARED_BUFFER 77 depends on MEMFD_CREATE || COMPILE_TEST 78 help 79 A driver to let userspace turn memfd regions into dma-bufs. 80 Qemu can use this to create host dmabufs for guest framebuffers. 81 82config DMABUF_MOVE_NOTIFY 83 bool "Move notify between drivers (EXPERIMENTAL)" 84 default n 85 depends on DMA_SHARED_BUFFER 86 help 87 Don't pin buffers if the dynamic DMA-buf interface is available on 88 both the exporter as well as the importer. This fixes a security 89 problem where userspace is able to pin unrestricted amounts of memory 90 through DMA-buf. 91 This is marked experimental because we don't yet have a consistent 92 execution context and memory management between drivers. 93 94config DMABUF_SELFTESTS 95 tristate "Selftests for the dma-buf interfaces" 96 default n 97 depends on DMA_SHARED_BUFFER 98 99menuconfig DMABUF_HEAPS 100 bool "DMA-BUF Userland Memory Heaps" 101 select DMA_SHARED_BUFFER 102 help 103 Choose this option to enable the DMA-BUF userland memory heaps. 104 This options creates per heap chardevs in /dev/dma_heap/ which 105 allows userspace to allocate dma-bufs that can be shared 106 between drivers. 107 108menuconfig DMABUF_SYSFS_STATS 109 bool "DMA-BUF sysfs statistics" 110 depends on DMA_SHARED_BUFFER 111 help 112 Choose this option to enable DMA-BUF sysfs statistics 113 in location /sys/kernel/dmabuf/buffers. 114 115 /sys/kernel/dmabuf/buffers/<inode_number> will contain 116 statistics for the DMA-BUF with the unique inode number 117 <inode_number>. 118 119source "drivers/dma-buf/heaps/Kconfig" 120source "drivers/dma-buf/rk_heaps/Kconfig" 121 122endmenu 123