mirror of
https://github.com/torvalds/linux.git
synced 2026-11-12 20:54:48 +01:00
drm/xe/ras: Use fault-inject to trigger cold-reset wedge
Use the fault-inject framework to trigger the cold-reset wedge path (punit_error_handler()) for testing the wedge/recovery flow. Usage: echo 100 > .../wedge_cold_reset/probability echo 1 > .../wedge_cold_reset/times Signed-off-by: Mallesh Koujalagi <mallesh.koujalagi@intel.com> Reviewed-by: Raag Jadav <raag.jadav@intel.com> Link: https://patch.msgid.link/20260805071152.1225416-10-mallesh.koujalagi@intel.com Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
This commit is contained in:
parent
9b00f61536
commit
f29c2bd7ea
|
|
@ -43,6 +43,7 @@
|
|||
|
||||
DECLARE_FAULT_ATTR(gt_reset_failure);
|
||||
DECLARE_FAULT_ATTR(inject_csc_hw_error);
|
||||
DECLARE_FAULT_ATTR(wedge_cold_reset);
|
||||
|
||||
static bool csc_hw_error_available(struct xe_device *xe)
|
||||
{
|
||||
|
|
@ -63,6 +64,8 @@ static struct {
|
|||
{ .name = "inject_csc_hw_error",
|
||||
.attr = &inject_csc_hw_error,
|
||||
.is_visible = csc_hw_error_available },
|
||||
{ .name = "wedge_cold_reset",
|
||||
.attr = &wedge_cold_reset },
|
||||
};
|
||||
|
||||
/*
|
||||
|
|
@ -77,6 +80,7 @@ bool xe_fault_##name(void) \
|
|||
|
||||
FAULT_ACTION(gt_reset, gt_reset_failure)
|
||||
FAULT_ACTION(csc_hw_error, inject_csc_hw_error)
|
||||
FAULT_ACTION(wedge_cold_reset, wedge_cold_reset)
|
||||
|
||||
static void xe_fault_inject_debugfs_register(struct xe_device *xe,
|
||||
struct dentry *root)
|
||||
|
|
|
|||
|
|
@ -13,10 +13,12 @@ struct xe_device;
|
|||
#ifdef CONFIG_DEBUG_FS
|
||||
bool xe_fault_gt_reset(void);
|
||||
bool xe_fault_csc_hw_error(void);
|
||||
bool xe_fault_wedge_cold_reset(void);
|
||||
void xe_debugfs_register(struct xe_device *xe);
|
||||
#else
|
||||
static inline bool xe_fault_gt_reset(void) { return false; }
|
||||
static inline bool xe_fault_csc_hw_error(void) { return false; }
|
||||
static inline bool xe_fault_wedge_cold_reset(void) { return false; }
|
||||
static inline void xe_debugfs_register(struct xe_device *xe) { }
|
||||
#endif
|
||||
|
||||
|
|
|
|||
|
|
@ -3,6 +3,7 @@
|
|||
* Copyright © 2026 Intel Corporation
|
||||
*/
|
||||
|
||||
#include "xe_debugfs.h"
|
||||
#include "xe_device.h"
|
||||
#include "xe_drm_ras.h"
|
||||
#include "xe_pm.h"
|
||||
|
|
@ -477,6 +478,12 @@ enum xe_ras_recovery_action xe_ras_process_errors(struct xe_device *xe)
|
|||
size_t rlen;
|
||||
int ret;
|
||||
|
||||
if (xe_fault_wedge_cold_reset()) {
|
||||
xe_err(xe, "[RAS]: cold-reset wedge injected\n");
|
||||
punit_error_handler(xe);
|
||||
return XE_RAS_RECOVERY_ACTION_DISCONNECT;
|
||||
}
|
||||
|
||||
if (!xe->info.has_sysctrl)
|
||||
return XE_RAS_RECOVERY_ACTION_RESET;
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user