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