xref: /openbmc/linux/drivers/gpu/drm/Kconfig (revision bfb41e46)
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	select FB_SYS_HELPERS_DEFERRED if DRM_FBDEV_EMULATION
99	help
100	  CRTC helpers for KMS drivers.
101
102config DRM_DEBUG_DP_MST_TOPOLOGY_REFS
103        bool "Enable refcount backtrace history in the DP MST helpers"
104	depends on STACKTRACE_SUPPORT
105        select STACKDEPOT
106        depends on DRM_KMS_HELPER
107        depends on DEBUG_KERNEL
108        depends on EXPERT
109        help
110          Enables debug tracing for topology refs in DRM's DP MST helpers. A
111          history of each topology reference/dereference will be printed to the
112          kernel log once a port or branch device's topology refcount reaches 0.
113
114          This has the potential to use a lot of memory and print some very
115          large kernel messages. If in doubt, say "N".
116
117config DRM_DEBUG_MODESET_LOCK
118	bool "Enable backtrace history for lock contention"
119	depends on STACKTRACE_SUPPORT
120	depends on DEBUG_KERNEL
121	depends on EXPERT
122	select STACKDEPOT
123	default y if DEBUG_WW_MUTEX_SLOWPATH
124	help
125	  Enable debug tracing of failures to gracefully handle drm modeset lock
126	  contention. A history of each drm modeset lock path hitting -EDEADLK
127	  will be saved until gracefully handled, and the backtrace will be
128	  printed when attempting to lock a contended lock.
129
130	  If in doubt, say "N".
131
132config DRM_FBDEV_EMULATION
133	bool "Enable legacy fbdev support for your modesetting driver"
134	depends on DRM_KMS_HELPER
135	depends on FB=y || FB=DRM_KMS_HELPER
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	select FB_SYS_HELPERS if DRM_FBDEV_EMULATION
220	help
221	  Choose this if you need the GEM DMA helper functions
222
223config DRM_GEM_SHMEM_HELPER
224	tristate
225	depends on DRM && MMU
226	help
227	  Choose this if you need the GEM shmem helper functions
228
229config DRM_SUBALLOC_HELPER
230	tristate
231	depends on DRM
232
233config DRM_SCHED
234	tristate
235	depends on DRM
236
237source "drivers/gpu/drm/i2c/Kconfig"
238
239source "drivers/gpu/drm/arm/Kconfig"
240
241source "drivers/gpu/drm/radeon/Kconfig"
242
243source "drivers/gpu/drm/amd/amdgpu/Kconfig"
244
245source "drivers/gpu/drm/nouveau/Kconfig"
246
247source "drivers/gpu/drm/i915/Kconfig"
248
249source "drivers/gpu/drm/kmb/Kconfig"
250
251config DRM_VGEM
252	tristate "Virtual GEM provider"
253	depends on DRM && MMU
254	select DRM_GEM_SHMEM_HELPER
255	help
256	  Choose this option to get a virtual graphics memory manager,
257	  as used by Mesa's software renderer for enhanced performance.
258	  If M is selected the module will be called vgem.
259
260config DRM_VKMS
261	tristate "Virtual KMS (EXPERIMENTAL)"
262	depends on DRM && MMU
263	select DRM_KMS_HELPER
264	select DRM_GEM_SHMEM_HELPER
265	select CRC32
266	default n
267	help
268	  Virtual Kernel Mode-Setting (VKMS) is used for testing or for
269	  running GPU in a headless machines. Choose this option to get
270	  a VKMS.
271
272	  If M is selected the module will be called vkms.
273
274source "drivers/gpu/drm/exynos/Kconfig"
275
276source "drivers/gpu/drm/rockchip/Kconfig"
277
278source "drivers/gpu/drm/vmwgfx/Kconfig"
279
280source "drivers/gpu/drm/gma500/Kconfig"
281
282source "drivers/gpu/drm/udl/Kconfig"
283
284source "drivers/gpu/drm/ast/Kconfig"
285
286source "drivers/gpu/drm/mgag200/Kconfig"
287
288source "drivers/gpu/drm/armada/Kconfig"
289
290source "drivers/gpu/drm/atmel-hlcdc/Kconfig"
291
292source "drivers/gpu/drm/renesas/Kconfig"
293
294source "drivers/gpu/drm/sun4i/Kconfig"
295
296source "drivers/gpu/drm/omapdrm/Kconfig"
297
298source "drivers/gpu/drm/tilcdc/Kconfig"
299
300source "drivers/gpu/drm/qxl/Kconfig"
301
302source "drivers/gpu/drm/virtio/Kconfig"
303
304source "drivers/gpu/drm/msm/Kconfig"
305
306source "drivers/gpu/drm/fsl-dcu/Kconfig"
307
308source "drivers/gpu/drm/tegra/Kconfig"
309
310source "drivers/gpu/drm/stm/Kconfig"
311
312source "drivers/gpu/drm/panel/Kconfig"
313
314source "drivers/gpu/drm/bridge/Kconfig"
315
316source "drivers/gpu/drm/sti/Kconfig"
317
318source "drivers/gpu/drm/imx/Kconfig"
319
320source "drivers/gpu/drm/ingenic/Kconfig"
321
322source "drivers/gpu/drm/v3d/Kconfig"
323
324source "drivers/gpu/drm/vc4/Kconfig"
325
326source "drivers/gpu/drm/etnaviv/Kconfig"
327
328source "drivers/gpu/drm/hisilicon/Kconfig"
329
330source "drivers/gpu/drm/logicvc/Kconfig"
331
332source "drivers/gpu/drm/mediatek/Kconfig"
333
334source "drivers/gpu/drm/mxsfb/Kconfig"
335
336source "drivers/gpu/drm/meson/Kconfig"
337
338source "drivers/gpu/drm/tiny/Kconfig"
339
340source "drivers/gpu/drm/pl111/Kconfig"
341
342source "drivers/gpu/drm/tve200/Kconfig"
343
344source "drivers/gpu/drm/xen/Kconfig"
345
346source "drivers/gpu/drm/vboxvideo/Kconfig"
347
348source "drivers/gpu/drm/lima/Kconfig"
349
350source "drivers/gpu/drm/panfrost/Kconfig"
351
352source "drivers/gpu/drm/aspeed/Kconfig"
353
354source "drivers/gpu/drm/mcde/Kconfig"
355
356source "drivers/gpu/drm/tidss/Kconfig"
357
358source "drivers/gpu/drm/xlnx/Kconfig"
359
360source "drivers/gpu/drm/gud/Kconfig"
361
362source "drivers/gpu/drm/solomon/Kconfig"
363
364source "drivers/gpu/drm/sprd/Kconfig"
365
366config DRM_HYPERV
367	tristate "DRM Support for Hyper-V synthetic video device"
368	depends on DRM && PCI && MMU && HYPERV
369	select DRM_KMS_HELPER
370	select DRM_GEM_SHMEM_HELPER
371	help
372	 This is a KMS driver for Hyper-V synthetic video device. Choose this
373	 option if you would like to enable drm driver for Hyper-V virtual
374	 machine. Unselect Hyper-V framebuffer driver (CONFIG_FB_HYPERV) so
375	 that DRM driver is used by default.
376
377	 If M is selected the module will be called hyperv_drm.
378
379# Keep legacy drivers last
380
381menuconfig DRM_LEGACY
382	bool "Enable legacy drivers (DANGEROUS)"
383	depends on DRM && MMU
384	help
385	  Enable legacy DRI1 drivers. Those drivers expose unsafe and dangerous
386	  APIs to user-space, which can be used to circumvent access
387	  restrictions and other security measures. For backwards compatibility
388	  those drivers are still available, but their use is highly
389	  inadvisable and might harm your system.
390
391	  You are recommended to use the safe modeset-only drivers instead, and
392	  perform 3D emulation in user-space.
393
394	  Unless you have strong reasons to go rogue, say "N".
395
396if DRM_LEGACY
397# leave here to list legacy drivers
398endif # DRM_LEGACY
399
400config DRM_EXPORT_FOR_TESTS
401	bool
402
403# Separate option because drm_panel_orientation_quirks.c is shared with fbdev
404config DRM_PANEL_ORIENTATION_QUIRKS
405	tristate
406
407config DRM_LIB_RANDOM
408	bool
409	default n
410
411config DRM_PRIVACY_SCREEN
412	bool
413	default n
414