]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
drm/msm/a8xx: Make a8xx_recover IFPC safe
authorAkhil P Oommen <akhilpo@oss.qualcomm.com>
Mon, 27 Apr 2026 06:38:59 +0000 (12:08 +0530)
committerRob Clark <robin.clark@oss.qualcomm.com>
Fri, 29 May 2026 14:07:26 +0000 (07:07 -0700)
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 <akhilpo@oss.qualcomm.com>
Reviewed-by: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com>
Signed-off-by: Taniya Das <taniya.das@oss.qualcomm.com>
Patchwork: https://patchwork.freedesktop.org/patch/720977/
Message-ID: <20260427-gfx-clk-fixes-v2-5-797e54b3d464@oss.qualcomm.com>
Signed-off-by: Rob Clark <robin.clark@oss.qualcomm.com>
drivers/gpu/drm/msm/adreno/a8xx_gpu.c

index 29d559fe468344c0e3edd46150c57fc645cdc01a..86f2b1af9e2a643d2e4ae6c0378b0b4e3de7d805 100644 (file)
@@ -882,17 +882,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);