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 0EADF606A31A for ; Mon, 30 Nov 2026 21:51:12 +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=npYXMfVh Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 6818210E729; Mon, 30 Nov 2026 21:51:06 +0000 (UTC) Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.16]) by gabe.freedesktop.org (Postfix) with ESMTPS id BB09310E043 for ; Mon, 30 Nov 2026 21:50:59 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1796075460; x=1827611460; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=7Bv1CcVm06AWIWe37MEJB4Xwide8TwvS149Ij86+INc=; b=npYXMfVhrK1ORvz3Hob/m+7zA+b7C8XpQxIGBQxPzvJ8IKz7MIMXzVnx T02t+4wnlgog42mG85vCIhEZokVhMmgg7HKvyP2QXcf3JiXsdZpIM/VqV LBSF7UMcNMZqnhkBO9WittX6bBpFy0IuJzto0x7Fls9YNnFtZDUu2HSHh /FzvvBfJK5m13Inasuklj6qoHi54nVM9qS2izNHYbnPJN2p3/AmcbwMz7 yk5NlUOcpZ//JH6+Nv7baFX0YQubNcu2yQjQD/+1L5dEJvsP8IhPnpsdG zwDT0OouPj9qyF8j5p7oTHcpi7U2bfCqlTnCtAjIXIxFTV+U9Fe9IYpfi A==; X-CSE-ConnectionGUID: DGy+RZjUTPyUBQCgkGoREw== X-CSE-MsgGUID: nyrG20glQROFNI36iFv3hg== X-IronPort-AV: E=McAfee;i="6800,10657,11982"; a="4928734" X-IronPort-AV: E=Sophos;i="6.27,243,1787036400"; d="scan'208";a="4928734" Received: from fmviesa001.fm.intel.com ([10.60.135.141]) by fmvoesa110.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 30 Nov 2026 13:50:52 -0800 X-CSE-ConnectionGUID: smzoS77NTfCMVOi7CcWnHA== X-CSE-MsgGUID: U+gIMfiQRCS+i6m5zM0zvA== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.27,243,1787036400"; d="scan'208";a="13540989" Received: from dut4599nvls.fm.intel.com ([10.80.95.137]) by smtpauth.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 30 Nov 2026 13:50:13 -0800 From: Stuart Summers To: Cc: rodrigo.vivi@intel.com, riana.tauro@intel.com, anoop.c.vijay@intel.com, intel-xe@lists.freedesktop.org, Stuart Summers Subject: [PATCH 2/2] drm/xe: Process device OOB workarounds during early info init Date: Mon, 30 Nov 2026 21:50:12 +0000 Message-ID: <20261130215010.199139-6-stuart.summers@intel.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20261130215010.199139-4-stuart.summers@intel.com> References: <20261130215010.199139-4-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 Reviewed-by: Rodrigo Vivi --- drivers/gpu/drm/xe/xe_device.c | 3 --- drivers/gpu/drm/xe/xe_pci.c | 9 +++++++++ 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/drivers/gpu/drm/xe/xe_device.c b/drivers/gpu/drm/xe/xe_device.c index fccb0eff54ee..86de5f183c0a 100644 --- a/drivers/gpu/drm/xe/xe_device.c +++ b/drivers/gpu/drm/xe/xe_device.c @@ -725,9 +725,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 ac04a45ab13e..0c6bc82d917b 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, @@ -807,6 +810,12 @@ static int xe_info_init_early(struct xe_device *xe, xe->info.subplatform = subplatform_desc ? subplatform_desc->subplatform : XE_SUBPLATFORM_NONE; + 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