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