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 8196F606A32A for ; Tue, 1 Dec 2026 23:24:52 +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=Ub7AI45i Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 4A29310E469; Tue, 1 Dec 2026 23:24:47 +0000 (UTC) Received: from sea.source.kernel.org (sea.source.kernel.org [172.234.252.31]) by gabe.freedesktop.org (Postfix) with ESMTPS id 5CB8810E469 for ; Tue, 1 Dec 2026 23:24: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 18A9C42DB8; Tue, 1 Dec 2026 23:24:40 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id E193A1F00893; Tue, 1 Dec 2026 23:24:39 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1796167480; bh=Y1ijFmgRCxSGkQgd+HWHAhzwjRRm7r5sw8O2yzfPIOk=; h=From:Subject:Reply-To:To:In-Reply-To:References:Date; b=Ub7AI45iN0+iFkcp23H9goII0+6rEwfoOVNgXWi2+RdSbLMuGWNsYu/TLlJYQDTzd 5Bc2FfBDibNEs4bGop46EC2WNFrKkLZyyVy0Eg1shqconuXZmR1EwbdfaCukvDULD7 WdHaWr6WlSzO17dRaX8Rb+Fc4gLxoy91wnPZBhq+L3IciGavdZ5HPpyM+Mn5kDu7R7 plfOnUi0oDLLddhaslHJlIwr2TuqyjJzTzw1gXLGVZlQhCEReafHJWLrqS/WaHggEq UXZVJC8U00AWLbmhE4sQTmW9g925tfR945nlG/TiUWmihNGS39MGwVappoq22Ef0la G+DFIfKUA6Zkg== Message-ID: From: sashiko-bot@kernel.org Subject: Re: [RESEND PATCH v3 2/3] drm/xe/forcewake: flush delayed release at power and teardown boundaries To: "Zongyao Bai" , intel-xe@lists.freedesktop.org In-Reply-To: <20261201230744.680448-3-zongyao.bai@intel.com> References: <20261201230744.680448-1-zongyao.bai@intel.com> <20261201230744.680448-3-zongyao.bai@intel.com> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Date: Tue, 01 Dec 2026 23:24:39 +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=-10.8 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: - [Medium] drm/xe: missing xe_force_wake_flush() in xe_gt_flr_prepare() before PCIe FLR -- commit 9c538d813afa70e3cd0f25e79eefb0e7519a510c Author: Zongyao Bai drm/xe/forcewake: flush delayed release at power and teardown boundaries This commit adds xe_force_wake_flush() and xe_force_wake_stop() to cancel delayed forcewake releases and put held domains to sleep across suspend, shutdown, and device removal. > diff --git a/drivers/gpu/drm/xe/xe_gt.c b/drivers/gpu/drm/xe/xe_gt.c > index 1d2fbb8a0de8d..9c8c315f63b24 100644 > --- a/drivers/gpu/drm/xe/xe_gt.c > +++ b/drivers/gpu/drm/xe/xe_gt.c > @@ -1058,7 +1058,7 @@ int xe_gt_suspend(struct xe_gt *gt) > xe_gt_dbg(gt, "suspending\n"); > xe_gt_sanitize(gt); > =20 > - CLASS(xe_force_wake, fw_ref)(gt_to_fw(gt), XE_FORCEWAKE_ALL); > + CLASS(xe_force_wake_flush, fw_ref)(gt_to_fw(gt), XE_FORCEWAKE_ALL); > if (!xe_force_wake_ref_has_domain(fw_ref.domains, XE_FORCEWAKE_ALL)) { > xe_gt_err(gt, "suspend failed (%pe)\n", ERR_PTR(-ETIMEDOUT)); > return -ETIMEDOUT; [Severity: Medium] Should xe_gt_flr_prepare() also call xe_force_wake_flush(gt_to_fw(gt))? When xe_pci_reset_prepare() calls xe_device_suspend(xe, false, true), the flr branch calls xe_gt_flr_prepare() instead of xe_gt_suspend(): drivers/gpu/drm/xe/xe_device.c:xe_device_suspend() { ... if (flr) { for_each_gt(gt, xe, id) xe_gt_flr_prepare(gt); } else { ... for_each_gt(gt, xe, id) { err =3D xe_gt_suspend(gt); ... } If a forcewake domain is in delayed hold when a PCIe FLR starts, delayed_release_work can fire while MMIO is disabled during the reset and trigger sleep ACK timeout warnings, or fw->delayed_domains can stay set after the hardware FLR resets domains to sleep, causing xe_force_wake_get() during post-FLR xe_device_resume() to reuse the domain without waking it. --=20 Sashiko AI review =C2=B7 https://sashiko.dev/#/patchset/20261201230744.6804= 48-1-zongyao.bai@intel.com?part=3D2