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 A46EF606A322 for ; Fri, 4 Dec 2026 19:56:51 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=iufVTAX+ Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 6D0B010EC3A; Fri, 4 Dec 2026 19:56:46 +0000 (UTC) Received: from sea.source.kernel.org (sea.source.kernel.org [172.234.252.31]) by gabe.freedesktop.org (Postfix) with ESMTPS id E1F5F10EC3A for ; Fri, 4 Dec 2026 19:56:40 +0000 (UTC) Received: from smtp.kernel.org (quasi.space.kernel.org [100.103.45.18]) by sea.source.kernel.org (Postfix) with ESMTP id B47F944669; Fri, 4 Dec 2026 19:56:40 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 861E71F00936; Fri, 4 Dec 2026 19:56:40 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1796414200; bh=tlk6inKvgsLevuJ2wHx5EtRR3njAPawSsf2Qlte4SUg=; h=From:Subject:Reply-To:To:In-Reply-To:References:Date; b=iufVTAX+eAUdk1W2LtkEg6vNm+9EPDFUi0ObRY3NrbYbdp/dDOumMt2b6FnPkyd4d sWEcRRr8/Ppmuq+XjrQ1+Q2jib2TZJN8y4HUOsGMLbkWW5sWwkWYnaQO7o3zdWykyG Co4xsYSDEYlWKdh+gA3yFQ0OZ+8nUkkC8OPT1YJarDYoxTm7WCYyJ/O2+M+AH8IIsE 3t+SthgoFrh9wZWQrjTzyvvYKpziQCJ/oEJysQKgcgAS3Y+74XlQlL9sDiigfEM4a5 VqPGD5oYYEqFXiqoFqHdsOJSeqrteDb24FytVgZybKlgY2T4ldGK6I80z+BcQ5f8lb epz/qo+Bl/qBA== Message-ID: From: sashiko-bot@kernel.org Subject: Re: [PATCH v3 5/6] drm/xe/uc: Support fetching different FW files per-subplatform To: "Daniele Ceraolo Spurio" , intel-xe@lists.freedesktop.org In-Reply-To: <20261204193456.1035581-13-daniele.ceraolospurio@intel.com> References: <20261204193456.1035581-8-daniele.ceraolospurio@intel.com> <20261204193456.1035581-13-daniele.ceraolospurio@intel.com> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Date: Fri, 04 Dec 2026 19:56:40 +0000 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: , Reply-To: sashiko-reviews@lists.linux.dev Sender: "Intel-xe" X-Spam-Status: No, score=-11.2 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS 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 X-Archived-By: Thank you for your contribution! Sashiko AI review found 2 potential issues to consider: - [Medium] drm/xe/uc: modparam firmware overrides bypass media-GT filter for GSC and HuC - [Low] drm/xe/uc: spurious fallback firmware notice for modparam-overridden paths -- commit 27f0e65a8ceab7b5459f3e28d494c58aea0ce589 Author: Daniele Ceraolo Spurio drm/xe/uc: Support fetching different FW files per-subplatform This commit adds subplatform matching to uc_fw_entry and uc_fw_auto_select(= ), and updates the GSC firmware table to use a dedicated XE_GSC_FW_ENTRY macro that takes a subplatform parameter. > diff --git a/drivers/gpu/drm/xe/xe_uc_fw.c b/drivers/gpu/drm/xe/xe_uc_fw.c > index 2696e1fe0be0c..701e7709d330b 100644 > --- a/drivers/gpu/drm/xe/xe_uc_fw.c > +++ b/drivers/gpu/drm/xe/xe_uc_fw.c [ ... ] > @@ -184,10 +186,19 @@ struct fw_blobs_by_type { > #define XE_UC_FW_ENTRY(platform__, gt_type__, entry__) \ > { \ > .platform =3D XE_ ## platform__, \ > + .subplatform =3D XE_SUBPLATFORM_ANY, \ > .gt_type =3D XE_ ## gt_type__, \ > entry__, \ > }, > =20 > +#define XE_GSC_FW_ENTRY(platform__, subplatform__, entry__) \ > + { \ > + .platform =3D XE_ ## platform__, \ > + .subplatform =3D XE_ ## subplatform__, \ > + .gt_type =3D XE_GT_TYPE_MEDIA, \ > + entry__, \ > + }, [Severity: Medium] Can setting gsc_firmware_path or huc_firmware_path bypass the XE_GT_TYPE_MEDIA filter and select firmware on the primary GT? Since commit "drm/xe/uc: mark HuC and GSC as only available on the media GT" removed the GT-type guards in xe_gsc_init() and xe_huc_init(), uc_fw_auto_select() is the only place excluding GSC and HuC from the primary GT. In uc_fw_request(), uc_fw_override() runs before the XE_UC_FIRMWARE_NOT_SUPPORTED status check and sets uc_fw->path unconditionally: drivers/gpu/drm/xe/xe_uc_fw.c:uc_fw_request() { ... uc_fw_auto_select(xe, uc_fw); ... uc_fw_override(uc_fw); xe_uc_fw_change_status(uc_fw, uc_fw->path ? XE_UC_FIRMWARE_SELECTED : XE_UC_FIRMWARE_NOT_SUPPORTED); ... } With a non-empty gsc_firmware_path on a platform with a separate media GT, gsc->fw is marked available on the primary GT and xe_gsc_init_post_hwconfig= () aborts probe with -ENODEV because that GT has no XE_ENGINE_CLASS_OTHER engine. Similarly, huc_firmware_path marks HuC loadable on the primary GT and causes xe_uc_load_hw() to call xe_huc_upload() on a GT without HuC hardware. [ ... ] > @@ -269,6 +280,10 @@ uc_fw_auto_select(struct xe_device *xe, struct xe_uc= _fw *uc_fw) > if (p !=3D entries[i].platform) > continue; > =20 > + if (entries[i].subplatform !=3D XE_SUBPLATFORM_ANY && > + entries[i].subplatform !=3D xe->info.subplatform) > + continue; > + > if (entries[i].gt_type !=3D XE_GT_TYPE_ANY && > entries[i].gt_type !=3D gt->info.type) > continue; [Severity: Low] Does xe_uc_fw_check_version_requirements() log a spurious fallback notice when guc_firmware_path or gsc_firmware_path is overridden? uc_fw_auto_select() sets both uc_fw->path and uc_fw->wanted_path, and uc_fw_override() later replaces uc_fw->path with the modparam string without updating uc_fw->wanted_path. In xe_uc_fw_check_version_requirements() (added in commit "drm/xe/uc: Add FW file fallback support"), the uc_fw->wanted_path !=3D uc_fw->path check does= not guard on !xe_uc_fw_is_overridden(uc_fw), so any GuC or GSC modparam override emits misleading fallback and linux-firmware update messages. --=20 Sashiko AI review =C2=B7 https://sashiko.dev/#/patchset/20261204193456.1035= 581-8-daniele.ceraolospurio@intel.com?part=3D5