Kconfig 3.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394
  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. help
  34. A driver to let userspace turn memfd regions into dma-bufs.
  35. Qemu can use this to create host dmabufs for guest framebuffers.
  36. config DMABUF_MOVE_NOTIFY
  37. bool "Move notify between drivers (EXPERIMENTAL)"
  38. default n
  39. depends on DMA_SHARED_BUFFER
  40. help
  41. Don't pin buffers if the dynamic DMA-buf interface is available on
  42. both the exporter as well as the importer. This fixes a security
  43. problem where userspace is able to pin unrestricted amounts of memory
  44. through DMA-buf.
  45. This is marked experimental because we don't yet have a consistent
  46. execution context and memory management between drivers.
  47. config DMABUF_DEBUG
  48. bool "DMA-BUF debug checks"
  49. depends on DMA_SHARED_BUFFER
  50. default y if DMA_API_DEBUG
  51. help
  52. This option enables additional checks for DMA-BUF importers and
  53. exporters. Specifically it validates that importers do not peek at the
  54. underlying struct page when they import a buffer.
  55. config DMABUF_SELFTESTS
  56. tristate "Selftests for the dma-buf interfaces"
  57. default n
  58. depends on DMA_SHARED_BUFFER
  59. menuconfig DMABUF_HEAPS
  60. bool "DMA-BUF Userland Memory Heaps"
  61. select DMA_SHARED_BUFFER
  62. help
  63. Choose this option to enable the DMA-BUF userland memory heaps.
  64. This options creates per heap chardevs in /dev/dma_heap/ which
  65. allows userspace to allocate dma-bufs that can be shared
  66. between drivers.
  67. menuconfig DMABUF_SYSFS_STATS
  68. bool "DMA-BUF sysfs statistics (DEPRECATED)"
  69. depends on DMA_SHARED_BUFFER
  70. help
  71. Choose this option to enable DMA-BUF sysfs statistics
  72. in location /sys/kernel/dmabuf/buffers.
  73. /sys/kernel/dmabuf/buffers/<inode_number> will contain
  74. statistics for the DMA-BUF with the unique inode number
  75. <inode_number>.
  76. This option is deprecated and should sooner or later be removed.
  77. Android is the only user of this and it turned out that this resulted
  78. in quite some performance problems.
  79. source "drivers/dma-buf/heaps/Kconfig"
  80. endmenu