Kconfig 3.2 KB

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