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 6535AC982FE for ; Tue, 22 Sep 2026 23:18:20 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 0E4B710EEB9; Tue, 22 Sep 2026 23:18:20 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (2048-bit key; unprotected) header.d=intel.com header.i=@intel.com header.b="Og26wdvd"; dkim-atps=neutral Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.9]) by gabe.freedesktop.org (Postfix) with ESMTPS id 635B710E942 for ; Tue, 22 Sep 2026 23:18:08 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1790119088; x=1821655088; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=PciEdkeqd/5kKev26DQEmVrUMuzdSN99tnqWKI3DNw4=; b=Og26wdvdEvInnmRhqG5pyiv+vAm035GJZ7K4YeAZ/20Q2eti86xutFTl t+wc3JRCWJ38irUosXdbKlsPY/YO2hqD1jLh2j4dctv9zeNPEGzo6Ksd2 gUVt8Tj+ceVcdgCYOLaXLPCk6cJ2QwEI4C3JYpxFavx2MjXugVp40AZrk tXtY497zPuAKt0mKj95kAXk+LAGaJ/zob+lpG0Y8YFfRLYPbfJFUMnh43 DAhNyLJa2kAsrgXKDLrJ6qJxq3wEojylET4MWjHAWgGnv1mccufQc6T+h etVmQt1ZTxI87Avlh41up7c1EGwhnKttDm9bBauXYNRWB90dBRNqTQe86 w==; X-CSE-ConnectionGUID: 517VJryNRuWNB7pTK1c+vw== X-CSE-MsgGUID: zsHBODmKSlO8LBQmN0h2rg== X-IronPort-AV: E=McAfee;i="6800,10657,11913"; a="101432619" X-IronPort-AV: E=Sophos;i="6.27,117,1787036400"; d="scan'208";a="101432619" Received: from fmviesa006.fm.intel.com ([10.60.135.146]) by fmvoesa103.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 22 Sep 2026 16:18:08 -0700 X-CSE-ConnectionGUID: a9GXYlSMT4iPJV2kc3786g== X-CSE-MsgGUID: ooyrZWHAQOGAYah93aKQWg== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.27,117,1787036400"; d="scan'208";a="271922778" Received: from orsosgc001.jf.intel.com ([10.54.56.63]) by fmviesa006-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 22 Sep 2026 16:18:08 -0700 From: Umesh Nerlige Ramappa To: intel-xe@lists.freedesktop.org Cc: daniele.ceraolospurio@intel.com, michal.wajdeczko@intel.com, aravind.iddamsetty@intel.com, mallesh.koujalagi@intel.com, alan.previn.teres.alexis@intel.com, julia.filipchuk@intel.com Subject: [PATCH v6 5/7] drm/xe/uc: Report DMA failure using SIGID Date: Tue, 22 Sep 2026 16:18:04 -0700 Message-ID: <20260922231758.2695562-14-umesh.nerlige.ramappa@intel.com> X-Mailer: git-send-email 2.55.0 In-Reply-To: <20260922231758.2695562-9-umesh.nerlige.ramappa@intel.com> References: <20260922231758.2695562-9-umesh.nerlige.ramappa@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" From: Daniele Ceraolo Spurio Convert the uC DMA failure error to use the xe_log_err() helper. Signed-off-by: Daniele Ceraolo Spurio Reviewed-by: Michal Wajdeczko --- v2: add assert and simplify if/else --- drivers/gpu/drm/xe/xe_uc_fw.c | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/drivers/gpu/drm/xe/xe_uc_fw.c b/drivers/gpu/drm/xe/xe_uc_fw.c index e29878b255ba..ada39c1266a8 100644 --- a/drivers/gpu/drm/xe/xe_uc_fw.c +++ b/drivers/gpu/drm/xe/xe_uc_fw.c @@ -18,6 +18,7 @@ #include "xe_gt_sriov_vf.h" #include "xe_gt_types.h" #include "xe_guc.h" +#include "xe_log.h" #include "xe_map.h" #include "xe_mmio.h" #include "xe_module.h" @@ -914,8 +915,12 @@ static int uc_fw_xfer(struct xe_uc_fw *uc_fw, u32 offset, u32 dma_flags) int xe_uc_fw_upload(struct xe_uc_fw *uc_fw, u32 offset, u32 dma_flags) { struct xe_device *xe = uc_fw_to_xe(uc_fw); + struct xe_gt *gt = uc_fw_to_gt(uc_fw); int err; + xe_gt_assert(gt, uc_fw->type == XE_UC_FW_TYPE_GUC || + uc_fw->type == XE_UC_FW_TYPE_HUC); + /* make sure the status was cleared the last time we reset the uc */ xe_assert(xe, !xe_uc_fw_is_loaded(uc_fw)); @@ -931,9 +936,11 @@ int xe_uc_fw_upload(struct xe_uc_fw *uc_fw, u32 offset, u32 dma_flags) return 0; fail: - drm_err(&xe->drm, "Failed to load %s firmware %s (%d)\n", - xe_uc_fw_type_repr(uc_fw->type), uc_fw->path, - err); + if (uc_fw->type == XE_UC_FW_TYPE_GUC) + xe_log_err(gt, GUC, err, "Failed to load firmware %s\n", uc_fw->path); + else + xe_log_err(gt, HUC, err, "Failed to load firmware %s\n", uc_fw->path); + xe_uc_fw_change_status(uc_fw, XE_UC_FIRMWARE_LOAD_FAIL); return err; } -- 2.55.0