xref: /linux/drivers/gpu/drm/Kconfig.debug (revision e2683c8868d03382da7e1ce8453b543a043066d1)
1config DRM_USE_DYNAMIC_DEBUG
2	bool "use dynamic debug to implement drm.debug"
3	default n
4	depends on BROKEN
5	depends on DRM
6	depends on DYNAMIC_DEBUG || DYNAMIC_DEBUG_CORE
7	depends on JUMP_LABEL
8	help
9	 Use dynamic-debug to avoid drm_debug_enabled() runtime overheads.
10	 Due to callsite counts in DRM drivers (~4k in amdgpu) and 56
11	 bytes per callsite, the .data costs can be substantial, and
12	 are therefore configurable.
13
14config DRM_WERROR
15	bool "Compile the drm subsystem with warnings as errors"
16	depends on DRM && EXPERT
17	depends on !WERROR
18	default n
19	help
20	  A kernel build should not cause any compiler warnings, and this
21	  enables the '-Werror' flag to enforce that rule in the drm subsystem.
22
23	  The drm subsystem enables more warnings than the kernel default, so
24	  this config option is disabled by default.
25
26	  If in doubt, say N.
27
28config DRM_HEADER_TEST
29	bool "Ensure DRM headers are self-contained and pass kernel-doc"
30	depends on DRM && EXPERT && BROKEN
31	default n
32	help
33	  Ensure the DRM subsystem headers both under drivers/gpu/drm and
34	  include/drm compile, are self-contained, have header guards, and have
35	  no kernel-doc warnings.
36
37	  If in doubt, say N.
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
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_KUNIT_TEST_HELPERS
54	tristate
55	depends on DRM && KUNIT
56	select DRM_KMS_HELPER
57	help
58	  KUnit Helpers for KMS drivers.
59
60config DRM_KUNIT_TEST
61	tristate "KUnit tests for DRM" if !KUNIT_ALL_TESTS
62	depends on DRM && KUNIT && MMU
63	select DRM_BRIDGE_CONNECTOR
64	select DRM_BUDDY
65	select DRM_DISPLAY_DP_HELPER
66	select DRM_DISPLAY_HDMI_STATE_HELPER
67	select DRM_DISPLAY_HELPER
68	select DRM_EXEC
69	select DRM_EXPORT_FOR_TESTS if m
70	select DRM_GEM_SHMEM_HELPER
71	select DRM_KUNIT_TEST_HELPERS
72	select DRM_SYSFB_HELPER
73	select PRIME_NUMBERS
74	default KUNIT_ALL_TESTS
75	help
76	  This builds unit tests for DRM. This option is not useful for
77	  distributions or general kernels, but only for kernel
78	  developers working on DRM and associated drivers.
79
80	  For more information on KUnit and unit tests in general,
81	  please refer to the KUnit documentation in
82	  Documentation/dev-tools/kunit/.
83
84	  If in doubt, say "N".
85
86config DRM_TTM_KUNIT_TEST
87	tristate "KUnit tests for TTM" if !KUNIT_ALL_TESTS
88	depends on DRM && KUNIT && MMU && (UML || COMPILE_TEST)
89	select DRM_TTM
90	select DRM_BUDDY
91	select DRM_EXPORT_FOR_TESTS if m
92	select DRM_KUNIT_TEST_HELPERS
93	default KUNIT_ALL_TESTS
94	help
95	  Enables unit tests for TTM, a GPU memory manager subsystem used
96	  to manage memory buffers. This option is mostly useful for kernel
97	  developers. It depends on (UML || COMPILE_TEST) since no other driver
98	  which uses TTM can be loaded while running the tests.
99
100	  If in doubt, say "N".
101
102config DRM_SCHED_KUNIT_TEST
103	tristate "KUnit tests for the DRM scheduler" if !KUNIT_ALL_TESTS
104	select DRM_SCHED
105	depends on DRM && KUNIT
106	default KUNIT_ALL_TESTS
107	help
108	  Choose this option to build unit tests for the DRM scheduler.
109
110	  Recommended for driver developers only.
111
112	  If in doubt, say "N".
113
114config DRM_EXPORT_FOR_TESTS
115	bool
116