xref: /linux/drivers/gpu/drm/Kconfig (revision 5b0764a53235d3c77e1ed674e836e1b3fe1a4b1f)
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
20	help
21	  Kernel-level support for the Direct Rendering Infrastructure (DRI)
22	  introduced in XFree86 4.0. If you say Y here, you need to select
23	  the module that's right for your graphics card from the list below.
24	  These modules provide support for synchronization, security, and
25	  DMA transfers. Please see <http://dri.sourceforge.net/> for more
26	  details.  You should also select and configure AGP
27	  (/dev/agpgart) support if it is available for your platform.
28
29menu "DRM debugging options"
30depends on DRM
31source "drivers/gpu/drm/Kconfig.debug"
32endmenu
33
34if DRM
35
36config DRM_MIPI_DBI
37	tristate
38	depends on DRM
39	select DRM_KMS_HELPER
40
41config DRM_MIPI_DSI
42	bool
43	depends on DRM
44
45config DRM_KMS_HELPER
46	tristate
47	depends on DRM
48	select DRM_PANIC_HELPER if DRM_PANIC
49	help
50	  CRTC helpers for KMS drivers.
51
52config DRM_DRAW
53	bool
54	depends on DRM
55
56config DRM_PANIC
57	bool "Display a user-friendly message when a kernel panic occurs"
58	depends on DRM && PRINTK
59	help
60	  Enable a drm panic handler, which will display a user-friendly message
61	  when a kernel panic occurs. It's useful when using a user-space
62	  console instead of fbcon.
63	  It will only work if your graphic driver supports this feature.
64	  To support Hi-DPI Display, you can enable bigger fonts like
65	  FONT_TER16x32
66
67config DRM_PANIC_FOREGROUND_COLOR
68	hex "Drm panic screen foreground color, in RGB"
69	depends on DRM_PANIC
70	default 0xffffff
71
72config DRM_PANIC_BACKGROUND_COLOR
73	hex "Drm panic screen background color, in RGB"
74	depends on DRM_PANIC
75	default 0x000000
76
77config DRM_PANIC_DEBUG
78	bool "Add a debug fs entry to trigger drm_panic"
79	depends on DRM_PANIC && DEBUG_FS
80	help
81	  Add dri/[device]/drm_panic_plane_x in the kernel debugfs, to force the
82	  panic handler to write the panic message to this plane scanout buffer.
83	  This is unsafe and should not be enabled on a production build.
84	  If in doubt, say "N".
85
86config DRM_PANIC_SCREEN
87	string "Panic screen formatter"
88	default "user"
89	depends on DRM_PANIC
90	help
91	  This option enable to choose what will be displayed when a kernel
92	  panic occurs. You can choose between "user", a short message telling
93	  the user to reboot the system, or "kmsg" which will display the last
94	  lines of kmsg.
95	  This can also be overridden by drm.panic_screen=xxxx kernel parameter
96	  or by writing to /sys/module/drm/parameters/panic_screen sysfs entry
97	  Default is "user"
98
99config DRM_PANIC_SCREEN_QR_CODE
100	bool "Add a panic screen with a QR code"
101	depends on DRM_PANIC && RUST
102	select ZLIB_DEFLATE
103	help
104	  This option adds a QR code generator, and a panic screen with a QR
105	  code. The QR code will contain the last lines of kmsg and other debug
106	  information. This should be easier for the user to report a kernel
107	  panic, with all debug information available.
108	  To use this panic screen, also set DRM_PANIC_SCREEN to "qr_code"
109
110config DRM_PANIC_SCREEN_QR_CODE_URL
111	string "Base URL of the QR code in the panic screen"
112	depends on DRM_PANIC_SCREEN_QR_CODE
113	help
114	  This option sets the base URL to report the kernel panic. If it's set
115	  the QR code will contain the URL and the kmsg compressed with zlib as
116	  a URL parameter. If it's empty, the QR code will contain the kmsg as
117	  uncompressed text only.
118	  There is a demo code in javascript, to decode and uncompress the kmsg
119	  data from the URL parameter at https://github.com/kdj0c/panic_report
120
121config DRM_PANIC_SCREEN_QR_VERSION
122	int "Maximum version (size) of the QR code."
123	depends on DRM_PANIC_SCREEN_QR_CODE
124	default 40
125	help
126	  This option limits the version (or size) of the QR code. QR code
127	  version ranges from Version 1 (21x21) to Version 40 (177x177).
128	  Smaller QR code are easier to read, but will contain less debugging
129	  data. Default is 40.
130
131config DRM_PANIC_HELPER
132	bool
133	depends on DRM
134	select DRM_DRAW
135	select FONT_SUPPORT
136
137config DRM_RAS
138	bool "DRM RAS support"
139	depends on DRM
140	depends on NET
141	help
142	  Enables the DRM RAS (Reliability, Availability and Serviceability)
143	  support for DRM drivers. This provides a Generic Netlink interface
144	  for error reporting and queries.
145	  If in doubt, say "N".
146
147config DRM_DEBUG_DP_MST_TOPOLOGY_REFS
148        bool "Enable refcount backtrace history in the DP MST helpers"
149	depends on STACKTRACE_SUPPORT
150        select STACKDEPOT
151        select DRM_KMS_HELPER
152        depends on DEBUG_KERNEL
153        depends on EXPERT
154        help
155          Enables debug tracing for topology refs in DRM's DP MST helpers. A
156          history of each topology reference/dereference will be printed to the
157          kernel log once a port or branch device's topology refcount reaches 0.
158
159          This has the potential to use a lot of memory and print some very
160          large kernel messages. If in doubt, say "N".
161
162config DRM_DEBUG_MODESET_LOCK
163	bool "Enable backtrace history for lock contention"
164	depends on STACKTRACE_SUPPORT
165	depends on DEBUG_KERNEL
166	depends on EXPERT
167	select STACKDEPOT
168	default y if DEBUG_WW_MUTEX_SLOWPATH
169	help
170	  Enable debug tracing of failures to gracefully handle drm modeset lock
171	  contention. A history of each drm modeset lock path hitting -EDEADLK
172	  will be saved until gracefully handled, and the backtrace will be
173	  printed when attempting to lock a contended lock.
174
175	  If in doubt, say "N".
176
177config DRM_CLIENT
178	bool
179	depends on DRM
180	help
181	  Enables support for DRM clients. DRM drivers that need
182	  struct drm_client_dev and its interfaces should select this
183	  option. Drivers that support the default clients should
184	  select DRM_CLIENT_SELECTION instead.
185
186source "drivers/gpu/drm/clients/Kconfig"
187
188config DRM_LOAD_EDID_FIRMWARE
189	bool "Allow to specify an EDID data set instead of probing for it"
190	depends on DRM
191	help
192	  Say Y here, if you want to use EDID data to be loaded from the
193	  /lib/firmware directory or one of the provided built-in
194	  data sets. This may be necessary, if the graphics adapter or
195	  monitor are unable to provide appropriate EDID data. Since this
196	  feature is provided as a workaround for broken hardware, the
197	  default case is N. Details and instructions how to build your own
198	  EDID data are given in Documentation/admin-guide/edid.rst.
199
200source "drivers/gpu/drm/display/Kconfig"
201
202config DRM_TTM
203	tristate
204	depends on DRM && MMU
205	select SHMEM
206	help
207	  GPU memory management subsystem for devices with multiple
208	  GPU memory types. Will be enabled automatically if a device driver
209	  uses it.
210
211config DRM_EXEC
212	tristate
213	depends on DRM
214	help
215	  Execution context for command submissions
216
217config DRM_GPUVM
218	tristate
219	depends on DRM
220	select DRM_EXEC
221	help
222	  GPU-VM representation providing helpers to manage a GPUs virtual
223	  address space
224
225config RUST_DRM_GPUVM
226	bool
227	depends on DRM
228	select DRM_GPUVM
229	help
230	  Choose this if you need GPUVM functions in Rust
231
232config DRM_GPUSVM
233	tristate
234	depends on DRM
235	select HMM_MIRROR
236	select MMU_NOTIFIER
237	help
238	  GPU-SVM representation providing helpers to manage a GPUs shared
239	  virtual memory
240
241config DRM_BUDDY
242	tristate
243	depends on DRM
244	select GPU_BUDDY
245	help
246	  A page based buddy allocator
247
248config DRM_VRAM_HELPER
249	tristate
250	depends on DRM
251	help
252	  Helpers for VRAM memory management
253
254config DRM_TTM_HELPER
255	tristate
256	depends on DRM
257	select DRM_TTM
258	select DRM_CLIENT_LIB if DRM_FBDEV_EMULATION
259	select FB_CORE if DRM_FBDEV_EMULATION
260	select FB_SYSMEM_HELPERS_DEFERRED if DRM_FBDEV_EMULATION
261	help
262	  Helpers for ttm-based gem objects
263
264config DRM_GEM_DMA_HELPER
265	tristate
266	depends on DRM
267	select DRM_CLIENT_LIB if DRM_FBDEV_EMULATION
268	select FB_CORE if DRM_FBDEV_EMULATION
269	select FB_DMAMEM_HELPERS_DEFERRED if DRM_FBDEV_EMULATION
270	help
271	  Choose this if you need the GEM DMA helper functions
272
273config DRM_GEM_SHMEM_HELPER
274	tristate
275	depends on DRM && MMU
276	select DRM_CLIENT_LIB if DRM_FBDEV_EMULATION
277	select FB_CORE if DRM_FBDEV_EMULATION
278	select FB_SYSMEM_HELPERS_DEFERRED if DRM_FBDEV_EMULATION
279	help
280	  Choose this if you need the GEM shmem helper functions
281
282config RUST_DRM_GEM_SHMEM_HELPER
283	bool
284	depends on DRM && MMU
285	select DRM_GEM_SHMEM_HELPER
286	help
287	  Choose this if you need the GEM shmem helper functions In Rust
288
289config DRM_SUBALLOC_HELPER
290	tristate
291	depends on DRM
292
293config DRM_SCHED
294	tristate
295	depends on DRM
296
297# Separate option as not all DRM drivers use it
298config DRM_PANEL_BACKLIGHT_QUIRKS
299	tristate
300
301config DRM_PRIVACY_SCREEN
302	bool
303	default n
304
305# DRM driver Kconfig files, sorted
306source "drivers/gpu/drm/adp/Kconfig"
307source "drivers/gpu/drm/amd/amdgpu/Kconfig"
308source "drivers/gpu/drm/arm/Kconfig"
309source "drivers/gpu/drm/armada/Kconfig"
310source "drivers/gpu/drm/aspeed/Kconfig"
311source "drivers/gpu/drm/ast/Kconfig"
312source "drivers/gpu/drm/atmel-hlcdc/Kconfig"
313source "drivers/gpu/drm/bridge/Kconfig"
314source "drivers/gpu/drm/etnaviv/Kconfig"
315source "drivers/gpu/drm/exynos/Kconfig"
316source "drivers/gpu/drm/fsl-dcu/Kconfig"
317source "drivers/gpu/drm/gma500/Kconfig"
318source "drivers/gpu/drm/gud/Kconfig"
319source "drivers/gpu/drm/hisilicon/Kconfig"
320source "drivers/gpu/drm/hyperv/Kconfig"
321source "drivers/gpu/drm/i915/Kconfig"
322source "drivers/gpu/drm/imagination/Kconfig"
323source "drivers/gpu/drm/imx/Kconfig"
324source "drivers/gpu/drm/ingenic/Kconfig"
325source "drivers/gpu/drm/kmb/Kconfig"
326source "drivers/gpu/drm/lima/Kconfig"
327source "drivers/gpu/drm/logicvc/Kconfig"
328source "drivers/gpu/drm/loongson/Kconfig"
329source "drivers/gpu/drm/mcde/Kconfig"
330source "drivers/gpu/drm/mediatek/Kconfig"
331source "drivers/gpu/drm/meson/Kconfig"
332source "drivers/gpu/drm/mgag200/Kconfig"
333source "drivers/gpu/drm/msm/Kconfig"
334source "drivers/gpu/drm/mxsfb/Kconfig"
335source "drivers/gpu/drm/nouveau/Kconfig"
336source "drivers/gpu/drm/nova/Kconfig"
337source "drivers/gpu/drm/omapdrm/Kconfig"
338source "drivers/gpu/drm/panel/Kconfig"
339source "drivers/gpu/drm/panfrost/Kconfig"
340source "drivers/gpu/drm/panthor/Kconfig"
341source "drivers/gpu/drm/pl111/Kconfig"
342source "drivers/gpu/drm/qxl/Kconfig"
343source "drivers/gpu/drm/radeon/Kconfig"
344source "drivers/gpu/drm/renesas/Kconfig"
345source "drivers/gpu/drm/rockchip/Kconfig"
346source "drivers/gpu/drm/sitronix/Kconfig"
347source "drivers/gpu/drm/solomon/Kconfig"
348source "drivers/gpu/drm/sprd/Kconfig"
349source "drivers/gpu/drm/sti/Kconfig"
350source "drivers/gpu/drm/stm/Kconfig"
351source "drivers/gpu/drm/sun4i/Kconfig"
352source "drivers/gpu/drm/sysfb/Kconfig"
353source "drivers/gpu/drm/tegra/Kconfig"
354source "drivers/gpu/drm/tidss/Kconfig"
355source "drivers/gpu/drm/tilcdc/Kconfig"
356source "drivers/gpu/drm/tiny/Kconfig"
357source "drivers/gpu/drm/tve200/Kconfig"
358source "drivers/gpu/drm/tyr/Kconfig"
359source "drivers/gpu/drm/udl/Kconfig"
360source "drivers/gpu/drm/v3d/Kconfig"
361source "drivers/gpu/drm/vboxvideo/Kconfig"
362source "drivers/gpu/drm/vc4/Kconfig"
363source "drivers/gpu/drm/verisilicon/Kconfig"
364source "drivers/gpu/drm/vgem/Kconfig"
365source "drivers/gpu/drm/virtio/Kconfig"
366source "drivers/gpu/drm/vkms/Kconfig"
367source "drivers/gpu/drm/vmwgfx/Kconfig"
368source "drivers/gpu/drm/xe/Kconfig"
369source "drivers/gpu/drm/xen/Kconfig"
370source "drivers/gpu/drm/xlnx/Kconfig"
371
372endif
373
374# Separate option because drm_panel_orientation_quirks.c is shared with fbdev
375config DRM_PANEL_ORIENTATION_QUIRKS
376	tristate
377