Commit | Line | Data |
---|---|---|
ec8f24b7 | 1 | # SPDX-License-Identifier: GPL-2.0-only |
62304fb1 GP |
2 | menu "DMABUF options" |
3 | ||
4 | config SYNC_FILE | |
31954660 | 5 | bool "Explicit Synchronization Framework" |
62304fb1 | 6 | default n |
62304fb1 | 7 | select DMA_SHARED_BUFFER |
a7f7f624 | 8 | help |
3e8a3844 | 9 | The Sync File Framework adds explicit synchronization via |
f54d1867 | 10 | userspace. It enables send/receive 'struct dma_fence' objects to/from |
31954660 GP |
11 | userspace via Sync File fds for synchronization between drivers via |
12 | userspace components. It has been ported from Android. | |
13 | ||
14 | The first and main user for this is graphics in which a fence is | |
15 | associated with a buffer. When a job is submitted to the GPU a fence | |
16 | is attached to the buffer and is transferred via userspace, using Sync | |
17 | Files fds, to the DRM driver for example. More details at | |
baa293e9 | 18 | Documentation/driver-api/sync_file.rst. |
31954660 | 19 | |
35538d78 GP |
20 | config SW_SYNC |
21 | bool "Sync File Validation Framework" | |
22 | default n | |
23 | depends on SYNC_FILE | |
24 | depends on DEBUG_FS | |
a7f7f624 | 25 | help |
35538d78 GP |
26 | A sync object driver that uses a 32bit counter to coordinate |
27 | synchronization. Useful when there is no hardware primitive backing | |
28 | the synchronization. | |
29 | ||
30 | WARNING: improper use of this can result in deadlocking kernel | |
31 | drivers from userspace. Intended for test and debug only. | |
32 | ||
fbb0de79 GH |
33 | config UDMABUF |
34 | bool "userspace dmabuf misc driver" | |
35 | default n | |
36 | depends on DMA_SHARED_BUFFER | |
68d2f70e | 37 | depends on MEMFD_CREATE || COMPILE_TEST |
fbb0de79 GH |
38 | help |
39 | A driver to let userspace turn memfd regions into dma-bufs. | |
40 | Qemu can use this to create host dmabufs for guest framebuffers. | |
41 | ||
bb42df46 CK |
42 | config DMABUF_MOVE_NOTIFY |
43 | bool "Move notify between drivers (EXPERIMENTAL)" | |
44 | default n | |
c4f3a346 | 45 | depends on DMA_SHARED_BUFFER |
bb42df46 | 46 | help |
518110cd GU |
47 | Don't pin buffers if the dynamic DMA-buf interface is available on |
48 | both the exporter as well as the importer. This fixes a security | |
49 | problem where userspace is able to pin unrestricted amounts of memory | |
50 | through DMA-buf. | |
51 | This is marked experimental because we don't yet have a consistent | |
52 | execution context and memory management between drivers. | |
bb42df46 | 53 | |
84335675 DV |
54 | config DMABUF_DEBUG |
55 | bool "DMA-BUF debug checks" | |
cca62758 | 56 | depends on DMA_SHARED_BUFFER |
84335675 DV |
57 | default y if DMA_API_DEBUG |
58 | help | |
59 | This option enables additional checks for DMA-BUF importers and | |
60 | exporters. Specifically it validates that importers do not peek at the | |
61 | underlying struct page when they import a buffer. | |
62 | ||
9536b64a CW |
63 | config DMABUF_SELFTESTS |
64 | tristate "Selftests for the dma-buf interfaces" | |
65 | default n | |
66 | depends on DMA_SHARED_BUFFER | |
67 | ||
c02a81fb AD |
68 | menuconfig DMABUF_HEAPS |
69 | bool "DMA-BUF Userland Memory Heaps" | |
70 | select DMA_SHARED_BUFFER | |
71 | help | |
72 | Choose this option to enable the DMA-BUF userland memory heaps. | |
73 | This options creates per heap chardevs in /dev/dma_heap/ which | |
74 | allows userspace to allocate dma-bufs that can be shared | |
75 | between drivers. | |
76 | ||
bdb8d06d | 77 | menuconfig DMABUF_SYSFS_STATS |
e0a9f1fe | 78 | bool "DMA-BUF sysfs statistics (DEPRECATED)" |
87fd9ef4 | 79 | depends on DMA_SHARED_BUFFER |
bdb8d06d HV |
80 | help |
81 | Choose this option to enable DMA-BUF sysfs statistics | |
82 | in location /sys/kernel/dmabuf/buffers. | |
83 | ||
84 | /sys/kernel/dmabuf/buffers/<inode_number> will contain | |
85 | statistics for the DMA-BUF with the unique inode number | |
86 | <inode_number>. | |
87 | ||
e0a9f1fe CK |
88 | This option is deprecated and should sooner or later be removed. |
89 | Android is the only user of this and it turned out that this resulted | |
90 | in quite some performance problems. | |
91 | ||
efa04fef JS |
92 | source "drivers/dma-buf/heaps/Kconfig" |
93 | ||
62304fb1 | 94 | endmenu |