drm/xe/ras: Fix boot-time ras error processing

Currently, we xe_ras_process_errors() inside xe_ras_init() to handle boot
time errors. But this can potentially result in declaring the device as
wedged quite early in the driver load sequence, which is problematic due to
the lack of registered drm device or required wedged cleanup hooks at this
point.

Call xe_ras_process_errors() only after the prerequisites are available.

Fixes: d9732e498f ("drm/xe/xe_ras: Query errors from system controller on probe")
Signed-off-by: Raag Jadav <raag.jadav@intel.com>
Reviewed-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
Tested-by: Mallesh Koujalagi <mallesh.koujalagi@intel.com>
Link: https://patch.msgid.link/20260730110635.925537-1-raag.jadav@intel.com
Signed-off-by: Riana Tauro <riana.tauro@intel.com>
(cherry picked from commit 20bc4883c7c0e28c3ba6c76ccc279486c349dd3e)
Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
This commit is contained in:
Raag Jadav 2026-07-30 16:36:34 +05:30 committed by Rodrigo Vivi
parent 29daacacf4
commit 3799dc5d77
No known key found for this signature in database
GPG Key ID: FA625F640EEB13CA
2 changed files with 6 additions and 6 deletions

View File

@ -1141,6 +1141,12 @@ int xe_device_probe(struct xe_device *xe)
if (err)
goto err_unregister_display;
/*
* Process and log any errors detected by hardware. Possible results can
* include declaring the device as wedged, which must be done only after
* xe_device_wedged_fini() is registered.
*/
xe_ras_process_errors(xe);
return devm_add_action_or_reset(xe->drm.dev, xe_device_sanitize, xe);
err_unregister_display:

View File

@ -692,12 +692,6 @@ void xe_ras_init(struct xe_device *xe)
if (IS_ENABLED(CONFIG_PCIEAER))
ras_usp_aer_init(xe);
/*
* During probe, process and log any errors detected by firmware while the driver was not
* loaded. Critical errors such as Punit and CSC are reported through Pcode init failure,
* causing the driver to enter survivability mode.
*/
xe_ras_process_errors(xe);
ret = devm_device_add_group(xe->drm.dev, &gpu_health_group);
if (ret)
xe_err(xe, "Failed to create GPU health sysfs, err=%d\n", ret);