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 BB051606A320 for ; Fri, 20 Nov 2026 02:44:42 +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=A7T1bEsK Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 6FD1410E2CF; Fri, 20 Nov 2026 02:44:37 +0000 (UTC) Received: from sea.source.kernel.org (sea.source.kernel.org [172.234.252.31]) by gabe.freedesktop.org (Postfix) with ESMTPS id 7832510E5E3 for ; Fri, 20 Nov 2026 02:44:30 +0000 (UTC) Received: from smtp.kernel.org (quasi.space.kernel.org [100.103.45.18]) by sea.source.kernel.org (Postfix) with ESMTP id 427E34592D; Fri, 20 Nov 2026 02:44:30 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 0187F1F000E0; Fri, 20 Nov 2026 02:44:29 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1795142670; bh=0sUikTHt5ZFrwVR+IQaOjxkTT9uDlzOHP0sEVq9m23Y=; h=From:Subject:Reply-To:To:In-Reply-To:References:Date; b=A7T1bEsKAeTCZFlar4E2x9wPkFVBP3ooY/oc4GG+NiNiUVt45gG1xFFZYVBgxTNwk StYg4dScRV3jqKTwNp2yGW8cCYJM+L/s5j9QQ/5CTu7GS3VbE9RD89cCEOVY9ae9e0 pxVuZlUnyPkN47b1SpwetumJsyTQbTO1CiH0x6QOAHB/mfwmr1uPpWtAzFclu8I4jI 1LZ7t67f/pUJHTJG1x97a+tKa1KYtGaPG1f/qEDv+1lmLM2co5Z69YQP3NX2IlAPos NYmIBMnBjGpEJOK6Iour/XMMIYRYKqVmZfBXeY+5GoGuPr2b3GzUEddKiVxC5EQDNk 7ZnxgP0Sr0Ruw== Message-ID: From: sashiko-bot@kernel.org Subject: Re: [PATCH v20 15/19] drm/xe/vsec: Support late bind fw information To: "Michael J. Ruhl" , intel-xe@lists.freedesktop.org In-Reply-To: <20261120021929.473553-36-michael.j.ruhl@intel.com> References: <20261120021929.473553-21-michael.j.ruhl@intel.com> <20261120021929.473553-36-michael.j.ruhl@intel.com> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Date: Fri, 20 Nov 2026 02:44:29 +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/vsec: missing runtime PM and FW wait in xe_pmt_discovery_read() -- commit e59bd8c1a9c29d7e8aa32d98749713101a75f4bf Author: Michael J. Ruhl drm/xe/vsec: Support late bind fw information This commit defers Crescent Island VSEC registration until the OOBMSM late-bind firmware is ready and waits for firmware readiness in the PMT read and write callbacks. > diff --git a/drivers/gpu/drm/xe/xe_vsec.c b/drivers/gpu/drm/xe/xe_vsec.c > index 4c54f44d89adf..b6add588c0932 100644 > --- a/drivers/gpu/drm/xe/xe_vsec.c > +++ b/drivers/gpu/drm/xe/xe_vsec.c [ ... ] > @@ -465,6 +528,10 @@ static int xe_pmt_read_reg(struct device *dev, u32 g= uid, u32 *reg, u32 offset) > disc_addr +=3D inst + offset; > =20 > xe_pm_runtime_get(xe); > + if (!wait_for_fw(xe)) { > + ret =3D -ENODATA; > + goto runtime_exit; > + } > =20 > scoped_guard(mutex, &xe->pmt.lock) { > xe->soc_remapper.set_telem_region(xe, CRI_IDX_TELEM_DISCOVERY); > @@ -472,6 +539,7 @@ static int xe_pmt_read_reg(struct device *dev, u32 gu= id, u32 *reg, u32 offset) > *reg =3D readl(disc_addr); > } > =20 > +runtime_exit: > xe_pm_runtime_put(xe); > =20 > drm_dev_exit(idx); [Severity: Medium] Should xe_pmt_discovery_read() also acquire runtime PM and call wait_for_fw(xe) before reading discovery data from CRI_IDX_TELEM_DISCOVERY? drivers/gpu/drm/xe/xe_vsec.c:xe_pmt_discovery_read() { ... scoped_guard(mutex, &xe->pmt.lock) { xe->soc_remapper.set_telem_region(xe, CRI_IDX_TELEM_DISCOVERY); memcpy_fromio(disc_data, disc_addr, PMT_DISC_DWORDS * sizeof(u32)); } ... } When a PMT auxiliary driver probes or rebinds after a D3cold resume, pm_runtime_get_sync() on the parent device returns while xe_late_bind_pm_resume() is still reloading the OOBMSM firmware asynchronously on late_bind.wq. pmt_get_headers() then calls xe_pmt_discovery_read(), which accesses the discovery window before the firmware is ready. --=20 Sashiko AI review =C2=B7 https://sashiko.dev/#/patchset/20261120021929.4735= 53-21-michael.j.ruhl@intel.com?part=3D15