[PATCH v2] drm/xe/pci_error: Allow debugging PCI errors
Raag Jadav <[email protected]>
| Newsgroups | org.freedesktop.lists.intel-xe |
|---|---|
| Message-ID | <[email protected]> |
XE_WEDGED_MODE_UPON_ANY_HANG_NO_RESET is intended for debugging hangs. Disconnect the device on AER and prevent bus reset, so that it is available to the user for debugging. Signed-off-by: Raag Jadav <[email protected]> --- v2: Process errors before wedging (Riana) --- drivers/gpu/drm/xe/xe_pci_error.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/drivers/gpu/drm/xe/xe_pci_error.c b/drivers/gpu/drm/xe/xe_pci_error.c index fb965f52be5e..79ce0c671549 100644 --- a/drivers/gpu/drm/xe/xe_pci_error.c +++ b/drivers/gpu/drm/xe/xe_pci_error.c @@ -84,6 +84,12 @@ static pci_ers_result_t xe_pci_error_mmio_enabled(struct pci_dev *pdev) xe_info(xe, "PCI error: MMIO enabled\n"); action = xe_ras_process_errors(xe); + /* User wants to debug the error, prevent reset */ + if (xe->wedged.mode == XE_WEDGED_MODE_UPON_ANY_HANG_NO_RESET) { + xe_device_declare_wedged(xe); + return PCI_ERS_RESULT_DISCONNECT; + } + return ras_action_to_pci_result(pdev, action); } -- 2.43.0