brintos

brintos / linux-shallow public Read only

0
0
Text · 3.2 KiB · b46eb8a Raw
96 lines · plain
1# SPDX-License-Identifier: GPL-2.0-only2menu "DMABUF options"3 4config SYNC_FILE5	bool "Explicit Synchronization Framework"6	default n7	select DMA_SHARED_BUFFER8	help9	  The Sync File Framework adds explicit synchronization via10	  userspace. It enables send/receive 'struct dma_fence' objects to/from11	  userspace via Sync File fds for synchronization between drivers via12	  userspace components. It has been ported from Android.13 14	  The first and main user for this is graphics in which a fence is15	  associated with a buffer. When a job is submitted to the GPU a fence16	  is attached to the buffer and is transferred via userspace, using Sync17	  Files fds, to the DRM driver for example. More details at18	  Documentation/driver-api/sync_file.rst.19 20config SW_SYNC21	bool "Sync File Validation Framework"22	default n23	depends on SYNC_FILE24	depends on DEBUG_FS25	help26	  A sync object driver that uses a 32bit counter to coordinate27	  synchronization.  Useful when there is no hardware primitive backing28	  the synchronization.29 30	  WARNING: improper use of this can result in deadlocking kernel31	  drivers from userspace. Intended for test and debug only.32 33config UDMABUF34	bool "userspace dmabuf misc driver"35	default n36	depends on DMA_SHARED_BUFFER37	depends on MEMFD_CREATE || COMPILE_TEST38	depends on MMU39	help40	  A driver to let userspace turn memfd regions into dma-bufs.41	  Qemu can use this to create host dmabufs for guest framebuffers.42 43config DMABUF_MOVE_NOTIFY44	bool "Move notify between drivers (EXPERIMENTAL)"45	default n46	depends on DMA_SHARED_BUFFER47	help48	  Don't pin buffers if the dynamic DMA-buf interface is available on49	  both the exporter as well as the importer. This fixes a security50	  problem where userspace is able to pin unrestricted amounts of memory51	  through DMA-buf.52	  This is marked experimental because we don't yet have a consistent53	  execution context and memory management between drivers.54 55config DMABUF_DEBUG56	bool "DMA-BUF debug checks"57	depends on DMA_SHARED_BUFFER58	default y if DMA_API_DEBUG59	help60	  This option enables additional checks for DMA-BUF importers and61	  exporters. Specifically it validates that importers do not peek at the62	  underlying struct page when they import a buffer.63 64config DMABUF_SELFTESTS65	tristate "Selftests for the dma-buf interfaces"66	default n67	depends on DMA_SHARED_BUFFER68 69menuconfig DMABUF_HEAPS70	bool "DMA-BUF Userland Memory Heaps"71	select DMA_SHARED_BUFFER72	help73	  Choose this option to enable the DMA-BUF userland memory heaps.74	  This options creates per heap chardevs in /dev/dma_heap/ which75	  allows userspace to allocate dma-bufs that can be shared76	  between drivers.77 78menuconfig DMABUF_SYSFS_STATS79	bool "DMA-BUF sysfs statistics (DEPRECATED)"80	depends on DMA_SHARED_BUFFER81	help82	   Choose this option to enable DMA-BUF sysfs statistics83	   in location /sys/kernel/dmabuf/buffers.84 85	   /sys/kernel/dmabuf/buffers/<inode_number> will contain86	   statistics for the DMA-BUF with the unique inode number87	   <inode_number>.88 89	   This option is deprecated and should sooner or later be removed.90	   Android is the only user of this and it turned out that this resulted91	   in quite some performance problems.92 93source "drivers/dma-buf/heaps/Kconfig"94 95endmenu96