mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2025-08-27 10:34:13 +00:00

Most H2G messages are FAST_REQ which means no synchronous response is expected. The messages are sent as fire-and-forget with no tracking. However, errors can still be returned when something goes unexpectedly wrong. That leads to confusion due to not being able to match up the error response to the originating H2G. So add support for tracking the FAST_REQ H2Gs and matching up an error response to its originator. This is only enabled in XE_DEBUG builds given that such errors should never happen in a working system and there is an overhead for the tracking. Further, if XE_DEBUG_GUC is enabled then even more memory and time is used to record the call stack of each H2G and report that with the error. That makes it much easier to work out where a specific H2G came from if there are multiple code paths that can send it. v2: Some re-wording of comments and prints, more consistent use of #if vs stub functions - review feedback from Daniele & Michal). v3: Split config change to separate patch, improve a debug print (review feedback from Michal). v4: Bunch of minor tweaks (review feedback from Michal). Original-i915-code: Michal Wajdeczko <michal.wajdeczko@intel.com> Signed-off-by: John Harrison <John.C.Harrison@Intel.com> Reviewed-by: Daniele Ceraolo Spurio <daniele.ceraolospurio@intel.com> Reviewed-by: Michal Wajdeczko <michal.wajdeczko@intel.com> Link: https://lore.kernel.org/r/20250512215324.1457009-5-John.C.Harrison@Intel.com
114 lines
3.1 KiB
Plaintext
114 lines
3.1 KiB
Plaintext
# SPDX-License-Identifier: GPL-2.0-only
|
|
config DRM_XE_WERROR
|
|
bool "Force GCC to throw an error instead of a warning when compiling"
|
|
# As this may inadvertently break the build, only allow the user
|
|
# to shoot oneself in the foot iff they aim really hard
|
|
depends on EXPERT
|
|
# We use the dependency on !COMPILE_TEST to not be enabled in
|
|
# allmodconfig or allyesconfig configurations
|
|
depends on !COMPILE_TEST
|
|
default n
|
|
help
|
|
Add -Werror to the build flags for (and only for) xe.ko.
|
|
Do not enable this unless you are writing code for the xe.ko module.
|
|
|
|
Recommended for driver developers only.
|
|
|
|
If in doubt, say "N".
|
|
|
|
config DRM_XE_DEBUG
|
|
bool "Enable additional driver debugging"
|
|
depends on DRM_XE
|
|
depends on EXPERT
|
|
depends on !COMPILE_TEST
|
|
default n
|
|
help
|
|
Choose this option to turn on extra driver debugging that may affect
|
|
performance but will catch some internal issues.
|
|
|
|
Recommended for driver developers only.
|
|
|
|
If in doubt, say "N".
|
|
|
|
config DRM_XE_DEBUG_VM
|
|
bool "Enable extra VM debugging info"
|
|
default n
|
|
help
|
|
Enable extra VM debugging info
|
|
|
|
Recommended for driver developers only.
|
|
|
|
If in doubt, say "N".
|
|
|
|
config DRM_XE_DEBUG_MEMIRQ
|
|
bool "Enable extra memirq debugging"
|
|
default n
|
|
help
|
|
Choose this option to enable additional debugging info for
|
|
memory based interrupts.
|
|
|
|
Recommended for driver developers only.
|
|
|
|
If in doubt, say "N".
|
|
|
|
config DRM_XE_DEBUG_SRIOV
|
|
bool "Enable extra SR-IOV debugging"
|
|
default n
|
|
select DRM_XE_DEBUG_MEMIRQ
|
|
help
|
|
Enable extra SR-IOV debugging info.
|
|
|
|
Recommended for driver developers only.
|
|
|
|
If in doubt, say "N".
|
|
|
|
config DRM_XE_DEBUG_MEM
|
|
bool "Enable passing SYS/VRAM addresses to user space"
|
|
default n
|
|
help
|
|
Pass object location through uapi. Intended for extended
|
|
testing and development only.
|
|
|
|
Recommended for driver developers only.
|
|
|
|
If in doubt, say "N".
|
|
|
|
config DRM_XE_KUNIT_TEST
|
|
tristate "KUnit tests for the drm xe driver" if !KUNIT_ALL_TESTS
|
|
depends on DRM_XE && KUNIT && DEBUG_FS
|
|
default KUNIT_ALL_TESTS
|
|
select DRM_EXPORT_FOR_TESTS if m
|
|
help
|
|
Choose this option to allow the driver to perform selftests under
|
|
the kunit framework
|
|
|
|
Recommended for driver developers only.
|
|
|
|
If in doubt, say "N".
|
|
|
|
config DRM_XE_DEBUG_GUC
|
|
bool "Enable extra GuC related debug options"
|
|
depends on DRM_XE_DEBUG
|
|
default n
|
|
select STACKDEPOT
|
|
help
|
|
Choose this option when debugging guc issues.
|
|
The GuC log buffer is increased to the maximum allowed, which should
|
|
be large enough for complex issues. The tracking of FAST_REQ messages
|
|
is extended to include a record of the calling stack, which is then
|
|
dumped on a FAST_REQ error notification.
|
|
|
|
Recommended for driver developers only.
|
|
|
|
If in doubt, say "N".
|
|
|
|
config DRM_XE_USERPTR_INVAL_INJECT
|
|
bool "Inject userptr invalidation -EINVAL errors"
|
|
default n
|
|
help
|
|
Choose this option when debugging error paths that
|
|
are hit during checks for userptr invalidations.
|
|
|
|
Recommended for driver developers only.
|
|
If in doubt, say "N".
|