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