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