Orange Pi5 kernel

Deprecated Linux kernel 5.10.110 for OrangePi 5/5B/5+ boards

3 Commits   0 Branches   0 Tags
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   1) # SPDX-License-Identifier: GPL-2.0-only
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   2) menu "DMABUF options"
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   3) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   4) config DMABUF_CACHE
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   5) 	bool "DMABUF cache attachment"
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   6) 	default ARCH_ROCKCHIP
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   7) 	depends on NO_GKI
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   8) 	help
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   9) 	  This option support to store attachments in a list and destroy them by
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  10) 	  set to a callback list in the dtor of dma-buf.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  11) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  12) config DMABUF_DEBUG
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  13) 	bool "DMABUF debug option"
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  14) 	depends on NO_GKI
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  15) 	select RK_DMABUF_PROCFS
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  16) 	help
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  17) 	  This option support to debug all the dmabuf on db_list, allows to set
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  18) 	  a name for dmabuf. If not sure, say N
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  19) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  20) config DMABUF_DEBUG_ADVANCED
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  21) 	bool "DMABUF debug advanced option"
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  22) 	depends on DMABUF_DEBUG
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  23) 	help
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  24) 	  This option support to debug all the dmabuf on db_list, allows to attach
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  25) 	  and map a dmabuf who has no attachment. If not sure, say N
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  26) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  27) config SYNC_FILE
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  28) 	bool "Explicit Synchronization Framework"
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  29) 	default n
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  30) 	select DMA_SHARED_BUFFER
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  31) 	help
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  32) 	  The Sync File Framework adds explicit synchronization via
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  33) 	  userspace. It enables send/receive 'struct dma_fence' objects to/from
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  34) 	  userspace via Sync File fds for synchronization between drivers via
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  35) 	  userspace components. It has been ported from Android.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  36) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  37) 	  The first and main user for this is graphics in which a fence is
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  38) 	  associated with a buffer. When a job is submitted to the GPU a fence
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  39) 	  is attached to the buffer and is transferred via userspace, using Sync
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  40) 	  Files fds, to the DRM driver for example. More details at
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  41) 	  Documentation/driver-api/sync_file.rst.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  42) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  43) config SW_SYNC
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  44) 	tristate "Sync File Validation Framework"
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  45) 	default n
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  46) 	depends on SYNC_FILE
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  47) 	help
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  48) 	  A sync object driver that uses a 32bit counter to coordinate
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  49) 	  synchronization.  Useful when there is no hardware primitive backing
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  50) 	  the synchronization.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  51) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  52) 	  WARNING: improper use of this can result in deadlocking kernel
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  53) 	  drivers from userspace. Intended for test and debug only.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  54) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  55) config SW_SYNC_DEBUG
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  56) 	bool "SW Sync Debug"
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  57) 	depends on DEBUG_FS && SW_SYNC && NO_GKI
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  58) 	default SW_SYNC
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  59) 	help
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  60) 	  To get current fence point and timeline status.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  61) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  62) config UDMABUF
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  63) 	bool "userspace dmabuf misc driver"
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  64) 	default n
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  65) 	depends on DMA_SHARED_BUFFER
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  66) 	depends on MEMFD_CREATE || COMPILE_TEST
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  67) 	help
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  68) 	  A driver to let userspace turn memfd regions into dma-bufs.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  69) 	  Qemu can use this to create host dmabufs for guest framebuffers.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  70) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  71) config DMABUF_MOVE_NOTIFY
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  72) 	bool "Move notify between drivers (EXPERIMENTAL)"
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  73) 	default n
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  74) 	depends on DMA_SHARED_BUFFER
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  75) 	help
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  76) 	  Don't pin buffers if the dynamic DMA-buf interface is available on
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  77) 	  both the exporter as well as the importer. This fixes a security
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  78) 	  problem where userspace is able to pin unrestricted amounts of memory
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  79) 	  through DMA-buf.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  80) 	  This is marked experimental because we don't yet have a consistent
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  81) 	  execution context and memory management between drivers.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  82) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  83) config DMABUF_SELFTESTS
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  84) 	tristate "Selftests for the dma-buf interfaces"
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  85) 	default n
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  86) 	depends on DMA_SHARED_BUFFER
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  87) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  88) menuconfig DMABUF_HEAPS
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  89) 	bool "DMA-BUF Userland Memory Heaps"
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  90) 	select DMA_SHARED_BUFFER
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  91) 	help
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  92) 	  Choose this option to enable the DMA-BUF userland memory heaps.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  93) 	  This options creates per heap chardevs in /dev/dma_heap/ which
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  94) 	  allows userspace to allocate dma-bufs that can be shared
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  95) 	  between drivers.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  96) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  97) menuconfig DMABUF_SYSFS_STATS
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  98) 	bool "DMA-BUF sysfs statistics"
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  99) 	select DMA_SHARED_BUFFER
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 100) 	help
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 101) 	   Choose this option to enable DMA-BUF sysfs statistics
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 102) 	   in location /sys/kernel/dmabuf/buffers.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 103) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 104) 	   /sys/kernel/dmabuf/buffers/<inode_number> will contain
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 105) 	   statistics for the DMA-BUF with the unique inode number
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 106) 	   <inode_number>.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 107) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 108) source "drivers/dma-buf/heaps/Kconfig"
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 109) source "drivers/dma-buf/rk_heaps/Kconfig"
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 110) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 111) endmenu