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 8D94E606A330 for ; Fri, 4 Dec 2026 19:59:08 +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=EVSeiyyw Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 501DA10E72E; Fri, 4 Dec 2026 19:59:03 +0000 (UTC) Received: from sea.source.kernel.org (sea.source.kernel.org [172.234.252.31]) by gabe.freedesktop.org (Postfix) with ESMTPS id 917AB10E72E for ; Fri, 4 Dec 2026 19:58:57 +0000 (UTC) Received: from smtp.kernel.org (quasi.space.kernel.org [100.103.45.18]) by sea.source.kernel.org (Postfix) with ESMTP id 60B4440136; Fri, 4 Dec 2026 19:58:57 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 357481F00936; Fri, 4 Dec 2026 19:58:57 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1796414337; bh=jBrTY/9KTVbIZEPE8UGU4+Fj6vcMIYvozWS/uNb4Rfs=; h=From:Subject:Reply-To:To:In-Reply-To:References:Date; b=EVSeiyywJ8bolU07RNuIzWePz0sN2O/+9rHwKgGl7YvhYe2BKKRwDreHYhKd6A6Aj 2EHyL6+uIxbFtccdNjOeM57aEkqgwWXeHQmxvR171CDpZBWpVtQeKgoKvfIqRROkoC AxUmbCpgCgZ2G7+XI2alOBIFmv9FjNyKJ019qI1qLWpnvfqPhR9bbv9mh6/WqGgGev Bm84LEHpExJgZ5XiaNAESrGBUI9zGAh3V50sHyUwBRMPTkCdr0+///+SnGpWlatbHv 9oTcKm+T7YBb4+JDSAAbMzXoYp30wQ9TafKXpElpylnKLxtjxaQdPvK8LV7gPdBwTM iMUKITq+vX2zw== Message-ID: From: sashiko-bot@kernel.org Subject: Re: [PATCH v3 4/6] drm/xe/uc: mark HuC and GSC as only available on the media GT To: "Daniele Ceraolo Spurio" , intel-xe@lists.freedesktop.org In-Reply-To: <20261204193456.1035581-12-daniele.ceraolospurio@intel.com> References: <20261204193456.1035581-8-daniele.ceraolospurio@intel.com> <20261204193456.1035581-12-daniele.ceraolospurio@intel.com> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Date: Fri, 04 Dec 2026 19:58:56 +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 1 potential issue to consider: - [High] drm/xe: uc_fw_override() breaks primary GT filtering for HuC/GSC overrides -- commit a0239ef6ac8f953a8c6f268f7370c54daa00bf6c Author: Daniele Ceraolo Spurio drm/xe/uc: mark HuC and GSC as only available on the media GT This commit restricts the HuC and GSC firmware definitions on multi-GT platforms to GT_TYPE_MEDIA and removes the early GT-type checks from xe_gsc_init() and xe_huc_init(). > diff --git a/drivers/gpu/drm/xe/xe_gsc.c b/drivers/gpu/drm/xe/xe_gsc.c > index 8edb8cee3cbd8..f8ce76ca05759 100644 > --- a/drivers/gpu/drm/xe/xe_gsc.c > +++ b/drivers/gpu/drm/xe/xe_gsc.c > @@ -402,19 +402,12 @@ void xe_gsc_hwe_irq_handler(struct xe_hw_engine *hw= e, u16 intr_vec) > int xe_gsc_init(struct xe_gsc *gsc) > { > struct xe_gt *gt =3D gsc_to_gt(gsc); > - struct xe_tile *tile =3D gt_to_tile(gt); > int ret; > =20 > gsc->fw.type =3D XE_UC_FW_TYPE_GSC; > INIT_WORK(&gsc->work, gsc_work); > spin_lock_init(&gsc->lock); > =20 > - /* The GSC uC is only available on the media GT */ > - if (tile->media_gt && (gt !=3D tile->media_gt)) { > - xe_uc_fw_change_status(&gsc->fw, XE_UC_FIRMWARE_NOT_SUPPORTED); > - return 0; > - } > - > /* > * Starting from BMG the GSC is no longer needed for MC6 entry, so the > * only missing features if the FW is lacking would be the content > diff --git a/drivers/gpu/drm/xe/xe_huc.c b/drivers/gpu/drm/xe/xe_huc.c > index c73e1acbd091b..dbd420fb46bd5 100644 > --- a/drivers/gpu/drm/xe/xe_huc.c > +++ b/drivers/gpu/drm/xe/xe_huc.c > @@ -70,17 +70,6 @@ int xe_huc_init(struct xe_huc *huc) > =20 > huc->fw.type =3D XE_UC_FW_TYPE_HUC; > =20 > - /* > - * The HuC is only available on the media GT on most platforms. The > - * exception to that rule are the old Xe1 platforms where there was > - * no separate GT for media IP, so the HuC was part of the primary > - * GT. Such platforms have graphics versions 12.55 and earlier. > - */ > - if (!xe_gt_is_media_type(gt) && GRAPHICS_VERx100(xe) > 1255) { > - xe_uc_fw_change_status(&huc->fw, XE_UC_FIRMWARE_NOT_SUPPORTED); > - return 0; > - } > - > ret =3D xe_uc_fw_init(&huc->fw); > if (ret) > goto out; [Severity: High] Does removing these checks break gsc_firmware_path and huc_firmware_path overrides on platforms with a media GT? In uc_fw_request(), uc_fw_override() runs unconditionally after uc_fw_auto_select() and before XE_UC_FIRMWARE_NOT_SUPPORTED is set: drivers/gpu/drm/xe/xe_uc_fw.c:uc_fw_request() { ... uc_fw_auto_select(xe, uc_fw); if (IS_SRIOV_VF(xe)) { uc_fw_vf_override(uc_fw); return 0; } uc_fw_override(uc_fw); xe_uc_fw_change_status(uc_fw, uc_fw->path ? XE_UC_FIRMWARE_SELECTED : XE_UC_FIRMWARE_NOT_SUPPORTED); ... } When gsc_firmware_path is set on a multi-GT platform, uc_fw_override() sets uc_fw->path on primary_gt despite GT_TYPE_MEDIA filtering. xe_gsc_init() then calls xe_gsc_proxy_init() on primary_gt, and binding mei_gsc_proxy locks the uninitialized media_gt->uc.gsc.proxy.mutex. xe_gsc_init_post_hwconfig() then fails probe with -ENODEV because primary_gt has no GSCCS engine, and devm unwind runs xe_gsc_proxy_component_unbind() against the uninitialized media_gt. With huc_firmware_path set, primary_gt marks HuC loadable, allocates pinned BOs, and attempts HuC upload and authentication on a GT without HuC hardware. Checking the GT type in uc_fw_override() would keep primary_gt marked XE_UC_FIRMWARE_NOT_SUPPORTED. --=20 Sashiko AI review =C2=B7 https://sashiko.dev/#/patchset/20261204193456.1035= 581-8-daniele.ceraolospurio@intel.com?part=3D4