From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-alma10-1.taild15c8.ts.net [100.103.45.18]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 1CEA746A5F9; Tue, 21 Jul 2026 15:48:19 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=100.103.45.18 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1784648901; cv=none; b=QkRERRyMYBMA3kO83syi3s3ne3rtZti5a6aEj0Wq/CdEkihl3lRauJ/VcCZPyBtxRiRbk96Ra5X+DehISVRbmJykhUx8Q86DOdlMs257oS4gTZSzuM563SPciV39OXpoIQcisiBDUvJP+i7qhMJdKrbwLyDnyAT0oHOxPyz36lo= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1784648901; c=relaxed/simple; bh=KqlRfVx5xVSkxR6UVUi4ToHOLNZniXcrxXPG0dXD8L0=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=OolZRYzH7JK8+zlWpDLwVzoRrHKDcoOlclKVQW26QIsA9kJ8WMc+4qCOGsgDPVb9p3hrU3gb0TUzlyl0qcZhYYJEhJTFDDvSssYFZZ4d3DzZ7rtF7zFb9JV4aKnfyiVhuirM4sbc3/GOap7m6DATfU+dnRfvlq3JxQ5vx+FrWUc= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=YFSExxsg; arc=none smtp.client-ip=100.103.45.18 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="YFSExxsg" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 37F661F000E9; Tue, 21 Jul 2026 15:48:19 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linuxfoundation.org; s=korg; t=1784648899; bh=/3+nnPsynOyK3eFvTE+112uB5xt3HzlnE1oF0QQViRA=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=YFSExxsgZVgr2IggqC9aRACbXRgygpcQCr2jFhxCCswxEgBbmazZkREwT2UqCTgPp 63RgXEKd9jtUuVv7eM3iyH2faET6i4o0Nw46PmS++oC0CCj5dSN7uXxcvbQc1chS8E z3EGMiq32P/MYa+bPPn9U88eqt1wmE3ztS6CjjUQ= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, Akhil P Oommen , Konrad Dybcio , Taniya Das , Rob Clark , Sasha Levin Subject: [PATCH 7.1 0375/2077] drm/msm/a8xx: Make a8xx_recover IFPC safe Date: Tue, 21 Jul 2026 17:00:48 +0200 Message-ID: <20260721152601.534566108@linuxfoundation.org> X-Mailer: git-send-email 2.55.0 In-Reply-To: <20260721152552.646164743@linuxfoundation.org> References: <20260721152552.646164743@linuxfoundation.org> User-Agent: quilt/0.69 X-stable: review X-Patchwork-Hint: ignore Precedence: bulk X-Mailing-List: patches@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 7.1-stable review patch. If anyone has any objections, please let me know. ------------------ From: Akhil P Oommen [ Upstream commit e7c45d9838b7487c1846a0202c649336b2f5bf87 ] Similar to a6xx_recover(), check the GX power domain status before accessing mmio in GX domain a8xx_recover(). Fixes: 288a93200892 ("drm/msm/adreno: Introduce A8x GPU Support") Signed-off-by: Akhil P Oommen Reviewed-by: Konrad Dybcio Signed-off-by: Taniya Das Patchwork: https://patchwork.freedesktop.org/patch/720977/ Message-ID: <20260427-gfx-clk-fixes-v2-5-797e54b3d464@oss.qualcomm.com> Signed-off-by: Rob Clark Signed-off-by: Sasha Levin --- drivers/gpu/drm/msm/adreno/a8xx_gpu.c | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/drivers/gpu/drm/msm/adreno/a8xx_gpu.c b/drivers/gpu/drm/msm/adreno/a8xx_gpu.c index ccfccc45133fda..9b99ec5ceeb582 100644 --- a/drivers/gpu/drm/msm/adreno/a8xx_gpu.c +++ b/drivers/gpu/drm/msm/adreno/a8xx_gpu.c @@ -886,17 +886,22 @@ void a8xx_recover(struct msm_gpu *gpu) adreno_dump_info(gpu); - if (hang_debug) - a8xx_dump(gpu); - /* * To handle recovery specific sequences during the rpm suspend we are * about to trigger */ a6xx_gpu->hung = true; - /* Halt SQE first */ - gpu_write(gpu, REG_A8XX_CP_SQE_CNTL, 3); + if (adreno_gpu->funcs->gx_is_on(adreno_gpu)) { + /* + * Sometimes crashstate capture is skipped, so SQE should be + * halted here again + */ + gpu_write(gpu, REG_A8XX_CP_SQE_CNTL, 3); + + if (hang_debug) + a8xx_dump(gpu); + } pm_runtime_dont_use_autosuspend(&gpu->pdev->dev); -- 2.53.0