hc
2023-12-11 d2ccde1c8e90d38cee87a1b0309ad2827f3fd30d
kernel/drivers/dma-buf/Kconfig
....@@ -1,18 +1,46 @@
1
+# SPDX-License-Identifier: GPL-2.0-only
12 menu "DMABUF options"
23
34 config DMABUF_CACHE
45 bool "DMABUF cache attachment"
56 default ARCH_ROCKCHIP
7
+ depends on NO_GKI
68 help
79 This option support to store attachments in a list and destroy them by
810 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.
937
1038 config SYNC_FILE
1139 bool "Explicit Synchronization Framework"
1240 default n
1341 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
1644 userspace. It enables send/receive 'struct dma_fence' objects to/from
1745 userspace via Sync File fds for synchronization between drivers via
1846 userspace components. It has been ported from Android.
....@@ -21,19 +49,52 @@
2149 associated with a buffer. When a job is submitted to the GPU a fence
2250 is attached to the buffer and is transferred via userspace, using Sync
2351 Files fds, to the DRM driver for example. More details at
24
- Documentation/sync_file.txt.
52
+ Documentation/driver-api/sync_file.rst.
2553
2654 config SW_SYNC
27
- bool "Sync File Validation Framework"
55
+ tristate "Sync File Validation Framework"
2856 default n
2957 depends on SYNC_FILE
30
- ---help---
58
+ help
3159 A sync object driver that uses a 32bit counter to coordinate
3260 synchronization. Useful when there is no hardware primitive backing
3361 the synchronization.
3462
3563 WARNING: improper use of this can result in deadlocking kernel
3664 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
3798
3899 menuconfig DMABUF_HEAPS
39100 bool "DMA-BUF Userland Memory Heaps"
....@@ -44,12 +105,18 @@
44105 allows userspace to allocate dma-bufs that can be shared
45106 between drivers.
46107
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
50111 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>.
52118
53119 source "drivers/dma-buf/heaps/Kconfig"
120
+source "drivers/dma-buf/rk_heaps/Kconfig"
54121
55122 endmenu