xref: /openbmc/linux/drivers/gpu/drm/i915/Kconfig.debug (revision 0b26ca68)
1# SPDX-License-Identifier: GPL-2.0-only
2config DRM_I915_WERROR
3	bool "Force GCC to throw an error instead of a warning when compiling"
4	# As this may inadvertently break the build, only allow the user
5	# to shoot oneself in the foot iff they aim really hard
6	depends on EXPERT
7	# We use the dependency on !COMPILE_TEST to not be enabled in
8	# allmodconfig or allyesconfig configurations
9	depends on !COMPILE_TEST
10	default n
11	help
12	  Add -Werror to the build flags for (and only for) i915.ko.
13	  Do not enable this unless you are writing code for the i915.ko module.
14
15	  Recommended for driver developers only.
16
17	  If in doubt, say "N".
18
19config DRM_I915_DEBUG
20	bool "Enable additional driver debugging"
21	depends on DRM_I915
22	select DEBUG_FS
23	select PREEMPT_COUNT
24	select I2C_CHARDEV
25	select STACKDEPOT
26	select DRM_DP_AUX_CHARDEV
27	select X86_MSR # used by igt/pm_rpm
28	select DRM_VGEM # used by igt/prime_vgem (dmabuf interop checks)
29	select DRM_DEBUG_MM if DRM=y
30	select DRM_EXPORT_FOR_TESTS if m
31	select DRM_DEBUG_SELFTEST
32	select DMABUF_SELFTESTS
33	select SW_SYNC # signaling validation framework (igt/syncobj*)
34	select DRM_I915_WERROR
35	select DRM_I915_DEBUG_GEM
36	select DRM_I915_DEBUG_GEM_ONCE
37	select DRM_I915_DEBUG_MMIO
38	select DRM_I915_DEBUG_RUNTIME_PM
39	select DRM_I915_SW_FENCE_DEBUG_OBJECTS
40	select DRM_I915_SELFTEST
41	default n
42	help
43	  Choose this option to turn on extra driver debugging that may affect
44	  performance but will catch some internal issues.
45
46	  Recommended for driver developers only.
47
48	  If in doubt, say "N".
49
50config DRM_I915_DEBUG_MMIO
51	bool "Always insert extra checks around mmio access by default"
52	default n
53	help
54	  By default, always enables the extra sanity checks (extra register
55	  reads) around every mmio (register) access that will slow the system
56	  down. This sets the default value of i915.mmio_debug to -1 and can
57	  be overridden at module load.
58
59	  Recommended for driver developers only.
60
61	  If in doubt, say "N".
62
63config DRM_I915_DEBUG_GEM
64	bool "Insert extra checks into the GEM internals"
65	default n
66	depends on DRM_I915_WERROR
67	help
68	  Enable extra sanity checks (including BUGs) along the GEM driver
69	  paths that may slow the system down and if hit hang the machine.
70
71	  Recommended for driver developers only.
72
73	  If in doubt, say "N".
74
75config DRM_I915_DEBUG_GEM_ONCE
76	bool "Make a GEM debug failure fatal"
77	default n
78	depends on DRM_I915_DEBUG_GEM
79	help
80	  During development, we often only want the very first failure
81	  as that would otherwise be lost in the deluge of subsequent
82	  failures. However, more casual testers may not want to trigger
83	  a hard BUG_ON and hope that the system remains sufficiently usable
84	  to capture a bug report in situ.
85
86	  Recommended for driver developers only.
87
88	  If in doubt, say "N".
89
90config DRM_I915_ERRLOG_GEM
91	bool "Insert extra logging (very verbose) for common GEM errors"
92	default n
93	depends on DRM_I915_DEBUG_GEM
94	help
95	  Enable additional logging that may help track down the cause of
96	  principally userspace errors.
97
98	  Recommended for driver developers only.
99
100	  If in doubt, say "N".
101
102config DRM_I915_TRACE_GEM
103	bool "Insert extra ftrace output from the GEM internals"
104	depends on DRM_I915_DEBUG_GEM
105	select TRACING
106	default n
107	help
108	  Enable additional and verbose debugging output that will spam
109	  ordinary tests, but may be vital for post-mortem debugging when
110	  used with /proc/sys/kernel/ftrace_dump_on_oops
111
112	  Recommended for driver developers only.
113
114	  If in doubt, say "N".
115
116config DRM_I915_TRACE_GTT
117	bool "Insert extra ftrace output from the GTT internals"
118	depends on DRM_I915_DEBUG_GEM
119	select TRACING
120	default n
121	help
122	  Enable additional and verbose debugging output that will spam
123	  ordinary tests, but may be vital for post-mortem debugging when
124	  used with /proc/sys/kernel/ftrace_dump_on_oops
125
126	  Recommended for driver developers only.
127
128	  If in doubt, say "N".
129
130config DRM_I915_SW_FENCE_DEBUG_OBJECTS
131	bool "Enable additional driver debugging for fence objects"
132	depends on DRM_I915
133	select DEBUG_OBJECTS
134	default n
135	help
136	  Choose this option to turn on extra driver debugging that may affect
137	  performance but will catch some internal issues.
138
139	  Recommended for driver developers only.
140
141	  If in doubt, say "N".
142
143config DRM_I915_SW_FENCE_CHECK_DAG
144	bool "Enable additional driver debugging for detecting dependency cycles"
145	depends on DRM_I915
146	default n
147	help
148	  Choose this option to turn on extra driver debugging that may affect
149	  performance but will catch some internal issues.
150
151	  Recommended for driver developers only.
152
153	  If in doubt, say "N".
154
155config DRM_I915_DEBUG_GUC
156	bool "Enable additional driver debugging for GuC"
157	depends on DRM_I915
158	default n
159	help
160	  Choose this option to turn on extra driver debugging that may affect
161	  performance but will help resolve GuC related issues.
162
163	  Recommended for driver developers only.
164
165	  If in doubt, say "N".
166
167config DRM_I915_SELFTEST
168	bool "Enable selftests upon driver load"
169	depends on DRM_I915
170	default n
171	select DRM_EXPORT_FOR_TESTS if m
172	select FAULT_INJECTION
173	select PRIME_NUMBERS
174	select CRC32
175	help
176	  Choose this option to allow the driver to perform selftests upon
177	  loading; also requires the i915.selftest=1 module parameter. To
178	  exit the module after running the selftests (i.e. to prevent normal
179	  module initialisation afterwards) use i915.selftest=-1.
180
181	  Recommended for driver developers only.
182
183	  If in doubt, say "N".
184
185config DRM_I915_SELFTEST_BROKEN
186	bool "Enable broken and dangerous selftests"
187	depends on DRM_I915_SELFTEST
188	depends on BROKEN
189	default n
190	help
191	  This option enables the execution of selftests that are "dangerous"
192	  and may trigger unintended HW side-effects as they break strict
193	  rules given in the HW specification. For science.
194
195	  Recommended for masochistic driver developers only.
196
197	  If in doubt, say "N".
198
199config DRM_I915_LOW_LEVEL_TRACEPOINTS
200	bool "Enable low level request tracing events"
201	depends on DRM_I915
202	default n
203	help
204	  Choose this option to turn on low level request tracing events.
205	  This provides the ability to precisely monitor engine utilisation
206	  and also analyze the request dependency resolving timeline.
207
208	  If in doubt, say "N".
209
210config DRM_I915_DEBUG_VBLANK_EVADE
211	bool "Enable extra debug warnings for vblank evasion"
212	depends on DRM_I915
213	default n
214	help
215	  Choose this option to turn on extra debug warnings for the
216	  vblank evade mechanism. This gives a warning every time the
217	  the deadline allotted for the vblank evade critical section
218	  is exceeded, even if there isn't an actual risk of missing
219	  the vblank.
220
221	  If in doubt, say "N".
222
223config DRM_I915_DEBUG_RUNTIME_PM
224	bool "Enable extra state checking for runtime PM"
225	depends on DRM_I915
226	default n
227	select STACKDEPOT
228	help
229	  Choose this option to turn on extra state checking for the
230	  runtime PM functionality. This may introduce overhead during
231	  driver loading, suspend and resume operations.
232
233	  If in doubt, say "N"
234