Kconfig 14 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529
  1. # SPDX-License-Identifier: GPL-2.0-only
  2. #
  3. # Drm device configuration
  4. #
  5. # This driver provides support for the
  6. # Direct Rendering Infrastructure (DRI) in XFree86 4.1.0 and higher.
  7. #
  8. menuconfig DRM
  9. tristate "Direct Rendering Manager (XFree86 4.1.0 and higher DRI support)"
  10. depends on (AGP || AGP=n) && !EMULATED_CMPXCHG && HAS_DMA
  11. select DRM_NOMODESET
  12. select DRM_PANEL_ORIENTATION_QUIRKS
  13. select HDMI
  14. select FB_CMDLINE
  15. select I2C
  16. select I2C_ALGOBIT
  17. select DMA_SHARED_BUFFER
  18. select SYNC_FILE
  19. # gallium uses SYS_kcmp for os_same_file_description() to de-duplicate
  20. # device and dmabuf fd. Let's make sure that is available for our userspace.
  21. select KCMP
  22. help
  23. Kernel-level support for the Direct Rendering Infrastructure (DRI)
  24. introduced in XFree86 4.0. If you say Y here, you need to select
  25. the module that's right for your graphics card from the list below.
  26. These modules provide support for synchronization, security, and
  27. DMA transfers. Please see <http://dri.sourceforge.net/> for more
  28. details. You should also select and configure AGP
  29. (/dev/agpgart) support if it is available for your platform.
  30. config DRM_MIPI_DBI
  31. tristate
  32. depends on DRM
  33. select DRM_KMS_HELPER
  34. config DRM_MIPI_DSI
  35. bool
  36. depends on DRM
  37. config DRM_DEBUG_MM
  38. bool "Insert extra checks and debug info into the DRM range managers"
  39. default n
  40. depends on DRM=y
  41. depends on STACKTRACE_SUPPORT
  42. select STACKDEPOT
  43. help
  44. Enable allocation tracking of memory manager and leak detection on
  45. shutdown.
  46. Recommended for driver developers only.
  47. If in doubt, say "N".
  48. config DRM_USE_DYNAMIC_DEBUG
  49. bool "use dynamic debug to implement drm.debug"
  50. default n
  51. depends on BROKEN
  52. depends on DRM
  53. depends on DYNAMIC_DEBUG || DYNAMIC_DEBUG_CORE
  54. depends on JUMP_LABEL
  55. help
  56. Use dynamic-debug to avoid drm_debug_enabled() runtime overheads.
  57. Due to callsite counts in DRM drivers (~4k in amdgpu) and 56
  58. bytes per callsite, the .data costs can be substantial, and
  59. are therefore configurable.
  60. config DRM_KUNIT_TEST
  61. tristate "KUnit tests for DRM" if !KUNIT_ALL_TESTS
  62. depends on DRM && KUNIT
  63. select PRIME_NUMBERS
  64. select DRM_DISPLAY_DP_HELPER
  65. select DRM_DISPLAY_HELPER
  66. select DRM_LIB_RANDOM
  67. select DRM_KMS_HELPER
  68. select DRM_BUDDY
  69. select DRM_EXPORT_FOR_TESTS if m
  70. default KUNIT_ALL_TESTS
  71. help
  72. This builds unit tests for DRM. This option is not useful for
  73. distributions or general kernels, but only for kernel
  74. developers working on DRM and associated drivers.
  75. For more information on KUnit and unit tests in general,
  76. please refer to the KUnit documentation in
  77. Documentation/dev-tools/kunit/.
  78. If in doubt, say "N".
  79. config DRM_KMS_HELPER
  80. tristate
  81. depends on DRM
  82. help
  83. CRTC helpers for KMS drivers.
  84. config DRM_DEBUG_DP_MST_TOPOLOGY_REFS
  85. bool "Enable refcount backtrace history in the DP MST helpers"
  86. depends on STACKTRACE_SUPPORT
  87. select STACKDEPOT
  88. depends on DRM_KMS_HELPER
  89. depends on DEBUG_KERNEL
  90. depends on EXPERT
  91. help
  92. Enables debug tracing for topology refs in DRM's DP MST helpers. A
  93. history of each topology reference/dereference will be printed to the
  94. kernel log once a port or branch device's topology refcount reaches 0.
  95. This has the potential to use a lot of memory and print some very
  96. large kernel messages. If in doubt, say "N".
  97. config DRM_DEBUG_MODESET_LOCK
  98. bool "Enable backtrace history for lock contention"
  99. depends on STACKTRACE_SUPPORT
  100. depends on DEBUG_KERNEL
  101. depends on EXPERT
  102. select STACKDEPOT
  103. default y if DEBUG_WW_MUTEX_SLOWPATH
  104. help
  105. Enable debug tracing of failures to gracefully handle drm modeset lock
  106. contention. A history of each drm modeset lock path hitting -EDEADLK
  107. will be saved until gracefully handled, and the backtrace will be
  108. printed when attempting to lock a contended lock.
  109. If in doubt, say "N".
  110. config DRM_FBDEV_EMULATION
  111. bool "Enable legacy fbdev support for your modesetting driver"
  112. depends on DRM_KMS_HELPER
  113. depends on FB=y || FB=DRM_KMS_HELPER
  114. select FB_CFB_FILLRECT
  115. select FB_CFB_COPYAREA
  116. select FB_CFB_IMAGEBLIT
  117. select FB_DEFERRED_IO
  118. select FB_SYS_FOPS
  119. select FB_SYS_FILLRECT
  120. select FB_SYS_COPYAREA
  121. select FB_SYS_IMAGEBLIT
  122. select FRAMEBUFFER_CONSOLE if !EXPERT
  123. select FRAMEBUFFER_CONSOLE_DETECT_PRIMARY if FRAMEBUFFER_CONSOLE
  124. default y
  125. help
  126. Choose this option if you have a need for the legacy fbdev
  127. support. Note that this support also provides the linux console
  128. support on top of your modesetting driver.
  129. If in doubt, say "Y".
  130. config DRM_FBDEV_OVERALLOC
  131. int "Overallocation of the fbdev buffer"
  132. depends on DRM_FBDEV_EMULATION
  133. default 100
  134. help
  135. Defines the fbdev buffer overallocation in percent. Default
  136. is 100. Typical values for double buffering will be 200,
  137. triple buffering 300.
  138. config DRM_FBDEV_LEAK_PHYS_SMEM
  139. bool "Shamelessly allow leaking of fbdev physical address (DANGEROUS)"
  140. depends on DRM_FBDEV_EMULATION && EXPERT
  141. default n
  142. help
  143. In order to keep user-space compatibility, we want in certain
  144. use-cases to keep leaking the fbdev physical address to the
  145. user-space program handling the fbdev buffer.
  146. This affects, not only, Amlogic, Allwinner or Rockchip devices
  147. with ARM Mali GPUs using an userspace Blob.
  148. This option is not supported by upstream developers and should be
  149. removed as soon as possible and be considered as a broken and
  150. legacy behaviour from a modern fbdev device driver.
  151. Please send any bug reports when using this to your proprietary
  152. software vendor that requires this.
  153. If in doubt, say "N" or spread the word to your closed source
  154. library vendor.
  155. config DRM_LOAD_EDID_FIRMWARE
  156. bool "Allow to specify an EDID data set instead of probing for it"
  157. depends on DRM
  158. help
  159. Say Y here, if you want to use EDID data to be loaded from the
  160. /lib/firmware directory or one of the provided built-in
  161. data sets. This may be necessary, if the graphics adapter or
  162. monitor are unable to provide appropriate EDID data. Since this
  163. feature is provided as a workaround for broken hardware, the
  164. default case is N. Details and instructions how to build your own
  165. EDID data are given in Documentation/admin-guide/edid.rst.
  166. source "drivers/gpu/drm/display/Kconfig"
  167. config DRM_TTM
  168. tristate
  169. depends on DRM && MMU
  170. help
  171. GPU memory management subsystem for devices with multiple
  172. GPU memory types. Will be enabled automatically if a device driver
  173. uses it.
  174. config DRM_BUDDY
  175. tristate
  176. depends on DRM
  177. help
  178. A page based buddy allocator
  179. config DRM_VRAM_HELPER
  180. tristate
  181. depends on DRM
  182. help
  183. Helpers for VRAM memory management
  184. config DRM_TTM_HELPER
  185. tristate
  186. depends on DRM
  187. select DRM_TTM
  188. help
  189. Helpers for ttm-based gem objects
  190. config DRM_GEM_DMA_HELPER
  191. tristate
  192. depends on DRM
  193. help
  194. Choose this if you need the GEM DMA helper functions
  195. config DRM_GEM_SHMEM_HELPER
  196. tristate
  197. depends on DRM && MMU
  198. help
  199. Choose this if you need the GEM shmem helper functions
  200. config DRM_SCHED
  201. tristate
  202. depends on DRM
  203. source "drivers/gpu/drm/i2c/Kconfig"
  204. source "drivers/gpu/drm/arm/Kconfig"
  205. config DRM_RADEON
  206. tristate "ATI Radeon"
  207. depends on DRM && PCI && MMU
  208. depends on AGP || !AGP
  209. select FW_LOADER
  210. select DRM_DISPLAY_DP_HELPER
  211. select DRM_DISPLAY_HELPER
  212. select DRM_KMS_HELPER
  213. select DRM_TTM
  214. select DRM_TTM_HELPER
  215. select POWER_SUPPLY
  216. select HWMON
  217. select BACKLIGHT_CLASS_DEVICE
  218. select INTERVAL_TREE
  219. # radeon depends on ACPI_VIDEO when ACPI is enabled, for select to work
  220. # ACPI_VIDEO's dependencies must also be selected.
  221. select INPUT if ACPI
  222. select ACPI_VIDEO if ACPI
  223. # On x86 ACPI_VIDEO also needs ACPI_WMI
  224. select X86_PLATFORM_DEVICES if ACPI && X86
  225. select ACPI_WMI if ACPI && X86
  226. help
  227. Choose this option if you have an ATI Radeon graphics card. There
  228. are both PCI and AGP versions. You don't need to choose this to
  229. run the Radeon in plain VGA mode.
  230. If M is selected, the module will be called radeon.
  231. source "drivers/gpu/drm/radeon/Kconfig"
  232. config DRM_AMDGPU
  233. tristate "AMD GPU"
  234. depends on DRM && PCI && MMU
  235. select FW_LOADER
  236. select DRM_DISPLAY_DP_HELPER
  237. select DRM_DISPLAY_HDMI_HELPER
  238. select DRM_DISPLAY_HELPER
  239. select DRM_KMS_HELPER
  240. select DRM_SCHED
  241. select DRM_TTM
  242. select DRM_TTM_HELPER
  243. select POWER_SUPPLY
  244. select HWMON
  245. select BACKLIGHT_CLASS_DEVICE
  246. select INTERVAL_TREE
  247. select DRM_BUDDY
  248. # amdgpu depends on ACPI_VIDEO when ACPI is enabled, for select to work
  249. # ACPI_VIDEO's dependencies must also be selected.
  250. select INPUT if ACPI
  251. select ACPI_VIDEO if ACPI
  252. # On x86 ACPI_VIDEO also needs ACPI_WMI
  253. select X86_PLATFORM_DEVICES if ACPI && X86
  254. select ACPI_WMI if ACPI && X86
  255. help
  256. Choose this option if you have a recent AMD Radeon graphics card.
  257. If M is selected, the module will be called amdgpu.
  258. source "drivers/gpu/drm/amd/amdgpu/Kconfig"
  259. source "drivers/gpu/drm/nouveau/Kconfig"
  260. source "drivers/gpu/drm/i915/Kconfig"
  261. source "drivers/gpu/drm/kmb/Kconfig"
  262. config DRM_VGEM
  263. tristate "Virtual GEM provider"
  264. depends on DRM && MMU
  265. select DRM_GEM_SHMEM_HELPER
  266. help
  267. Choose this option to get a virtual graphics memory manager,
  268. as used by Mesa's software renderer for enhanced performance.
  269. If M is selected the module will be called vgem.
  270. config DRM_VKMS
  271. tristate "Virtual KMS (EXPERIMENTAL)"
  272. depends on DRM && MMU
  273. select DRM_KMS_HELPER
  274. select DRM_GEM_SHMEM_HELPER
  275. select CRC32
  276. default n
  277. help
  278. Virtual Kernel Mode-Setting (VKMS) is used for testing or for
  279. running GPU in a headless machines. Choose this option to get
  280. a VKMS.
  281. If M is selected the module will be called vkms.
  282. source "drivers/gpu/drm/exynos/Kconfig"
  283. source "drivers/gpu/drm/rockchip/Kconfig"
  284. source "drivers/gpu/drm/vmwgfx/Kconfig"
  285. source "drivers/gpu/drm/gma500/Kconfig"
  286. source "drivers/gpu/drm/udl/Kconfig"
  287. source "drivers/gpu/drm/ast/Kconfig"
  288. source "drivers/gpu/drm/mgag200/Kconfig"
  289. source "drivers/gpu/drm/armada/Kconfig"
  290. source "drivers/gpu/drm/atmel-hlcdc/Kconfig"
  291. source "drivers/gpu/drm/rcar-du/Kconfig"
  292. source "drivers/gpu/drm/shmobile/Kconfig"
  293. source "drivers/gpu/drm/sun4i/Kconfig"
  294. source "drivers/gpu/drm/omapdrm/Kconfig"
  295. source "drivers/gpu/drm/tilcdc/Kconfig"
  296. source "drivers/gpu/drm/qxl/Kconfig"
  297. source "drivers/gpu/drm/virtio/Kconfig"
  298. source "drivers/gpu/drm/msm/Kconfig"
  299. source "drivers/gpu/drm/fsl-dcu/Kconfig"
  300. source "drivers/gpu/drm/tegra/Kconfig"
  301. source "drivers/gpu/drm/stm/Kconfig"
  302. source "drivers/gpu/drm/panel/Kconfig"
  303. source "drivers/gpu/drm/bridge/Kconfig"
  304. source "drivers/gpu/drm/sti/Kconfig"
  305. source "drivers/gpu/drm/imx/Kconfig"
  306. source "drivers/gpu/drm/ingenic/Kconfig"
  307. source "drivers/gpu/drm/v3d/Kconfig"
  308. source "drivers/gpu/drm/vc4/Kconfig"
  309. source "drivers/gpu/drm/etnaviv/Kconfig"
  310. source "drivers/gpu/drm/hisilicon/Kconfig"
  311. source "drivers/gpu/drm/logicvc/Kconfig"
  312. source "drivers/gpu/drm/mediatek/Kconfig"
  313. source "drivers/gpu/drm/mxsfb/Kconfig"
  314. source "drivers/gpu/drm/meson/Kconfig"
  315. source "drivers/gpu/drm/tiny/Kconfig"
  316. source "drivers/gpu/drm/pl111/Kconfig"
  317. source "drivers/gpu/drm/tve200/Kconfig"
  318. source "drivers/gpu/drm/xen/Kconfig"
  319. source "drivers/gpu/drm/vboxvideo/Kconfig"
  320. source "drivers/gpu/drm/lima/Kconfig"
  321. source "drivers/gpu/drm/panfrost/Kconfig"
  322. source "drivers/gpu/drm/aspeed/Kconfig"
  323. source "drivers/gpu/drm/mcde/Kconfig"
  324. source "drivers/gpu/drm/tidss/Kconfig"
  325. source "drivers/gpu/drm/xlnx/Kconfig"
  326. source "drivers/gpu/drm/gud/Kconfig"
  327. source "drivers/gpu/drm/solomon/Kconfig"
  328. source "drivers/gpu/drm/sprd/Kconfig"
  329. config DRM_HYPERV
  330. tristate "DRM Support for Hyper-V synthetic video device"
  331. depends on DRM && PCI && MMU && HYPERV
  332. select DRM_KMS_HELPER
  333. select DRM_GEM_SHMEM_HELPER
  334. help
  335. This is a KMS driver for Hyper-V synthetic video device. Choose this
  336. option if you would like to enable drm driver for Hyper-V virtual
  337. machine. Unselect Hyper-V framebuffer driver (CONFIG_FB_HYPERV) so
  338. that DRM driver is used by default.
  339. If M is selected the module will be called hyperv_drm.
  340. # Keep legacy drivers last
  341. menuconfig DRM_LEGACY
  342. bool "Enable legacy drivers (DANGEROUS)"
  343. depends on DRM && MMU
  344. help
  345. Enable legacy DRI1 drivers. Those drivers expose unsafe and dangerous
  346. APIs to user-space, which can be used to circumvent access
  347. restrictions and other security measures. For backwards compatibility
  348. those drivers are still available, but their use is highly
  349. inadvisable and might harm your system.
  350. You are recommended to use the safe modeset-only drivers instead, and
  351. perform 3D emulation in user-space.
  352. Unless you have strong reasons to go rogue, say "N".
  353. if DRM_LEGACY
  354. config DRM_TDFX
  355. tristate "3dfx Banshee/Voodoo3+"
  356. depends on DRM && PCI
  357. help
  358. Choose this option if you have a 3dfx Banshee or Voodoo3 (or later),
  359. graphics card. If M is selected, the module will be called tdfx.
  360. config DRM_R128
  361. tristate "ATI Rage 128"
  362. depends on DRM && PCI
  363. select FW_LOADER
  364. help
  365. Choose this option if you have an ATI Rage 128 graphics card. If M
  366. is selected, the module will be called r128. AGP support for
  367. this card is strongly suggested (unless you have a PCI version).
  368. config DRM_I810
  369. tristate "Intel I810"
  370. # !PREEMPTION because of missing ioctl locking
  371. depends on DRM && AGP && AGP_INTEL && (!PREEMPTION || BROKEN)
  372. help
  373. Choose this option if you have an Intel I810 graphics card. If M is
  374. selected, the module will be called i810. AGP support is required
  375. for this driver to work.
  376. config DRM_MGA
  377. tristate "Matrox g200/g400"
  378. depends on DRM && PCI
  379. select FW_LOADER
  380. help
  381. Choose this option if you have a Matrox G200, G400 or G450 graphics
  382. card. If M is selected, the module will be called mga. AGP
  383. support is required for this driver to work.
  384. config DRM_SIS
  385. tristate "SiS video cards"
  386. depends on DRM && AGP
  387. depends on FB_SIS || FB_SIS=n
  388. help
  389. Choose this option if you have a SiS 630 or compatible video
  390. chipset. If M is selected the module will be called sis. AGP
  391. support is required for this driver to work.
  392. config DRM_VIA
  393. tristate "Via unichrome video cards"
  394. depends on DRM && PCI
  395. help
  396. Choose this option if you have a Via unichrome or compatible video
  397. chipset. If M is selected the module will be called via.
  398. config DRM_SAVAGE
  399. tristate "Savage video cards"
  400. depends on DRM && PCI
  401. help
  402. Choose this option if you have a Savage3D/4/SuperSavage/Pro/Twister
  403. chipset. If M is selected the module will be called savage.
  404. endif # DRM_LEGACY
  405. config DRM_EXPORT_FOR_TESTS
  406. bool
  407. # Separate option because drm_panel_orientation_quirks.c is shared with fbdev
  408. config DRM_PANEL_ORIENTATION_QUIRKS
  409. tristate
  410. # Separate option because nomodeset parameter is global and expected built-in
  411. config DRM_NOMODESET
  412. bool
  413. default n
  414. config DRM_LIB_RANDOM
  415. bool
  416. default n
  417. config DRM_PRIVACY_SCREEN
  418. bool
  419. default n