summaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/xe
diff options
context:
space:
mode:
authorRiana Tauro <riana.tauro@intel.com>2026-07-13 13:18:00 +0530
committerRiana Tauro <riana.tauro@intel.com>2026-07-15 10:56:21 +0530
commitacc744fa62fb098358f371bfb38e6b32032459c7 (patch)
treebe7ff0087e22548b430ba65cd90ac16e6a8b68b3 /drivers/gpu/drm/xe
parentd9732e498f5fc1a7e0e3bb287d631c84815a17f7 (diff)
downloadlinux-next-acc744fa62fb098358f371bfb38e6b32032459c7.tar.gz
linux-next-acc744fa62fb098358f371bfb38e6b32032459c7.zip
drm/xe/xe_pci_error: Process errors in mmio_enabled
Query system controller when any non fatal error occurs to check the type of the error, contain and recover. The system controller is queried in the mmio_enabled callback. Reviewed-by: Raag Jadav <raag.jadav@intel.com> Reviewed-by: Mallesh Koujalagi <mallesh.koujalagi@intel.com> Link: https://patch.msgid.link/20260713074755.1278607-10-riana.tauro@intel.com Signed-off-by: Riana Tauro <riana.tauro@intel.com>
Diffstat (limited to 'drivers/gpu/drm/xe')
-rw-r--r--drivers/gpu/drm/xe/xe_pci_error.c21
1 files changed, 19 insertions, 2 deletions
diff --git a/drivers/gpu/drm/xe/xe_pci_error.c b/drivers/gpu/drm/xe/xe_pci_error.c
index 9b78cc0d3293..e41af2ac7f23 100644
--- a/drivers/gpu/drm/xe/xe_pci_error.c
+++ b/drivers/gpu/drm/xe/xe_pci_error.c
@@ -10,6 +10,7 @@
#include "xe_pci.h"
#include "xe_pm.h"
#include "xe_printk.h"
+#include "xe_ras.h"
#include "xe_survivability_mode.h"
static void prepare_device_for_reset(struct pci_dev *pdev)
@@ -34,6 +35,21 @@ static void prepare_device_for_reset(struct pci_dev *pdev)
pci_disable_device(pdev);
}
+static pci_ers_result_t ras_action_to_pci_result(struct pci_dev *pdev, u8 action)
+{
+ switch (action) {
+ case XE_RAS_RECOVERY_ACTION_RECOVERED:
+ return PCI_ERS_RESULT_RECOVERED;
+ case XE_RAS_RECOVERY_ACTION_RESET:
+ prepare_device_for_reset(pdev);
+ return PCI_ERS_RESULT_NEED_RESET;
+ case XE_RAS_RECOVERY_ACTION_DISCONNECT:
+ return PCI_ERS_RESULT_DISCONNECT;
+ default:
+ return PCI_ERS_RESULT_DISCONNECT;
+ }
+}
+
static pci_ers_result_t xe_pci_error_detected(struct pci_dev *pdev, pci_channel_state_t state)
{
struct xe_device *xe = pdev_to_xe_device(pdev);
@@ -62,11 +78,12 @@ static pci_ers_result_t xe_pci_error_detected(struct pci_dev *pdev, pci_channel_
static pci_ers_result_t xe_pci_error_mmio_enabled(struct pci_dev *pdev)
{
struct xe_device *xe = pdev_to_xe_device(pdev);
+ enum xe_ras_recovery_action action;
xe_info(xe, "PCI error: MMIO enabled\n");
+ action = xe_ras_process_errors(xe);
- /* TODO: Query system controller for the type of error and take appropriate action */
- return PCI_ERS_RESULT_RECOVERED;
+ return ras_action_to_pci_result(pdev, action);
}
static pci_ers_result_t xe_pci_error_slot_reset(struct pci_dev *pdev)