.. | .. |
---|
| 1 | +# SPDX-License-Identifier: GPL-2.0-only |
---|
1 | 2 | menu "DMABUF options" |
---|
2 | 3 | |
---|
3 | 4 | config DMABUF_CACHE |
---|
4 | 5 | bool "DMABUF cache attachment" |
---|
5 | 6 | default ARCH_ROCKCHIP |
---|
| 7 | + depends on NO_GKI |
---|
6 | 8 | help |
---|
7 | 9 | This option support to store attachments in a list and destroy them by |
---|
8 | 10 | set to a callback list in the dtor of dma-buf. |
---|
| 11 | + |
---|
| 12 | +config 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 | + |
---|
| 20 | +config 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 | + |
---|
| 27 | +config 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. |
---|
9 | 37 | |
---|
10 | 38 | config SYNC_FILE |
---|
11 | 39 | bool "Explicit Synchronization Framework" |
---|
12 | 40 | default n |
---|
13 | 41 | select DMA_SHARED_BUFFER |
---|
14 | | - ---help--- |
---|
15 | | - The Sync File Framework adds explicit syncronization via |
---|
| 42 | + help |
---|
| 43 | + The Sync File Framework adds explicit synchronization via |
---|
16 | 44 | userspace. It enables send/receive 'struct dma_fence' objects to/from |
---|
17 | 45 | userspace via Sync File fds for synchronization between drivers via |
---|
18 | 46 | userspace components. It has been ported from Android. |
---|
.. | .. |
---|
21 | 49 | associated with a buffer. When a job is submitted to the GPU a fence |
---|
22 | 50 | is attached to the buffer and is transferred via userspace, using Sync |
---|
23 | 51 | Files fds, to the DRM driver for example. More details at |
---|
24 | | - Documentation/sync_file.txt. |
---|
| 52 | + Documentation/driver-api/sync_file.rst. |
---|
25 | 53 | |
---|
26 | 54 | config SW_SYNC |
---|
27 | | - bool "Sync File Validation Framework" |
---|
| 55 | + tristate "Sync File Validation Framework" |
---|
28 | 56 | default n |
---|
29 | 57 | depends on SYNC_FILE |
---|
30 | | - ---help--- |
---|
| 58 | + help |
---|
31 | 59 | A sync object driver that uses a 32bit counter to coordinate |
---|
32 | 60 | synchronization. Useful when there is no hardware primitive backing |
---|
33 | 61 | the synchronization. |
---|
34 | 62 | |
---|
35 | 63 | WARNING: improper use of this can result in deadlocking kernel |
---|
36 | 64 | drivers from userspace. Intended for test and debug only. |
---|
| 65 | + |
---|
| 66 | +config 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 | + |
---|
| 73 | +config 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 | + |
---|
| 82 | +config 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 | + |
---|
| 94 | +config DMABUF_SELFTESTS |
---|
| 95 | + tristate "Selftests for the dma-buf interfaces" |
---|
| 96 | + default n |
---|
| 97 | + depends on DMA_SHARED_BUFFER |
---|
37 | 98 | |
---|
38 | 99 | menuconfig DMABUF_HEAPS |
---|
39 | 100 | bool "DMA-BUF Userland Memory Heaps" |
---|
.. | .. |
---|
44 | 105 | allows userspace to allocate dma-bufs that can be shared |
---|
45 | 106 | between drivers. |
---|
46 | 107 | |
---|
47 | | -config DMABUF_PAGE_POOL |
---|
48 | | - bool "DMA-BUF page-pool library" |
---|
49 | | - depends on !DMABUF_HEAPS |
---|
| 108 | +menuconfig DMABUF_SYSFS_STATS |
---|
| 109 | + bool "DMA-BUF sysfs statistics" |
---|
| 110 | + depends on DMA_SHARED_BUFFER |
---|
50 | 111 | help |
---|
51 | | - Choose this option to enable the DMA-BUF page-pool library. |
---|
| 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>. |
---|
52 | 118 | |
---|
53 | 119 | source "drivers/dma-buf/heaps/Kconfig" |
---|
| 120 | +source "drivers/dma-buf/rk_heaps/Kconfig" |
---|
54 | 121 | |
---|
55 | 122 | endmenu |
---|