0001 # SPDX-License-Identifier: GPL-2.0-only
0002 #
0003 # Drm device configuration
0004 #
0005 # This driver provides support for the
0006 # Direct Rendering Infrastructure (DRI) in XFree86 4.1.0 and higher.
0007 #
0008 menuconfig DRM
0009 tristate "Direct Rendering Manager (XFree86 4.1.0 and higher DRI support)"
0010 depends on (AGP || AGP=n) && !EMULATED_CMPXCHG && HAS_DMA
0011 select DRM_NOMODESET
0012 select DRM_PANEL_ORIENTATION_QUIRKS
0013 select HDMI
0014 select FB_CMDLINE
0015 select I2C
0016 select I2C_ALGOBIT
0017 select DMA_SHARED_BUFFER
0018 select SYNC_FILE
0019 # gallium uses SYS_kcmp for os_same_file_description() to de-duplicate
0020 # device and dmabuf fd. Let's make sure that is available for our userspace.
0021 select KCMP
0022 help
0023 Kernel-level support for the Direct Rendering Infrastructure (DRI)
0024 introduced in XFree86 4.0. If you say Y here, you need to select
0025 the module that's right for your graphics card from the list below.
0026 These modules provide support for synchronization, security, and
0027 DMA transfers. Please see <http://dri.sourceforge.net/> for more
0028 details. You should also select and configure AGP
0029 (/dev/agpgart) support if it is available for your platform.
0030
0031 config DRM_MIPI_DBI
0032 tristate
0033 depends on DRM
0034
0035 config DRM_MIPI_DSI
0036 bool
0037 depends on DRM
0038
0039 config DRM_DEBUG_MM
0040 bool "Insert extra checks and debug info into the DRM range managers"
0041 default n
0042 depends on DRM=y
0043 depends on STACKTRACE_SUPPORT
0044 select STACKDEPOT
0045 help
0046 Enable allocation tracking of memory manager and leak detection on
0047 shutdown.
0048
0049 Recommended for driver developers only.
0050
0051 If in doubt, say "N".
0052
0053 config DRM_DEBUG_SELFTEST
0054 tristate "kselftests for DRM"
0055 depends on DRM
0056 depends on DEBUG_KERNEL
0057 select PRIME_NUMBERS
0058 select DRM_DISPLAY_DP_HELPER
0059 select DRM_DISPLAY_HELPER
0060 select DRM_LIB_RANDOM
0061 select DRM_KMS_HELPER
0062 select DRM_BUDDY
0063 select DRM_EXPORT_FOR_TESTS if m
0064 default n
0065 help
0066 This option provides kernel modules that can be used to run
0067 various selftests on parts of the DRM api. This option is not
0068 useful for distributions or general kernels, but only for kernel
0069 developers working on DRM and associated drivers.
0070
0071 If in doubt, say "N".
0072
0073 config DRM_KUNIT_TEST
0074 tristate "KUnit tests for DRM" if !KUNIT_ALL_TESTS
0075 depends on DRM && KUNIT=y
0076 select DRM_KMS_HELPER
0077 default KUNIT_ALL_TESTS
0078 help
0079 This builds unit tests for DRM. This option is not useful for
0080 distributions or general kernels, but only for kernel
0081 developers working on DRM and associated drivers.
0082
0083 For more information on KUnit and unit tests in general,
0084 please refer to the KUnit documentation in
0085 Documentation/dev-tools/kunit/.
0086
0087 If in doubt, say "N".
0088
0089 config DRM_KMS_HELPER
0090 tristate
0091 depends on DRM
0092 help
0093 CRTC helpers for KMS drivers.
0094
0095 config DRM_DEBUG_DP_MST_TOPOLOGY_REFS
0096 bool "Enable refcount backtrace history in the DP MST helpers"
0097 depends on STACKTRACE_SUPPORT
0098 select STACKDEPOT
0099 depends on DRM_KMS_HELPER
0100 depends on DEBUG_KERNEL
0101 depends on EXPERT
0102 help
0103 Enables debug tracing for topology refs in DRM's DP MST helpers. A
0104 history of each topology reference/dereference will be printed to the
0105 kernel log once a port or branch device's topology refcount reaches 0.
0106
0107 This has the potential to use a lot of memory and print some very
0108 large kernel messages. If in doubt, say "N".
0109
0110 config DRM_DEBUG_MODESET_LOCK
0111 bool "Enable backtrace history for lock contention"
0112 depends on STACKTRACE_SUPPORT
0113 depends on DEBUG_KERNEL
0114 depends on EXPERT
0115 select STACKDEPOT
0116 default y if DEBUG_WW_MUTEX_SLOWPATH
0117 help
0118 Enable debug tracing of failures to gracefully handle drm modeset lock
0119 contention. A history of each drm modeset lock path hitting -EDEADLK
0120 will be saved until gracefully handled, and the backtrace will be
0121 printed when attempting to lock a contended lock.
0122
0123 If in doubt, say "N".
0124
0125 config DRM_FBDEV_EMULATION
0126 bool "Enable legacy fbdev support for your modesetting driver"
0127 depends on DRM_KMS_HELPER
0128 depends on FB=y || FB=DRM_KMS_HELPER
0129 select FB_CFB_FILLRECT
0130 select FB_CFB_COPYAREA
0131 select FB_CFB_IMAGEBLIT
0132 select FB_DEFERRED_IO
0133 select FB_SYS_FOPS
0134 select FB_SYS_FILLRECT
0135 select FB_SYS_COPYAREA
0136 select FB_SYS_IMAGEBLIT
0137 select FRAMEBUFFER_CONSOLE if !EXPERT
0138 select FRAMEBUFFER_CONSOLE_DETECT_PRIMARY if FRAMEBUFFER_CONSOLE
0139 default y
0140 help
0141 Choose this option if you have a need for the legacy fbdev
0142 support. Note that this support also provides the linux console
0143 support on top of your modesetting driver.
0144
0145 If in doubt, say "Y".
0146
0147 config DRM_FBDEV_OVERALLOC
0148 int "Overallocation of the fbdev buffer"
0149 depends on DRM_FBDEV_EMULATION
0150 default 100
0151 help
0152 Defines the fbdev buffer overallocation in percent. Default
0153 is 100. Typical values for double buffering will be 200,
0154 triple buffering 300.
0155
0156 config DRM_FBDEV_LEAK_PHYS_SMEM
0157 bool "Shamelessly allow leaking of fbdev physical address (DANGEROUS)"
0158 depends on DRM_FBDEV_EMULATION && EXPERT
0159 default n
0160 help
0161 In order to keep user-space compatibility, we want in certain
0162 use-cases to keep leaking the fbdev physical address to the
0163 user-space program handling the fbdev buffer.
0164 This affects, not only, Amlogic, Allwinner or Rockchip devices
0165 with ARM Mali GPUs using an userspace Blob.
0166 This option is not supported by upstream developers and should be
0167 removed as soon as possible and be considered as a broken and
0168 legacy behaviour from a modern fbdev device driver.
0169
0170 Please send any bug reports when using this to your proprietary
0171 software vendor that requires this.
0172
0173 If in doubt, say "N" or spread the word to your closed source
0174 library vendor.
0175
0176 config DRM_LOAD_EDID_FIRMWARE
0177 bool "Allow to specify an EDID data set instead of probing for it"
0178 depends on DRM
0179 help
0180 Say Y here, if you want to use EDID data to be loaded from the
0181 /lib/firmware directory or one of the provided built-in
0182 data sets. This may be necessary, if the graphics adapter or
0183 monitor are unable to provide appropriate EDID data. Since this
0184 feature is provided as a workaround for broken hardware, the
0185 default case is N. Details and instructions how to build your own
0186 EDID data are given in Documentation/admin-guide/edid.rst.
0187
0188 source "drivers/gpu/drm/display/Kconfig"
0189
0190 config DRM_TTM
0191 tristate
0192 depends on DRM && MMU
0193 help
0194 GPU memory management subsystem for devices with multiple
0195 GPU memory types. Will be enabled automatically if a device driver
0196 uses it.
0197
0198 config DRM_BUDDY
0199 tristate
0200 depends on DRM
0201 help
0202 A page based buddy allocator
0203
0204 config DRM_VRAM_HELPER
0205 tristate
0206 depends on DRM
0207 help
0208 Helpers for VRAM memory management
0209
0210 config DRM_TTM_HELPER
0211 tristate
0212 depends on DRM
0213 select DRM_TTM
0214 help
0215 Helpers for ttm-based gem objects
0216
0217 config DRM_GEM_CMA_HELPER
0218 tristate
0219 depends on DRM
0220 help
0221 Choose this if you need the GEM CMA helper functions
0222
0223 config DRM_GEM_SHMEM_HELPER
0224 tristate
0225 depends on DRM && MMU
0226 help
0227 Choose this if you need the GEM shmem helper functions
0228
0229 config DRM_SCHED
0230 tristate
0231 depends on DRM
0232
0233 source "drivers/gpu/drm/i2c/Kconfig"
0234
0235 source "drivers/gpu/drm/arm/Kconfig"
0236
0237 config DRM_RADEON
0238 tristate "ATI Radeon"
0239 depends on DRM && PCI && MMU
0240 depends on AGP || !AGP
0241 select FW_LOADER
0242 select DRM_DISPLAY_DP_HELPER
0243 select DRM_DISPLAY_HELPER
0244 select DRM_KMS_HELPER
0245 select DRM_TTM
0246 select DRM_TTM_HELPER
0247 select POWER_SUPPLY
0248 select HWMON
0249 select BACKLIGHT_CLASS_DEVICE
0250 select INTERVAL_TREE
0251 help
0252 Choose this option if you have an ATI Radeon graphics card. There
0253 are both PCI and AGP versions. You don't need to choose this to
0254 run the Radeon in plain VGA mode.
0255
0256 If M is selected, the module will be called radeon.
0257
0258 source "drivers/gpu/drm/radeon/Kconfig"
0259
0260 config DRM_AMDGPU
0261 tristate "AMD GPU"
0262 depends on DRM && PCI && MMU
0263 select FW_LOADER
0264 select DRM_DISPLAY_DP_HELPER
0265 select DRM_DISPLAY_HDMI_HELPER
0266 select DRM_DISPLAY_HELPER
0267 select DRM_KMS_HELPER
0268 select DRM_SCHED
0269 select DRM_TTM
0270 select DRM_TTM_HELPER
0271 select POWER_SUPPLY
0272 select HWMON
0273 select BACKLIGHT_CLASS_DEVICE
0274 select INTERVAL_TREE
0275 select DRM_BUDDY
0276 help
0277 Choose this option if you have a recent AMD Radeon graphics card.
0278
0279 If M is selected, the module will be called amdgpu.
0280
0281 source "drivers/gpu/drm/amd/amdgpu/Kconfig"
0282
0283 source "drivers/gpu/drm/nouveau/Kconfig"
0284
0285 source "drivers/gpu/drm/i915/Kconfig"
0286
0287 source "drivers/gpu/drm/kmb/Kconfig"
0288
0289 config DRM_VGEM
0290 tristate "Virtual GEM provider"
0291 depends on DRM && MMU
0292 select DRM_GEM_SHMEM_HELPER
0293 help
0294 Choose this option to get a virtual graphics memory manager,
0295 as used by Mesa's software renderer for enhanced performance.
0296 If M is selected the module will be called vgem.
0297
0298 config DRM_VKMS
0299 tristate "Virtual KMS (EXPERIMENTAL)"
0300 depends on DRM && MMU
0301 select DRM_KMS_HELPER
0302 select DRM_GEM_SHMEM_HELPER
0303 select CRC32
0304 default n
0305 help
0306 Virtual Kernel Mode-Setting (VKMS) is used for testing or for
0307 running GPU in a headless machines. Choose this option to get
0308 a VKMS.
0309
0310 If M is selected the module will be called vkms.
0311
0312 source "drivers/gpu/drm/exynos/Kconfig"
0313
0314 source "drivers/gpu/drm/rockchip/Kconfig"
0315
0316 source "drivers/gpu/drm/vmwgfx/Kconfig"
0317
0318 source "drivers/gpu/drm/gma500/Kconfig"
0319
0320 source "drivers/gpu/drm/udl/Kconfig"
0321
0322 source "drivers/gpu/drm/ast/Kconfig"
0323
0324 source "drivers/gpu/drm/mgag200/Kconfig"
0325
0326 source "drivers/gpu/drm/armada/Kconfig"
0327
0328 source "drivers/gpu/drm/atmel-hlcdc/Kconfig"
0329
0330 source "drivers/gpu/drm/rcar-du/Kconfig"
0331
0332 source "drivers/gpu/drm/shmobile/Kconfig"
0333
0334 source "drivers/gpu/drm/sun4i/Kconfig"
0335
0336 source "drivers/gpu/drm/omapdrm/Kconfig"
0337
0338 source "drivers/gpu/drm/tilcdc/Kconfig"
0339
0340 source "drivers/gpu/drm/qxl/Kconfig"
0341
0342 source "drivers/gpu/drm/virtio/Kconfig"
0343
0344 source "drivers/gpu/drm/msm/Kconfig"
0345
0346 source "drivers/gpu/drm/fsl-dcu/Kconfig"
0347
0348 source "drivers/gpu/drm/tegra/Kconfig"
0349
0350 source "drivers/gpu/drm/stm/Kconfig"
0351
0352 source "drivers/gpu/drm/panel/Kconfig"
0353
0354 source "drivers/gpu/drm/bridge/Kconfig"
0355
0356 source "drivers/gpu/drm/sti/Kconfig"
0357
0358 source "drivers/gpu/drm/imx/Kconfig"
0359
0360 source "drivers/gpu/drm/ingenic/Kconfig"
0361
0362 source "drivers/gpu/drm/v3d/Kconfig"
0363
0364 source "drivers/gpu/drm/vc4/Kconfig"
0365
0366 source "drivers/gpu/drm/etnaviv/Kconfig"
0367
0368 source "drivers/gpu/drm/hisilicon/Kconfig"
0369
0370 source "drivers/gpu/drm/logicvc/Kconfig"
0371
0372 source "drivers/gpu/drm/mediatek/Kconfig"
0373
0374 source "drivers/gpu/drm/mxsfb/Kconfig"
0375
0376 source "drivers/gpu/drm/meson/Kconfig"
0377
0378 source "drivers/gpu/drm/tiny/Kconfig"
0379
0380 source "drivers/gpu/drm/pl111/Kconfig"
0381
0382 source "drivers/gpu/drm/tve200/Kconfig"
0383
0384 source "drivers/gpu/drm/xen/Kconfig"
0385
0386 source "drivers/gpu/drm/vboxvideo/Kconfig"
0387
0388 source "drivers/gpu/drm/lima/Kconfig"
0389
0390 source "drivers/gpu/drm/panfrost/Kconfig"
0391
0392 source "drivers/gpu/drm/aspeed/Kconfig"
0393
0394 source "drivers/gpu/drm/mcde/Kconfig"
0395
0396 source "drivers/gpu/drm/tidss/Kconfig"
0397
0398 source "drivers/gpu/drm/xlnx/Kconfig"
0399
0400 source "drivers/gpu/drm/gud/Kconfig"
0401
0402 source "drivers/gpu/drm/solomon/Kconfig"
0403
0404 source "drivers/gpu/drm/sprd/Kconfig"
0405
0406 config DRM_HYPERV
0407 tristate "DRM Support for Hyper-V synthetic video device"
0408 depends on DRM && PCI && MMU && HYPERV
0409 select DRM_KMS_HELPER
0410 select DRM_GEM_SHMEM_HELPER
0411 help
0412 This is a KMS driver for Hyper-V synthetic video device. Choose this
0413 option if you would like to enable drm driver for Hyper-V virtual
0414 machine. Unselect Hyper-V framebuffer driver (CONFIG_FB_HYPERV) so
0415 that DRM driver is used by default.
0416
0417 If M is selected the module will be called hyperv_drm.
0418
0419 # Keep legacy drivers last
0420
0421 menuconfig DRM_LEGACY
0422 bool "Enable legacy drivers (DANGEROUS)"
0423 depends on DRM && MMU
0424 help
0425 Enable legacy DRI1 drivers. Those drivers expose unsafe and dangerous
0426 APIs to user-space, which can be used to circumvent access
0427 restrictions and other security measures. For backwards compatibility
0428 those drivers are still available, but their use is highly
0429 inadvisable and might harm your system.
0430
0431 You are recommended to use the safe modeset-only drivers instead, and
0432 perform 3D emulation in user-space.
0433
0434 Unless you have strong reasons to go rogue, say "N".
0435
0436 if DRM_LEGACY
0437
0438 config DRM_TDFX
0439 tristate "3dfx Banshee/Voodoo3+"
0440 depends on DRM && PCI
0441 help
0442 Choose this option if you have a 3dfx Banshee or Voodoo3 (or later),
0443 graphics card. If M is selected, the module will be called tdfx.
0444
0445 config DRM_R128
0446 tristate "ATI Rage 128"
0447 depends on DRM && PCI
0448 select FW_LOADER
0449 help
0450 Choose this option if you have an ATI Rage 128 graphics card. If M
0451 is selected, the module will be called r128. AGP support for
0452 this card is strongly suggested (unless you have a PCI version).
0453
0454 config DRM_I810
0455 tristate "Intel I810"
0456 # !PREEMPTION because of missing ioctl locking
0457 depends on DRM && AGP && AGP_INTEL && (!PREEMPTION || BROKEN)
0458 help
0459 Choose this option if you have an Intel I810 graphics card. If M is
0460 selected, the module will be called i810. AGP support is required
0461 for this driver to work.
0462
0463 config DRM_MGA
0464 tristate "Matrox g200/g400"
0465 depends on DRM && PCI
0466 select FW_LOADER
0467 help
0468 Choose this option if you have a Matrox G200, G400 or G450 graphics
0469 card. If M is selected, the module will be called mga. AGP
0470 support is required for this driver to work.
0471
0472 config DRM_SIS
0473 tristate "SiS video cards"
0474 depends on DRM && AGP
0475 depends on FB_SIS || FB_SIS=n
0476 help
0477 Choose this option if you have a SiS 630 or compatible video
0478 chipset. If M is selected the module will be called sis. AGP
0479 support is required for this driver to work.
0480
0481 config DRM_VIA
0482 tristate "Via unichrome video cards"
0483 depends on DRM && PCI
0484 help
0485 Choose this option if you have a Via unichrome or compatible video
0486 chipset. If M is selected the module will be called via.
0487
0488 config DRM_SAVAGE
0489 tristate "Savage video cards"
0490 depends on DRM && PCI
0491 help
0492 Choose this option if you have a Savage3D/4/SuperSavage/Pro/Twister
0493 chipset. If M is selected the module will be called savage.
0494
0495 endif # DRM_LEGACY
0496
0497 config DRM_EXPORT_FOR_TESTS
0498 bool
0499
0500 # Separate option because drm_panel_orientation_quirks.c is shared with fbdev
0501 config DRM_PANEL_ORIENTATION_QUIRKS
0502 tristate
0503
0504 # Separate option because nomodeset parameter is global and expected built-in
0505 config DRM_NOMODESET
0506 bool
0507 default n
0508
0509 config DRM_LIB_RANDOM
0510 bool
0511 default n
0512
0513 config DRM_PRIVACY_SCREEN
0514 bool
0515 default n