Kconfig 15 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536
  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_PANEL_ORIENTATION_QUIRKS
  12. select DRM_KMS_HELPER if DRM_FBDEV_EMULATION
  13. select FB_CORE if DRM_FBDEV_EMULATION
  14. select FB_SYSMEM_HELPERS_DEFERRED if DRM_FBDEV_EMULATION
  15. select HDMI
  16. select I2C
  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. select VIDEO
  23. help
  24. Kernel-level support for the Direct Rendering Infrastructure (DRI)
  25. introduced in XFree86 4.0. If you say Y here, you need to select
  26. the module that's right for your graphics card from the list below.
  27. These modules provide support for synchronization, security, and
  28. DMA transfers. Please see <http://dri.sourceforge.net/> for more
  29. details. You should also select and configure AGP
  30. (/dev/agpgart) support if it is available for your platform.
  31. if DRM
  32. config DRM_MIPI_DBI
  33. tristate
  34. depends on DRM
  35. select DRM_KMS_HELPER
  36. config DRM_MIPI_DSI
  37. bool
  38. depends on DRM
  39. config DRM_DEBUG_MM
  40. bool "Insert extra checks and debug info into the DRM range managers"
  41. default n
  42. depends on DRM
  43. depends on STACKTRACE_SUPPORT
  44. select STACKDEPOT
  45. help
  46. Enable allocation tracking of memory manager and leak detection on
  47. shutdown.
  48. Recommended for driver developers only.
  49. If in doubt, say "N".
  50. config DRM_USE_DYNAMIC_DEBUG
  51. bool "use dynamic debug to implement drm.debug"
  52. default n
  53. depends on BROKEN
  54. depends on DRM
  55. depends on DYNAMIC_DEBUG || DYNAMIC_DEBUG_CORE
  56. depends on JUMP_LABEL
  57. help
  58. Use dynamic-debug to avoid drm_debug_enabled() runtime overheads.
  59. Due to callsite counts in DRM drivers (~4k in amdgpu) and 56
  60. bytes per callsite, the .data costs can be substantial, and
  61. are therefore configurable.
  62. config DRM_KUNIT_TEST_HELPERS
  63. tristate
  64. depends on DRM && KUNIT
  65. select DRM_KMS_HELPER
  66. help
  67. KUnit Helpers for KMS drivers.
  68. config DRM_KUNIT_TEST
  69. tristate "KUnit tests for DRM" if !KUNIT_ALL_TESTS
  70. depends on DRM && KUNIT && MMU
  71. select DRM_BUDDY
  72. select DRM_DISPLAY_DP_HELPER
  73. select DRM_DISPLAY_HDMI_STATE_HELPER
  74. select DRM_DISPLAY_HELPER
  75. select DRM_EXEC
  76. select DRM_EXPORT_FOR_TESTS if m
  77. select DRM_GEM_SHMEM_HELPER
  78. select DRM_KUNIT_TEST_HELPERS
  79. select DRM_LIB_RANDOM
  80. select PRIME_NUMBERS
  81. default KUNIT_ALL_TESTS
  82. help
  83. This builds unit tests for DRM. This option is not useful for
  84. distributions or general kernels, but only for kernel
  85. developers working on DRM and associated drivers.
  86. For more information on KUnit and unit tests in general,
  87. please refer to the KUnit documentation in
  88. Documentation/dev-tools/kunit/.
  89. If in doubt, say "N".
  90. config DRM_KMS_HELPER
  91. tristate
  92. depends on DRM
  93. help
  94. CRTC helpers for KMS drivers.
  95. config DRM_DRAW
  96. bool
  97. depends on DRM
  98. config DRM_PANIC
  99. bool "Display a user-friendly message when a kernel panic occurs"
  100. depends on DRM
  101. select FONT_SUPPORT
  102. select DRM_DRAW
  103. help
  104. Enable a drm panic handler, which will display a user-friendly message
  105. when a kernel panic occurs. It's useful when using a user-space
  106. console instead of fbcon.
  107. It will only work if your graphic driver supports this feature.
  108. To support Hi-DPI Display, you can enable bigger fonts like
  109. FONT_TER16x32
  110. config DRM_PANIC_FOREGROUND_COLOR
  111. hex "Drm panic screen foreground color, in RGB"
  112. depends on DRM_PANIC
  113. default 0xffffff
  114. config DRM_PANIC_BACKGROUND_COLOR
  115. hex "Drm panic screen background color, in RGB"
  116. depends on DRM_PANIC
  117. default 0x000000
  118. config DRM_PANIC_DEBUG
  119. bool "Add a debug fs entry to trigger drm_panic"
  120. depends on DRM_PANIC && DEBUG_FS
  121. help
  122. Add dri/[device]/drm_panic_plane_x in the kernel debugfs, to force the
  123. panic handler to write the panic message to this plane scanout buffer.
  124. This is unsafe and should not be enabled on a production build.
  125. If in doubt, say "N".
  126. config DRM_PANIC_SCREEN
  127. string "Panic screen formatter"
  128. default "user"
  129. depends on DRM_PANIC
  130. help
  131. This option enable to choose what will be displayed when a kernel
  132. panic occurs. You can choose between "user", a short message telling
  133. the user to reboot the system, or "kmsg" which will display the last
  134. lines of kmsg.
  135. This can also be overridden by drm.panic_screen=xxxx kernel parameter
  136. or by writing to /sys/module/drm/parameters/panic_screen sysfs entry
  137. Default is "user"
  138. config DRM_PANIC_SCREEN_QR_CODE
  139. bool "Add a panic screen with a QR code"
  140. depends on DRM_PANIC && RUST
  141. select ZLIB_DEFLATE
  142. help
  143. This option adds a QR code generator, and a panic screen with a QR
  144. code. The QR code will contain the last lines of kmsg and other debug
  145. information. This should be easier for the user to report a kernel
  146. panic, with all debug information available.
  147. To use this panic screen, also set DRM_PANIC_SCREEN to "qr_code"
  148. config DRM_PANIC_SCREEN_QR_CODE_URL
  149. string "Base URL of the QR code in the panic screen"
  150. depends on DRM_PANIC_SCREEN_QR_CODE
  151. help
  152. This option sets the base URL to report the kernel panic. If it's set
  153. the QR code will contain the URL and the kmsg compressed with zlib as
  154. a URL parameter. If it's empty, the QR code will contain the kmsg as
  155. uncompressed text only.
  156. There is a demo code in javascript, to decode and uncompress the kmsg
  157. data from the URL parameter at https://github.com/kdj0c/panic_report
  158. config DRM_PANIC_SCREEN_QR_VERSION
  159. int "Maximum version (size) of the QR code."
  160. depends on DRM_PANIC_SCREEN_QR_CODE
  161. default 40
  162. help
  163. This option limits the version (or size) of the QR code. QR code
  164. version ranges from Version 1 (21x21) to Version 40 (177x177).
  165. Smaller QR code are easier to read, but will contain less debugging
  166. data. Default is 40.
  167. config DRM_DEBUG_DP_MST_TOPOLOGY_REFS
  168. bool "Enable refcount backtrace history in the DP MST helpers"
  169. depends on STACKTRACE_SUPPORT
  170. select STACKDEPOT
  171. select DRM_KMS_HELPER
  172. depends on DEBUG_KERNEL
  173. depends on EXPERT
  174. help
  175. Enables debug tracing for topology refs in DRM's DP MST helpers. A
  176. history of each topology reference/dereference will be printed to the
  177. kernel log once a port or branch device's topology refcount reaches 0.
  178. This has the potential to use a lot of memory and print some very
  179. large kernel messages. If in doubt, say "N".
  180. config DRM_DEBUG_MODESET_LOCK
  181. bool "Enable backtrace history for lock contention"
  182. depends on STACKTRACE_SUPPORT
  183. depends on DEBUG_KERNEL
  184. depends on EXPERT
  185. select STACKDEPOT
  186. default y if DEBUG_WW_MUTEX_SLOWPATH
  187. help
  188. Enable debug tracing of failures to gracefully handle drm modeset lock
  189. contention. A history of each drm modeset lock path hitting -EDEADLK
  190. will be saved until gracefully handled, and the backtrace will be
  191. printed when attempting to lock a contended lock.
  192. If in doubt, say "N".
  193. config DRM_CLIENT_SELECTION
  194. bool
  195. depends on DRM
  196. select DRM_CLIENT_SETUP if DRM_FBDEV_EMULATION
  197. help
  198. Drivers that support in-kernel DRM clients have to select this
  199. option.
  200. config DRM_CLIENT_SETUP
  201. bool
  202. depends on DRM_CLIENT_SELECTION
  203. config DRM_FBDEV_EMULATION
  204. bool "Enable legacy fbdev support for your modesetting driver"
  205. depends on DRM
  206. select FRAMEBUFFER_CONSOLE_DETECT_PRIMARY if FRAMEBUFFER_CONSOLE
  207. default FB
  208. help
  209. Choose this option if you have a need for the legacy fbdev
  210. support. Note that this support also provides the linux console
  211. support on top of your modesetting driver.
  212. If in doubt, say "Y".
  213. config DRM_FBDEV_OVERALLOC
  214. int "Overallocation of the fbdev buffer"
  215. depends on DRM_FBDEV_EMULATION
  216. default 100
  217. help
  218. Defines the fbdev buffer overallocation in percent. Default
  219. is 100. Typical values for double buffering will be 200,
  220. triple buffering 300.
  221. config DRM_FBDEV_LEAK_PHYS_SMEM
  222. bool "Shamelessly allow leaking of fbdev physical address (DANGEROUS)"
  223. depends on DRM_FBDEV_EMULATION && EXPERT
  224. default n
  225. help
  226. In order to keep user-space compatibility, we want in certain
  227. use-cases to keep leaking the fbdev physical address to the
  228. user-space program handling the fbdev buffer.
  229. This affects, not only, Amlogic, Allwinner or Rockchip devices
  230. with ARM Mali GPUs using an userspace Blob.
  231. This option is not supported by upstream developers and should be
  232. removed as soon as possible and be considered as a broken and
  233. legacy behaviour from a modern fbdev device driver.
  234. Please send any bug reports when using this to your proprietary
  235. software vendor that requires this.
  236. If in doubt, say "N" or spread the word to your closed source
  237. library vendor.
  238. config DRM_LOAD_EDID_FIRMWARE
  239. bool "Allow to specify an EDID data set instead of probing for it"
  240. depends on DRM
  241. help
  242. Say Y here, if you want to use EDID data to be loaded from the
  243. /lib/firmware directory or one of the provided built-in
  244. data sets. This may be necessary, if the graphics adapter or
  245. monitor are unable to provide appropriate EDID data. Since this
  246. feature is provided as a workaround for broken hardware, the
  247. default case is N. Details and instructions how to build your own
  248. EDID data are given in Documentation/admin-guide/edid.rst.
  249. source "drivers/gpu/drm/display/Kconfig"
  250. config DRM_TTM
  251. tristate
  252. depends on DRM && MMU
  253. help
  254. GPU memory management subsystem for devices with multiple
  255. GPU memory types. Will be enabled automatically if a device driver
  256. uses it.
  257. config DRM_TTM_KUNIT_TEST
  258. tristate "KUnit tests for TTM" if !KUNIT_ALL_TESTS
  259. default n
  260. depends on DRM && KUNIT && MMU && (UML || COMPILE_TEST)
  261. select DRM_TTM
  262. select DRM_BUDDY
  263. select DRM_EXPORT_FOR_TESTS if m
  264. select DRM_KUNIT_TEST_HELPERS
  265. default KUNIT_ALL_TESTS
  266. help
  267. Enables unit tests for TTM, a GPU memory manager subsystem used
  268. to manage memory buffers. This option is mostly useful for kernel
  269. developers. It depends on (UML || COMPILE_TEST) since no other driver
  270. which uses TTM can be loaded while running the tests.
  271. If in doubt, say "N".
  272. config DRM_EXEC
  273. tristate
  274. depends on DRM
  275. help
  276. Execution context for command submissions
  277. config DRM_GPUVM
  278. tristate
  279. depends on DRM
  280. select DRM_EXEC
  281. help
  282. GPU-VM representation providing helpers to manage a GPUs virtual
  283. address space
  284. config DRM_BUDDY
  285. tristate
  286. depends on DRM
  287. help
  288. A page based buddy allocator
  289. config DRM_VRAM_HELPER
  290. tristate
  291. depends on DRM
  292. help
  293. Helpers for VRAM memory management
  294. config DRM_TTM_HELPER
  295. tristate
  296. depends on DRM
  297. select DRM_TTM
  298. help
  299. Helpers for ttm-based gem objects
  300. config DRM_GEM_DMA_HELPER
  301. tristate
  302. depends on DRM
  303. select FB_DMAMEM_HELPERS_DEFERRED if DRM_FBDEV_EMULATION
  304. help
  305. Choose this if you need the GEM DMA helper functions
  306. config DRM_GEM_SHMEM_HELPER
  307. tristate
  308. depends on DRM && MMU
  309. help
  310. Choose this if you need the GEM shmem helper functions
  311. config DRM_SUBALLOC_HELPER
  312. tristate
  313. depends on DRM
  314. config DRM_SCHED
  315. tristate
  316. depends on DRM
  317. source "drivers/gpu/drm/i2c/Kconfig"
  318. source "drivers/gpu/drm/arm/Kconfig"
  319. source "drivers/gpu/drm/radeon/Kconfig"
  320. source "drivers/gpu/drm/amd/amdgpu/Kconfig"
  321. source "drivers/gpu/drm/nouveau/Kconfig"
  322. source "drivers/gpu/drm/i915/Kconfig"
  323. source "drivers/gpu/drm/xe/Kconfig"
  324. source "drivers/gpu/drm/kmb/Kconfig"
  325. config DRM_VGEM
  326. tristate "Virtual GEM provider"
  327. depends on DRM && MMU
  328. select DRM_GEM_SHMEM_HELPER
  329. help
  330. Choose this option to get a virtual graphics memory manager,
  331. as used by Mesa's software renderer for enhanced performance.
  332. If M is selected the module will be called vgem.
  333. source "drivers/gpu/drm/vkms/Kconfig"
  334. source "drivers/gpu/drm/exynos/Kconfig"
  335. source "drivers/gpu/drm/rockchip/Kconfig"
  336. source "drivers/gpu/drm/vmwgfx/Kconfig"
  337. source "drivers/gpu/drm/gma500/Kconfig"
  338. source "drivers/gpu/drm/udl/Kconfig"
  339. source "drivers/gpu/drm/ast/Kconfig"
  340. source "drivers/gpu/drm/mgag200/Kconfig"
  341. source "drivers/gpu/drm/armada/Kconfig"
  342. source "drivers/gpu/drm/atmel-hlcdc/Kconfig"
  343. source "drivers/gpu/drm/renesas/Kconfig"
  344. source "drivers/gpu/drm/sun4i/Kconfig"
  345. source "drivers/gpu/drm/omapdrm/Kconfig"
  346. source "drivers/gpu/drm/tilcdc/Kconfig"
  347. source "drivers/gpu/drm/qxl/Kconfig"
  348. source "drivers/gpu/drm/virtio/Kconfig"
  349. source "drivers/gpu/drm/msm/Kconfig"
  350. source "drivers/gpu/drm/fsl-dcu/Kconfig"
  351. source "drivers/gpu/drm/tegra/Kconfig"
  352. source "drivers/gpu/drm/stm/Kconfig"
  353. source "drivers/gpu/drm/panel/Kconfig"
  354. source "drivers/gpu/drm/bridge/Kconfig"
  355. source "drivers/gpu/drm/sti/Kconfig"
  356. source "drivers/gpu/drm/imx/Kconfig"
  357. source "drivers/gpu/drm/ingenic/Kconfig"
  358. source "drivers/gpu/drm/v3d/Kconfig"
  359. source "drivers/gpu/drm/vc4/Kconfig"
  360. source "drivers/gpu/drm/loongson/Kconfig"
  361. source "drivers/gpu/drm/etnaviv/Kconfig"
  362. source "drivers/gpu/drm/hisilicon/Kconfig"
  363. source "drivers/gpu/drm/logicvc/Kconfig"
  364. source "drivers/gpu/drm/mediatek/Kconfig"
  365. source "drivers/gpu/drm/mxsfb/Kconfig"
  366. source "drivers/gpu/drm/meson/Kconfig"
  367. source "drivers/gpu/drm/tiny/Kconfig"
  368. source "drivers/gpu/drm/pl111/Kconfig"
  369. source "drivers/gpu/drm/tve200/Kconfig"
  370. source "drivers/gpu/drm/xen/Kconfig"
  371. source "drivers/gpu/drm/vboxvideo/Kconfig"
  372. source "drivers/gpu/drm/lima/Kconfig"
  373. source "drivers/gpu/drm/panfrost/Kconfig"
  374. source "drivers/gpu/drm/panthor/Kconfig"
  375. source "drivers/gpu/drm/aspeed/Kconfig"
  376. source "drivers/gpu/drm/mcde/Kconfig"
  377. source "drivers/gpu/drm/tidss/Kconfig"
  378. source "drivers/gpu/drm/xlnx/Kconfig"
  379. source "drivers/gpu/drm/gud/Kconfig"
  380. source "drivers/gpu/drm/solomon/Kconfig"
  381. source "drivers/gpu/drm/sprd/Kconfig"
  382. source "drivers/gpu/drm/imagination/Kconfig"
  383. config DRM_HYPERV
  384. tristate "DRM Support for Hyper-V synthetic video device"
  385. depends on DRM && PCI && MMU && HYPERV
  386. select DRM_KMS_HELPER
  387. select DRM_GEM_SHMEM_HELPER
  388. help
  389. This is a KMS driver for Hyper-V synthetic video device. Choose this
  390. option if you would like to enable drm driver for Hyper-V virtual
  391. machine. Unselect Hyper-V framebuffer driver (CONFIG_FB_HYPERV) so
  392. that DRM driver is used by default.
  393. If M is selected the module will be called hyperv_drm.
  394. config DRM_EXPORT_FOR_TESTS
  395. bool
  396. # Separate option as not all DRM drivers use it
  397. config DRM_PANEL_BACKLIGHT_QUIRKS
  398. tristate
  399. config DRM_LIB_RANDOM
  400. bool
  401. default n
  402. config DRM_PRIVACY_SCREEN
  403. bool
  404. default n
  405. config DRM_WERROR
  406. bool "Compile the drm subsystem with warnings as errors"
  407. depends on DRM && EXPERT
  408. depends on !WERROR
  409. default n
  410. help
  411. A kernel build should not cause any compiler warnings, and this
  412. enables the '-Werror' flag to enforce that rule in the drm subsystem.
  413. The drm subsystem enables more warnings than the kernel default, so
  414. this config option is disabled by default.
  415. If in doubt, say N.
  416. endif
  417. # Separate option because drm_panel_orientation_quirks.c is shared with fbdev
  418. config DRM_PANEL_ORIENTATION_QUIRKS
  419. tristate