aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/drivers/gpu/drm/i915/i915_gpu_error.h
diff options
context:
space:
mode:
authorJohn Harrison <John.C.Harrison@Intel.com>2023-04-18 11:17:43 -0700
committerJohn Harrison <John.C.Harrison@Intel.com>2023-05-16 12:26:46 -0700
commit6197cff30df44e4db85fed545fecb7df00ff8cd0 (patch)
tree139109054a57321e11eb84f836e5716d37da7883 /drivers/gpu/drm/i915/i915_gpu_error.h
parentdrm/i915/hwmon: Silence UBSAN uninitialized bool variable warning (diff)
downloadwireguard-linux-6197cff30df44e4db85fed545fecb7df00ff8cd0.tar.xz
wireguard-linux-6197cff30df44e4db85fed545fecb7df00ff8cd0.zip
drm/i915: Dump error capture to kernel log
This is useful for getting debug information out in certain situations, such as failing kernel selftests and CI runs that don't log error captures. It is especially useful for things like retrieving GuC logs as GuC operation can't be tracked by adding printk or ftrace entries. v2: Add CONFIG_DRM_I915_DEBUG_GEM wrapper (review feedback by Rodrigo). Signed-off-by: John Harrison <John.C.Harrison@Intel.com> Reviewed-by: Vinay Belgaumkar <vinay.belgaumkar@intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20230418181744.3251240-2-John.C.Harrison@Intel.com
Diffstat (limited to '')
-rw-r--r--drivers/gpu/drm/i915/i915_gpu_error.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/drivers/gpu/drm/i915/i915_gpu_error.h b/drivers/gpu/drm/i915/i915_gpu_error.h
index a91932cc6531..a78c061ce26f 100644
--- a/drivers/gpu/drm/i915/i915_gpu_error.h
+++ b/drivers/gpu/drm/i915/i915_gpu_error.h
@@ -258,6 +258,16 @@ static inline u32 i915_reset_engine_count(struct i915_gpu_error *error,
#define CORE_DUMP_FLAG_NONE 0x0
#define CORE_DUMP_FLAG_IS_GUC_CAPTURE BIT(0)
+#if IS_ENABLED(CONFIG_DRM_I915_CAPTURE_ERROR) && IS_ENABLED(CONFIG_DRM_I915_DEBUG_GEM)
+void intel_klog_error_capture(struct intel_gt *gt,
+ intel_engine_mask_t engine_mask);
+#else
+static inline void intel_klog_error_capture(struct intel_gt *gt,
+ intel_engine_mask_t engine_mask)
+{
+}
+#endif
+
#if IS_ENABLED(CONFIG_DRM_I915_CAPTURE_ERROR)
__printf(2, 3)