xref: /linux/drivers/gpu/drm/Kconfig (revision 0cac60c776a6bd15fbadc1c6c5c079b9a0c39634)
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	select VIDEO_NOMODESET
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
236source "drivers/gpu/drm/radeon/Kconfig"
237
238source "drivers/gpu/drm/amd/amdgpu/Kconfig"
239
240source "drivers/gpu/drm/nouveau/Kconfig"
241
242source "drivers/gpu/drm/i915/Kconfig"
243
244source "drivers/gpu/drm/kmb/Kconfig"
245
246config DRM_VGEM
247	tristate "Virtual GEM provider"
248	depends on DRM && MMU
249	select DRM_GEM_SHMEM_HELPER
250	help
251	  Choose this option to get a virtual graphics memory manager,
252	  as used by Mesa's software renderer for enhanced performance.
253	  If M is selected the module will be called vgem.
254
255config DRM_VKMS
256	tristate "Virtual KMS (EXPERIMENTAL)"
257	depends on DRM && MMU
258	select DRM_KMS_HELPER
259	select DRM_GEM_SHMEM_HELPER
260	select CRC32
261	default n
262	help
263	  Virtual Kernel Mode-Setting (VKMS) is used for testing or for
264	  running GPU in a headless machines. Choose this option to get
265	  a VKMS.
266
267	  If M is selected the module will be called vkms.
268
269source "drivers/gpu/drm/exynos/Kconfig"
270
271source "drivers/gpu/drm/rockchip/Kconfig"
272
273source "drivers/gpu/drm/vmwgfx/Kconfig"
274
275source "drivers/gpu/drm/gma500/Kconfig"
276
277source "drivers/gpu/drm/udl/Kconfig"
278
279source "drivers/gpu/drm/ast/Kconfig"
280
281source "drivers/gpu/drm/mgag200/Kconfig"
282
283source "drivers/gpu/drm/armada/Kconfig"
284
285source "drivers/gpu/drm/atmel-hlcdc/Kconfig"
286
287source "drivers/gpu/drm/rcar-du/Kconfig"
288
289source "drivers/gpu/drm/shmobile/Kconfig"
290
291source "drivers/gpu/drm/sun4i/Kconfig"
292
293source "drivers/gpu/drm/omapdrm/Kconfig"
294
295source "drivers/gpu/drm/tilcdc/Kconfig"
296
297source "drivers/gpu/drm/qxl/Kconfig"
298
299source "drivers/gpu/drm/virtio/Kconfig"
300
301source "drivers/gpu/drm/msm/Kconfig"
302
303source "drivers/gpu/drm/fsl-dcu/Kconfig"
304
305source "drivers/gpu/drm/tegra/Kconfig"
306
307source "drivers/gpu/drm/stm/Kconfig"
308
309source "drivers/gpu/drm/panel/Kconfig"
310
311source "drivers/gpu/drm/bridge/Kconfig"
312
313source "drivers/gpu/drm/sti/Kconfig"
314
315source "drivers/gpu/drm/imx/Kconfig"
316
317source "drivers/gpu/drm/ingenic/Kconfig"
318
319source "drivers/gpu/drm/v3d/Kconfig"
320
321source "drivers/gpu/drm/vc4/Kconfig"
322
323source "drivers/gpu/drm/etnaviv/Kconfig"
324
325source "drivers/gpu/drm/hisilicon/Kconfig"
326
327source "drivers/gpu/drm/logicvc/Kconfig"
328
329source "drivers/gpu/drm/mediatek/Kconfig"
330
331source "drivers/gpu/drm/mxsfb/Kconfig"
332
333source "drivers/gpu/drm/meson/Kconfig"
334
335source "drivers/gpu/drm/tiny/Kconfig"
336
337source "drivers/gpu/drm/pl111/Kconfig"
338
339source "drivers/gpu/drm/tve200/Kconfig"
340
341source "drivers/gpu/drm/xen/Kconfig"
342
343source "drivers/gpu/drm/vboxvideo/Kconfig"
344
345source "drivers/gpu/drm/lima/Kconfig"
346
347source "drivers/gpu/drm/panfrost/Kconfig"
348
349source "drivers/gpu/drm/aspeed/Kconfig"
350
351source "drivers/gpu/drm/mcde/Kconfig"
352
353source "drivers/gpu/drm/tidss/Kconfig"
354
355source "drivers/gpu/drm/xlnx/Kconfig"
356
357source "drivers/gpu/drm/gud/Kconfig"
358
359source "drivers/gpu/drm/solomon/Kconfig"
360
361source "drivers/gpu/drm/sprd/Kconfig"
362
363config DRM_HYPERV
364	tristate "DRM Support for Hyper-V synthetic video device"
365	depends on DRM && PCI && MMU && HYPERV
366	select DRM_KMS_HELPER
367	select DRM_GEM_SHMEM_HELPER
368	help
369	 This is a KMS driver for Hyper-V synthetic video device. Choose this
370	 option if you would like to enable drm driver for Hyper-V virtual
371	 machine. Unselect Hyper-V framebuffer driver (CONFIG_FB_HYPERV) so
372	 that DRM driver is used by default.
373
374	 If M is selected the module will be called hyperv_drm.
375
376# Keep legacy drivers last
377
378menuconfig DRM_LEGACY
379	bool "Enable legacy drivers (DANGEROUS)"
380	depends on DRM && MMU
381	help
382	  Enable legacy DRI1 drivers. Those drivers expose unsafe and dangerous
383	  APIs to user-space, which can be used to circumvent access
384	  restrictions and other security measures. For backwards compatibility
385	  those drivers are still available, but their use is highly
386	  inadvisable and might harm your system.
387
388	  You are recommended to use the safe modeset-only drivers instead, and
389	  perform 3D emulation in user-space.
390
391	  Unless you have strong reasons to go rogue, say "N".
392
393if DRM_LEGACY
394
395config DRM_TDFX
396	tristate "3dfx Banshee/Voodoo3+"
397	depends on DRM && PCI
398	help
399	  Choose this option if you have a 3dfx Banshee or Voodoo3 (or later),
400	  graphics card.  If M is selected, the module will be called tdfx.
401
402config DRM_R128
403	tristate "ATI Rage 128"
404	depends on DRM && PCI
405	select FW_LOADER
406	help
407	  Choose this option if you have an ATI Rage 128 graphics card.  If M
408	  is selected, the module will be called r128.  AGP support for
409	  this card is strongly suggested (unless you have a PCI version).
410
411config DRM_I810
412	tristate "Intel I810"
413	# !PREEMPTION because of missing ioctl locking
414	depends on DRM && AGP && AGP_INTEL && (!PREEMPTION || BROKEN)
415	help
416	  Choose this option if you have an Intel I810 graphics card.  If M is
417	  selected, the module will be called i810.  AGP support is required
418	  for this driver to work.
419
420config DRM_MGA
421	tristate "Matrox g200/g400"
422	depends on DRM && PCI
423	select FW_LOADER
424	help
425	  Choose this option if you have a Matrox G200, G400 or G450 graphics
426	  card.  If M is selected, the module will be called mga.  AGP
427	  support is required for this driver to work.
428
429config DRM_SIS
430	tristate "SiS video cards"
431	depends on DRM && AGP
432	depends on FB_SIS || FB_SIS=n
433	help
434	  Choose this option if you have a SiS 630 or compatible video
435	  chipset. If M is selected the module will be called sis. AGP
436	  support is required for this driver to work.
437
438config DRM_VIA
439	tristate "Via unichrome video cards"
440	depends on DRM && PCI
441	help
442	  Choose this option if you have a Via unichrome or compatible video
443	  chipset. If M is selected the module will be called via.
444
445config DRM_SAVAGE
446	tristate "Savage video cards"
447	depends on DRM && PCI
448	help
449	  Choose this option if you have a Savage3D/4/SuperSavage/Pro/Twister
450	  chipset. If M is selected the module will be called savage.
451
452endif # DRM_LEGACY
453
454config DRM_EXPORT_FOR_TESTS
455	bool
456
457# Separate option because drm_panel_orientation_quirks.c is shared with fbdev
458config DRM_PANEL_ORIENTATION_QUIRKS
459	tristate
460
461config DRM_LIB_RANDOM
462	bool
463	default n
464
465config DRM_PRIVACY_SCREEN
466	bool
467	default n
468