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