From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 117AF606A320 for ; Fri, 20 Nov 2026 05:47:30 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.a=rsa-sha256 header.s=Intel header.b=LHwa63BX Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id CD20510F074; Fri, 20 Nov 2026 05:47:24 +0000 (UTC) Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.17]) by gabe.freedesktop.org (Postfix) with ESMTPS id 4328210F074 for ; Fri, 20 Nov 2026 05:47:18 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1795153638; x=1826689638; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=P33Jz5/lyJKbRmi/W+ZQnoh0q8l48zM394qzTR6SD+E=; b=LHwa63BXS7l0W1uiZTqYG0Ox/4heopEpopHvh5U5YyFSyDBz1PN+3fyH YMSo0wsaIxzVWL0cZX6BNbOw8ceMQnpv8KuTwII1ITtQzAgpnRXkK/292 AyGADY2LCSn6eGPUXnM7051x545q62e5JNynz23sjT7pLGm+zz6y75NWK 05xff1JbCeRPGkScIB0Si7axA2dWCIaeLnqUp/rID4DDMl2CC1I8HXnMY wINwWGxEMSs350FWau3CQpjNdRb4fb2Nwe/StOEva/wZz6KT8ErOsIJZw IEv8yKXAdh/nvDXzBKHeKOpa+GiutXWtJo8EVgin7aMLYzXU2+thvwTVj Q==; X-CSE-ConnectionGUID: ABzNcrGFTn+OPfAiWiZ4KA== X-CSE-MsgGUID: aWujxFqGSe6c75WFMB7Rrg== X-IronPort-AV: E=McAfee;i="6800,10657,11971"; a="4018523" X-IronPort-AV: E=Sophos;i="6.27,222,1787036400"; d="scan'208";a="4018523" Received: from orviesa006.jf.intel.com ([10.64.159.146]) by fmvoesa111.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 19 Nov 2026 21:47:16 -0800 X-CSE-ConnectionGUID: oiYyhvfOQkm8m9qAKLkprQ== X-CSE-MsgGUID: NwauerQISMerPyzoPdw6qw== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.27,222,1787036400"; d="scan'208";a="10617120" Received: from dut4463arlhx.fm.intel.com ([10.105.10.189]) by smtpauth.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 19 Nov 2026 21:47:15 -0800 From: Stuart Summers To: Cc: rodrigo.vivi@intel.com, riana.tauro@intel.com, anoop.c.vijay@intel.com, matthew.d.roper@intel.com, fei.yang@intel.com, intel-xe@lists.freedesktop.org, Stuart Summers Subject: [PATCH 02/16] drm/xe: Process device OOB workarounds during early info init Date: Fri, 20 Nov 2026 05:47:13 +0000 Message-ID: <20261120054712.377573-20-stuart.summers@intel.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20261120054712.377573-18-stuart.summers@intel.com> References: <20261120054712.377573-18-stuart.summers@intel.com> X-Archived-By: 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-Archive: List-Post: List-Help: List-Subscribe: , Sender: "Intel-xe" X-Spam-Status: No, score=-18.8 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_CR_TRAILER,INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS,USER_AGENT_GIT autolearn=ham autolearn_force=no version=4.0.1 X-Spam-Checker-Version: SpamAssassin 4.0.1 (2024-03-26) on aws-us-west-2-korg-listserv-alma10-1 Device OOB workarounds only match on platform, subplatform and platform step, all of which are known once xe_info_init_early() has copied them out of the device descriptor. Processing them there instead of in xe_device_probe_early() makes XE_DEVICE_WA() usable for the rest of early probe, which runs before xe_device_probe_early(). While moving the call, check the return value of xe_wa_device_init(), which the old call site silently dropped. Signed-off-by: Stuart Summers --- drivers/gpu/drm/xe/xe_device.c | 3 --- drivers/gpu/drm/xe/xe_pci.c | 14 ++++++++++++++ 2 files changed, 14 insertions(+), 3 deletions(-) diff --git a/drivers/gpu/drm/xe/xe_device.c b/drivers/gpu/drm/xe/xe_device.c index f5a581d39c96..b053a788d59c 100644 --- a/drivers/gpu/drm/xe/xe_device.c +++ b/drivers/gpu/drm/xe/xe_device.c @@ -715,9 +715,6 @@ int xe_device_probe_early(struct xe_device *xe) { int err; - xe_wa_device_init(xe); - xe_wa_process_device_oob(xe); - err = xe_mmio_probe_early(xe); if (err) return err; diff --git a/drivers/gpu/drm/xe/xe_pci.c b/drivers/gpu/drm/xe/xe_pci.c index 619653c68f2c..fb2a5f3311c8 100644 --- a/drivers/gpu/drm/xe/xe_pci.c +++ b/drivers/gpu/drm/xe/xe_pci.c @@ -15,6 +15,8 @@ #include #include +#include + #include "display/xe_display.h" #include "regs/xe_gt_regs.h" #include "regs/xe_regs.h" @@ -40,6 +42,7 @@ #include "xe_tile.h" #include "xe_tile_printk.h" #include "xe_wedge.h" +#include "xe_wa.h" enum toggle_d3cold { D3COLD_DISABLE, @@ -795,6 +798,17 @@ static int xe_info_init_early(struct xe_device *xe, xe->info.subplatform = subplatform_desc ? subplatform_desc->subplatform : XE_SUBPLATFORM_NONE; + /* + * Device OOB workarounds only match on platform, subplatform and + * platform step, which are all known by now, so process them here and + * make XE_DEVICE_WA() usable for the remainder of early probe. + */ + err = xe_wa_device_init(xe); + if (err) + return err; + + xe_wa_process_device_oob(xe); + xe->info.dma_mask_size = desc->dma_mask_size; xe->info.va_bits = desc->va_bits; xe->info.vm_max_level = desc->vm_max_level; -- 2.43.0