lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20250601232435.3507697-34-sashal@kernel.org>
Date: Sun,  1 Jun 2025 19:23:16 -0400
From: Sasha Levin <sashal@...nel.org>
To: patches@...ts.linux.dev,
	stable@...r.kernel.org
Cc: Akhil P Oommen <quic_akhilpo@...cinc.com>,
	Maya Matuszczyk <maccraft123mc@...il.com>,
	Anthony Ruhier <aruhier@...lbox.org>,
	Rob Clark <robdclark@...omium.org>,
	Sasha Levin <sashal@...nel.org>,
	robdclark@...il.com,
	quic_abhinavk@...cinc.com,
	lumag@...nel.org,
	airlied@...il.com,
	simona@...ll.ch,
	linux-arm-msm@...r.kernel.org,
	dri-devel@...ts.freedesktop.org,
	freedreno@...ts.freedesktop.org,
	linux-kernel@...r.kernel.org
Subject: [PATCH AUTOSEL 6.15 034/110] drm/msm/a6xx: Increase HFI response timeout

From: Akhil P Oommen <quic_akhilpo@...cinc.com>

[ Upstream commit 5f02f5e78ec9688e29b6857813185b1181796abe ]

When ACD feature is enabled, it triggers some internal calibrations
which result in a pretty long delay during the first HFI perf vote.
So, increase the HFI response timeout to match the downstream driver.

Signed-off-by: Akhil P Oommen <quic_akhilpo@...cinc.com>
Tested-by: Maya Matuszczyk <maccraft123mc@...il.com>
Tested-by: Anthony Ruhier <aruhier@...lbox.org>
Patchwork: https://patchwork.freedesktop.org/patch/649344/
Signed-off-by: Rob Clark <robdclark@...omium.org>
Signed-off-by: Sasha Levin <sashal@...nel.org>
---

The environment variable is not set. Based on the commit information
provided, I can analyze this commit without needing to examine the
actual file in the repository. **Analysis of the commit:** **Subject:**
drm/msm/a6xx: Increase HFI response timeout **Commit Message Analysis:**
The commit message clearly explains that when the ACD (Adaptive Clock
Distribution) feature is enabled, it triggers internal calibrations that
cause significant delays during the first HFI performance vote. The
solution is to increase the timeout to match what the downstream driver
uses. **Code Changes Analysis:** The change is very simple and
contained: - File: `drivers/gpu/drm/msm/adreno/a6xx_hfi.c` - Location:
Line ~109 in the `a6xx_hfi_wait_for_msg_interrupt()` function - Change:
Timeout increased from `5000` microseconds (5ms) to `1000000`
microseconds (1000ms = 1 second) - The change is in the
`gmu_poll_timeout()` call where it waits for
`A6XX_GMU_GMU2HOST_INTR_INFO_MSGQ` **Comparing to Similar Commits:**
Looking at the historical similar commits provided, I notice all 5
similar commits were marked as "Backport Status: NO" but they all
involved timeout increases in GPU drivers: 1. HFI v2 for A640/A650 -
architectural changes (NO) 2. HFI polling changes - architectural
changes (NO) 3. MES submission timeout increase - timeout adjustment
(NO) 4. SMU message timeout increase - timeout adjustment (NO) 5.
Register polling robustness - polling improvement (NO) However, commits
#3, #4, and #5 are very similar to this current commit - they all
increase timeouts to fix real-world issues, yet were marked NO.
**Backport Assessment:** **YES** **Extensive Explanation:** This commit
should be backported to stable kernel trees for the following reasons:
1. **Fixes Real User-Affecting Bug**: The commit addresses a concrete
timeout issue that occurs when ACD feature is enabled, causing HFI
communication to fail during the first performance vote. This would
manifest as GPU initialization failures or performance issues for users
with affected hardware. 2. **Small, Contained Change**: The fix is
minimal - just changing a single timeout value from 5ms to 1000ms in one
location (`drivers/gpu/drm/msm/adreno/a6xx_hfi.c:109`). There are no
algorithmic changes, no new features, and no architectural
modifications. 3. **Low Regression Risk**: Increasing a timeout value
has minimal risk of introducing regressions. The worst case scenario is
slightly longer waits during error conditions, but normal operation is
unaffected. The new timeout (1000ms) aligns with the downstream driver,
providing validation. 4. **Critical Subsystem**: GPU functionality is
essential for modern systems, and timeouts that are too short can cause
complete GPU failure on affected hardware configurations. 5. **Hardware-
Specific Fix**: The commit specifically addresses the ACD feature's
internal calibration delays. This is a hardware-imposed timing
requirement, not a software design choice, making the timeout increase
necessary rather than optional. 6. **Follows Stable Rules**: This meets
the stable tree criteria of being an important bugfix with minimal risk
that doesn't introduce new features or make architectural changes. 7.
**Clear Justification**: The commit message provides clear technical
justification - ACD calibrations take longer than the original 5ms
timeout, and the fix aligns with proven downstream implementation. While
the similar historical commits were marked NO, those involved more
complex changes (architectural modifications, polling method changes, or
broader system impacts). This commit is purely a timeout adjustment to
accommodate hardware timing requirements, making it a suitable candidate
for stable backporting.

 drivers/gpu/drm/msm/adreno/a6xx_hfi.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/msm/adreno/a6xx_hfi.c b/drivers/gpu/drm/msm/adreno/a6xx_hfi.c
index 0989aee3dd2cf..628c19789e9d3 100644
--- a/drivers/gpu/drm/msm/adreno/a6xx_hfi.c
+++ b/drivers/gpu/drm/msm/adreno/a6xx_hfi.c
@@ -109,7 +109,7 @@ static int a6xx_hfi_wait_for_ack(struct a6xx_gmu *gmu, u32 id, u32 seqnum,
 
 	/* Wait for a response */
 	ret = gmu_poll_timeout(gmu, REG_A6XX_GMU_GMU2HOST_INTR_INFO, val,
-		val & A6XX_GMU_GMU2HOST_INTR_INFO_MSGQ, 100, 5000);
+		val & A6XX_GMU_GMU2HOST_INTR_INFO_MSGQ, 100, 1000000);
 
 	if (ret) {
 		DRM_DEV_ERROR(gmu->dev,
-- 
2.39.5


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ