Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id C1E66CA9EBE for ; Sat, 10 Oct 2026 09:08:38 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 7F28110E042; Sat, 10 Oct 2026 09:08:38 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (2048-bit key; unprotected) header.d=intel.com header.i=@intel.com header.b="WF3bVEP4"; dkim-atps=neutral Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.14]) by gabe.freedesktop.org (Postfix) with ESMTPS id 9519710EB9C for ; Sat, 10 Oct 2026 09:08:36 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1791623317; x=1823159317; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=A6u0tWlm9YoYiA8o/vALWS1hdSdovbfnsuj4KnJCX0c=; b=WF3bVEP41tOsEDyAm7Ir9yUFAJNmKTf2BOCQB+TKYLJ6zd8i+l7iDQpZ 8KzcIORigDfAzZtspwQecYmtE2x37gNaSudhAskXIbRbOt20f25jxFHQE hkVME8eXCmtQo+TtXimT8MQOoGLHyiZlBcL5xr53vthVr9MHoL9mpycS1 Ts1jaYHdn+d37ZW95INL9LR6uO71mNQ2VVSZdUtBPgNMsinuverLeiDMA 21jdF4fQN0+32okE+j7dYcLyAQjYbkOVp82l6Hh0DdETjudPqf6GR0oOY x5tC1tRmSR4sWWGtKNQM08K0st3xrGehFzbz8apOTU30s12oIqloB3AXA g==; X-CSE-ConnectionGUID: /CCquXoaT0inYUI3oJbytw== X-CSE-MsgGUID: Ef71kBg1T0inlX4Q9hJWRg== X-IronPort-AV: E=McAfee;i="6800,10657,11930"; a="290832" X-IronPort-AV: E=Sophos;i="6.27,150,1787036400"; d="scan'208";a="290832" Received: from orviesa009.jf.intel.com ([10.64.159.149]) by orvoesa106.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 10 Oct 2026 02:08:37 -0700 X-CSE-ConnectionGUID: SxqqQp/NQE67teFo4+msTg== X-CSE-MsgGUID: Ba0VZ7/IT/yj+GxBSna+YA== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.27,150,1787036400"; d="scan'208";a="427774" Received: from jraag-z790m-itx-wifi.iind.intel.com ([10.190.239.23]) by orviesa009.jf.intel.com with ESMTP; 10 Oct 2026 02:08:35 -0700 From: Raag Jadav To: intel-xe@lists.freedesktop.org Cc: riana.tauro@intel.com, michal.wajdeczko@intel.com, lukasz.laguna@intel.com, matthew.d.roper@intel.com, matthew.brost@intel.com, mallesh.koujalagi@intel.com, rodrigo.vivi@intel.com, Raag Jadav Subject: [PATCH v4 5/5] drm/xe/ras: Move xe_ras_process_errors() to xe_ras Date: Sat, 10 Oct 2026 14:36:22 +0530 Message-ID: <20261010090718.68308-6-raag.jadav@intel.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20261010090718.68308-1-raag.jadav@intel.com> References: <20261010090718.68308-1-raag.jadav@intel.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-BeenThere: intel-xe@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Intel Xe graphics driver List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: intel-xe-bounces@lists.freedesktop.org Sender: "Intel-xe" With xe_wedge_fini() now moved to xe_wedge and registered as part of xe_device_probe_early(), it is safe to move xe_ras_process_errors() back to xe_ras where it belongs. This essentially reverts commit 20bc4883c7c0 ("drm/xe/ras: Fix boot-time ras error processing"), which was added to prevent PM reference leak in case of early wedging in probe sequence. Signed-off-by: Raag Jadav Reviewed-by: Rodrigo Vivi --- drivers/gpu/drm/xe/xe_device.c | 7 ------- drivers/gpu/drm/xe/xe_ras.c | 7 +++++++ 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/drivers/gpu/drm/xe/xe_device.c b/drivers/gpu/drm/xe/xe_device.c index e0466390219c..a6bcb82b115f 100644 --- a/drivers/gpu/drm/xe/xe_device.c +++ b/drivers/gpu/drm/xe/xe_device.c @@ -1087,13 +1087,6 @@ int xe_device_probe(struct xe_device *xe) detect_preproduction_hw(xe); - /* - * Process and log any errors detected by hardware. Possible results can - * include declaring the device as wedged, which must be done only after - * xe_wedge_fini() is registered. - */ - xe_ras_process_errors(xe); - err = devm_add_action_or_reset(xe->drm.dev, xe_device_sanitize, xe); if (err) goto err_unregister_display; diff --git a/drivers/gpu/drm/xe/xe_ras.c b/drivers/gpu/drm/xe/xe_ras.c index 2e8eb8856f97..abf4800ff1e3 100644 --- a/drivers/gpu/drm/xe/xe_ras.c +++ b/drivers/gpu/drm/xe/xe_ras.c @@ -933,6 +933,13 @@ 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); -- 2.43.0