Kconfig 2.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980
  1. # SPDX-License-Identifier: GPL-2.0-only
  2. menu "DMABUF options"
  3. config SYNC_FILE
  4. bool "Explicit Synchronization Framework"
  5. default n
  6. select DMA_SHARED_BUFFER
  7. help
  8. The Sync File Framework adds explicit synchronization via
  9. userspace. It enables send/receive 'struct dma_fence' objects to/from
  10. userspace via Sync File fds for synchronization between drivers via
  11. userspace components. It has been ported from Android.
  12. The first and main user for this is graphics in which a fence is
  13. associated with a buffer. When a job is submitted to the GPU a fence
  14. is attached to the buffer and is transferred via userspace, using Sync
  15. Files fds, to the DRM driver for example. More details at
  16. Documentation/driver-api/sync_file.rst.
  17. config SW_SYNC
  18. bool "Sync File Validation Framework"
  19. default n
  20. depends on SYNC_FILE
  21. depends on DEBUG_FS
  22. help
  23. A sync object driver that uses a 32bit counter to coordinate
  24. synchronization. Useful when there is no hardware primitive backing
  25. the synchronization.
  26. WARNING: improper use of this can result in deadlocking kernel
  27. drivers from userspace. Intended for test and debug only.
  28. config UDMABUF
  29. bool "userspace dmabuf misc driver"
  30. default n
  31. depends on DMA_SHARED_BUFFER
  32. depends on MEMFD_CREATE || COMPILE_TEST
  33. depends on MMU
  34. help
  35. A driver to let userspace turn memfd regions into dma-bufs.
  36. Qemu can use this to create host dmabufs for guest framebuffers.
  37. config DMABUF_MOVE_NOTIFY
  38. bool "Move notify between drivers (EXPERIMENTAL)"
  39. default n
  40. depends on DMA_SHARED_BUFFER
  41. help
  42. Don't pin buffers if the dynamic DMA-buf interface is available on
  43. both the exporter as well as the importer. This fixes a security
  44. problem where userspace is able to pin unrestricted amounts of memory
  45. through DMA-buf.
  46. This is marked experimental because we don't yet have a consistent
  47. execution context and memory management between drivers.
  48. config DMABUF_DEBUG
  49. bool "DMA-BUF debug checks"
  50. depends on DMA_SHARED_BUFFER
  51. default y if DEBUG
  52. help
  53. This option enables additional checks for DMA-BUF importers and
  54. exporters. Specifically it validates that importers do not peek at the
  55. underlying struct page when they import a buffer.
  56. config DMABUF_SELFTESTS
  57. tristate "Selftests for the dma-buf interfaces"
  58. default n
  59. depends on DMA_SHARED_BUFFER
  60. menuconfig DMABUF_HEAPS
  61. bool "DMA-BUF Userland Memory Heaps"
  62. select DMA_SHARED_BUFFER
  63. help
  64. Choose this option to enable the DMA-BUF userland memory heaps.
  65. This options creates per heap chardevs in /dev/dma_heap/ which
  66. allows userspace to allocate dma-bufs that can be shared
  67. between drivers.
  68. source "drivers/dma-buf/heaps/Kconfig"
  69. endmenu