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