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