162306a36Sopenharmony_ci# SPDX-License-Identifier: GPL-2.0-only
262306a36Sopenharmony_ciconfig DRM_I915_WERROR
362306a36Sopenharmony_ci	bool "Force GCC to throw an error instead of a warning when compiling"
462306a36Sopenharmony_ci	# As this may inadvertently break the build, only allow the user
562306a36Sopenharmony_ci	# to shoot oneself in the foot iff they aim really hard
662306a36Sopenharmony_ci	depends on EXPERT
762306a36Sopenharmony_ci	# We use the dependency on !COMPILE_TEST to not be enabled in
862306a36Sopenharmony_ci	# allmodconfig or allyesconfig configurations
962306a36Sopenharmony_ci	depends on !COMPILE_TEST
1062306a36Sopenharmony_ci	default n
1162306a36Sopenharmony_ci	help
1262306a36Sopenharmony_ci	  Add -Werror to the build flags for (and only for) i915.ko.
1362306a36Sopenharmony_ci	  Do not enable this unless you are writing code for the i915.ko module.
1462306a36Sopenharmony_ci
1562306a36Sopenharmony_ci	  Recommended for driver developers only.
1662306a36Sopenharmony_ci
1762306a36Sopenharmony_ci	  If in doubt, say "N".
1862306a36Sopenharmony_ci
1962306a36Sopenharmony_ciconfig DRM_I915_DEBUG
2062306a36Sopenharmony_ci	bool "Enable additional driver debugging"
2162306a36Sopenharmony_ci	depends on DRM_I915
2262306a36Sopenharmony_ci	depends on EXPERT # only for developers
2362306a36Sopenharmony_ci	depends on !COMPILE_TEST # never built by robots
2462306a36Sopenharmony_ci	select DEBUG_FS
2562306a36Sopenharmony_ci	select PREEMPT_COUNT
2662306a36Sopenharmony_ci	select I2C_CHARDEV
2762306a36Sopenharmony_ci	select STACKDEPOT
2862306a36Sopenharmony_ci	select DRM_DP_AUX_CHARDEV
2962306a36Sopenharmony_ci	select X86_MSR # used by igt/pm_rpm
3062306a36Sopenharmony_ci	select DRM_VGEM # used by igt/prime_vgem (dmabuf interop checks)
3162306a36Sopenharmony_ci	select DRM_DEBUG_MM if DRM=y
3262306a36Sopenharmony_ci	select DRM_EXPORT_FOR_TESTS if m
3362306a36Sopenharmony_ci	select DRM_DEBUG_SELFTEST
3462306a36Sopenharmony_ci	select DMABUF_SELFTESTS
3562306a36Sopenharmony_ci	select SW_SYNC # signaling validation framework (igt/syncobj*)
3662306a36Sopenharmony_ci	select DRM_I915_WERROR
3762306a36Sopenharmony_ci	select DRM_I915_DEBUG_GEM
3862306a36Sopenharmony_ci	select DRM_I915_DEBUG_GEM_ONCE
3962306a36Sopenharmony_ci	select DRM_I915_DEBUG_MMIO
4062306a36Sopenharmony_ci	select DRM_I915_DEBUG_RUNTIME_PM
4162306a36Sopenharmony_ci	select DRM_I915_SW_FENCE_DEBUG_OBJECTS
4262306a36Sopenharmony_ci	select DRM_I915_SELFTEST
4362306a36Sopenharmony_ci	default n
4462306a36Sopenharmony_ci	help
4562306a36Sopenharmony_ci	  Choose this option to turn on extra driver debugging that may affect
4662306a36Sopenharmony_ci	  performance but will catch some internal issues.
4762306a36Sopenharmony_ci
4862306a36Sopenharmony_ci	  Recommended for driver developers only.
4962306a36Sopenharmony_ci
5062306a36Sopenharmony_ci	  If in doubt, say "N".
5162306a36Sopenharmony_ci
5262306a36Sopenharmony_ciconfig DRM_I915_DEBUG_MMIO
5362306a36Sopenharmony_ci	bool "Always insert extra checks around mmio access by default"
5462306a36Sopenharmony_ci	default n
5562306a36Sopenharmony_ci	help
5662306a36Sopenharmony_ci	  By default, always enables the extra sanity checks (extra register
5762306a36Sopenharmony_ci	  reads) around every mmio (register) access that will slow the system
5862306a36Sopenharmony_ci	  down. This sets the default value of i915.mmio_debug to -1 and can
5962306a36Sopenharmony_ci	  be overridden at module load.
6062306a36Sopenharmony_ci
6162306a36Sopenharmony_ci	  Recommended for driver developers only.
6262306a36Sopenharmony_ci
6362306a36Sopenharmony_ci	  If in doubt, say "N".
6462306a36Sopenharmony_ci
6562306a36Sopenharmony_ciconfig DRM_I915_DEBUG_GEM
6662306a36Sopenharmony_ci	bool "Insert extra checks into the GEM internals"
6762306a36Sopenharmony_ci	default n
6862306a36Sopenharmony_ci	depends on DRM_I915_WERROR
6962306a36Sopenharmony_ci	help
7062306a36Sopenharmony_ci	  Enable extra sanity checks (including BUGs) along the GEM driver
7162306a36Sopenharmony_ci	  paths that may slow the system down and if hit hang the machine.
7262306a36Sopenharmony_ci
7362306a36Sopenharmony_ci	  Recommended for driver developers only.
7462306a36Sopenharmony_ci
7562306a36Sopenharmony_ci	  If in doubt, say "N".
7662306a36Sopenharmony_ci
7762306a36Sopenharmony_ciconfig DRM_I915_DEBUG_GEM_ONCE
7862306a36Sopenharmony_ci	bool "Make a GEM debug failure fatal"
7962306a36Sopenharmony_ci	default n
8062306a36Sopenharmony_ci	depends on DRM_I915_DEBUG_GEM
8162306a36Sopenharmony_ci	help
8262306a36Sopenharmony_ci	  During development, we often only want the very first failure
8362306a36Sopenharmony_ci	  as that would otherwise be lost in the deluge of subsequent
8462306a36Sopenharmony_ci	  failures. However, more casual testers may not want to trigger
8562306a36Sopenharmony_ci	  a hard BUG_ON and hope that the system remains sufficiently usable
8662306a36Sopenharmony_ci	  to capture a bug report in situ.
8762306a36Sopenharmony_ci
8862306a36Sopenharmony_ci	  Recommended for driver developers only.
8962306a36Sopenharmony_ci
9062306a36Sopenharmony_ci	  If in doubt, say "N".
9162306a36Sopenharmony_ci
9262306a36Sopenharmony_ciconfig DRM_I915_ERRLOG_GEM
9362306a36Sopenharmony_ci	bool "Insert extra logging (very verbose) for common GEM errors"
9462306a36Sopenharmony_ci	default n
9562306a36Sopenharmony_ci	depends on DRM_I915_DEBUG_GEM
9662306a36Sopenharmony_ci	help
9762306a36Sopenharmony_ci	  Enable additional logging that may help track down the cause of
9862306a36Sopenharmony_ci	  principally userspace errors.
9962306a36Sopenharmony_ci
10062306a36Sopenharmony_ci	  Recommended for driver developers only.
10162306a36Sopenharmony_ci
10262306a36Sopenharmony_ci	  If in doubt, say "N".
10362306a36Sopenharmony_ci
10462306a36Sopenharmony_ciconfig DRM_I915_TRACE_GEM
10562306a36Sopenharmony_ci	bool "Insert extra ftrace output from the GEM internals"
10662306a36Sopenharmony_ci	depends on DRM_I915_DEBUG_GEM
10762306a36Sopenharmony_ci	select TRACING
10862306a36Sopenharmony_ci	default n
10962306a36Sopenharmony_ci	help
11062306a36Sopenharmony_ci	  Enable additional and verbose debugging output that will spam
11162306a36Sopenharmony_ci	  ordinary tests, but may be vital for post-mortem debugging when
11262306a36Sopenharmony_ci	  used with /proc/sys/kernel/ftrace_dump_on_oops
11362306a36Sopenharmony_ci
11462306a36Sopenharmony_ci	  Recommended for driver developers only.
11562306a36Sopenharmony_ci
11662306a36Sopenharmony_ci	  If in doubt, say "N".
11762306a36Sopenharmony_ci
11862306a36Sopenharmony_ciconfig DRM_I915_TRACE_GTT
11962306a36Sopenharmony_ci	bool "Insert extra ftrace output from the GTT internals"
12062306a36Sopenharmony_ci	depends on DRM_I915_DEBUG_GEM
12162306a36Sopenharmony_ci	select TRACING
12262306a36Sopenharmony_ci	default n
12362306a36Sopenharmony_ci	help
12462306a36Sopenharmony_ci	  Enable additional and verbose debugging output that will spam
12562306a36Sopenharmony_ci	  ordinary tests, but may be vital for post-mortem debugging when
12662306a36Sopenharmony_ci	  used with /proc/sys/kernel/ftrace_dump_on_oops
12762306a36Sopenharmony_ci
12862306a36Sopenharmony_ci	  Recommended for driver developers only.
12962306a36Sopenharmony_ci
13062306a36Sopenharmony_ci	  If in doubt, say "N".
13162306a36Sopenharmony_ci
13262306a36Sopenharmony_ciconfig DRM_I915_SW_FENCE_DEBUG_OBJECTS
13362306a36Sopenharmony_ci	bool "Enable additional driver debugging for fence objects"
13462306a36Sopenharmony_ci	depends on DRM_I915
13562306a36Sopenharmony_ci	select DEBUG_OBJECTS
13662306a36Sopenharmony_ci	default n
13762306a36Sopenharmony_ci	help
13862306a36Sopenharmony_ci	  Choose this option to turn on extra driver debugging that may affect
13962306a36Sopenharmony_ci	  performance but will catch some internal issues.
14062306a36Sopenharmony_ci
14162306a36Sopenharmony_ci	  Recommended for driver developers only.
14262306a36Sopenharmony_ci
14362306a36Sopenharmony_ci	  If in doubt, say "N".
14462306a36Sopenharmony_ci
14562306a36Sopenharmony_ciconfig DRM_I915_SW_FENCE_CHECK_DAG
14662306a36Sopenharmony_ci	bool "Enable additional driver debugging for detecting dependency cycles"
14762306a36Sopenharmony_ci	depends on DRM_I915
14862306a36Sopenharmony_ci	default n
14962306a36Sopenharmony_ci	help
15062306a36Sopenharmony_ci	  Choose this option to turn on extra driver debugging that may affect
15162306a36Sopenharmony_ci	  performance but will catch some internal issues.
15262306a36Sopenharmony_ci
15362306a36Sopenharmony_ci	  Recommended for driver developers only.
15462306a36Sopenharmony_ci
15562306a36Sopenharmony_ci	  If in doubt, say "N".
15662306a36Sopenharmony_ci
15762306a36Sopenharmony_ciconfig DRM_I915_DEBUG_GUC
15862306a36Sopenharmony_ci	bool "Enable additional driver debugging for GuC"
15962306a36Sopenharmony_ci	depends on DRM_I915
16062306a36Sopenharmony_ci	select STACKDEPOT
16162306a36Sopenharmony_ci	default n
16262306a36Sopenharmony_ci	help
16362306a36Sopenharmony_ci	  Choose this option to turn on extra driver debugging that may affect
16462306a36Sopenharmony_ci	  performance but will help resolve GuC related issues.
16562306a36Sopenharmony_ci
16662306a36Sopenharmony_ci	  Recommended for driver developers only.
16762306a36Sopenharmony_ci
16862306a36Sopenharmony_ci	  If in doubt, say "N".
16962306a36Sopenharmony_ci
17062306a36Sopenharmony_ciconfig DRM_I915_SELFTEST
17162306a36Sopenharmony_ci	bool "Enable selftests upon driver load"
17262306a36Sopenharmony_ci	depends on DRM_I915
17362306a36Sopenharmony_ci	default n
17462306a36Sopenharmony_ci	select DRM_EXPORT_FOR_TESTS if m
17562306a36Sopenharmony_ci	select FAULT_INJECTION
17662306a36Sopenharmony_ci	select PRIME_NUMBERS
17762306a36Sopenharmony_ci	select CRC32
17862306a36Sopenharmony_ci	help
17962306a36Sopenharmony_ci	  Choose this option to allow the driver to perform selftests upon
18062306a36Sopenharmony_ci	  loading; also requires the i915.selftest=1 module parameter. To
18162306a36Sopenharmony_ci	  exit the module after running the selftests (i.e. to prevent normal
18262306a36Sopenharmony_ci	  module initialisation afterwards) use i915.selftest=-1.
18362306a36Sopenharmony_ci
18462306a36Sopenharmony_ci	  Recommended for driver developers only.
18562306a36Sopenharmony_ci
18662306a36Sopenharmony_ci	  If in doubt, say "N".
18762306a36Sopenharmony_ci
18862306a36Sopenharmony_ciconfig DRM_I915_SELFTEST_BROKEN
18962306a36Sopenharmony_ci	bool "Enable broken and dangerous selftests"
19062306a36Sopenharmony_ci	depends on DRM_I915_SELFTEST
19162306a36Sopenharmony_ci	depends on BROKEN
19262306a36Sopenharmony_ci	default n
19362306a36Sopenharmony_ci	help
19462306a36Sopenharmony_ci	  This option enables the execution of selftests that are "dangerous"
19562306a36Sopenharmony_ci	  and may trigger unintended HW side-effects as they break strict
19662306a36Sopenharmony_ci	  rules given in the HW specification. For science.
19762306a36Sopenharmony_ci
19862306a36Sopenharmony_ci	  Recommended for masochistic driver developers only.
19962306a36Sopenharmony_ci
20062306a36Sopenharmony_ci	  If in doubt, say "N".
20162306a36Sopenharmony_ci
20262306a36Sopenharmony_ciconfig DRM_I915_LOW_LEVEL_TRACEPOINTS
20362306a36Sopenharmony_ci	bool "Enable low level request tracing events"
20462306a36Sopenharmony_ci	depends on DRM_I915
20562306a36Sopenharmony_ci	default n
20662306a36Sopenharmony_ci	help
20762306a36Sopenharmony_ci	  Choose this option to turn on low level request tracing events.
20862306a36Sopenharmony_ci	  This provides the ability to precisely monitor engine utilisation
20962306a36Sopenharmony_ci	  and also analyze the request dependency resolving timeline.
21062306a36Sopenharmony_ci
21162306a36Sopenharmony_ci	  Recommended for driver developers only.
21262306a36Sopenharmony_ci
21362306a36Sopenharmony_ci	  If in doubt, say "N".
21462306a36Sopenharmony_ci
21562306a36Sopenharmony_ciconfig DRM_I915_DEBUG_VBLANK_EVADE
21662306a36Sopenharmony_ci	bool "Enable extra debug warnings for vblank evasion"
21762306a36Sopenharmony_ci	depends on DRM_I915
21862306a36Sopenharmony_ci	default n
21962306a36Sopenharmony_ci	help
22062306a36Sopenharmony_ci	  Choose this option to turn on extra debug warnings for the
22162306a36Sopenharmony_ci	  vblank evade mechanism. This gives a warning every time the
22262306a36Sopenharmony_ci	  the deadline allotted for the vblank evade critical section
22362306a36Sopenharmony_ci	  is exceeded, even if there isn't an actual risk of missing
22462306a36Sopenharmony_ci	  the vblank.
22562306a36Sopenharmony_ci
22662306a36Sopenharmony_ci	  Recommended for driver developers only.
22762306a36Sopenharmony_ci
22862306a36Sopenharmony_ci	  If in doubt, say "N".
22962306a36Sopenharmony_ci
23062306a36Sopenharmony_ciconfig DRM_I915_DEBUG_RUNTIME_PM
23162306a36Sopenharmony_ci	bool "Enable extra state checking for runtime PM"
23262306a36Sopenharmony_ci	depends on DRM_I915
23362306a36Sopenharmony_ci	default n
23462306a36Sopenharmony_ci	select STACKDEPOT
23562306a36Sopenharmony_ci	help
23662306a36Sopenharmony_ci	  Choose this option to turn on extra state checking for the
23762306a36Sopenharmony_ci	  runtime PM functionality. This may introduce overhead during
23862306a36Sopenharmony_ci	  driver loading, suspend and resume operations.
23962306a36Sopenharmony_ci
24062306a36Sopenharmony_ci	  Recommended for driver developers only.
24162306a36Sopenharmony_ci
24262306a36Sopenharmony_ci	  If in doubt, say "N"
243