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