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