]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
drm/msm/a6xx: Fix the gemnoc workaround
authorAkhil P Oommen <akhilpo@oss.qualcomm.com>
Tue, 18 Nov 2025 08:50:30 +0000 (14:20 +0530)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 18 Dec 2025 13:03:05 +0000 (14:03 +0100)
[ Upstream commit ff7a6de043fce21ea5891311746b16121b385c59 ]

Correct the register offset and enable this workaround for all A7x
and newer GPUs to match the recommendation. Also, downstream does this
w/a after moving the fence to allow mode. So do the same.

Fixes: dbfbb376b50c ("drm/msm/a6xx: Add A621 support")
Reviewed-by: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com>
Signed-off-by: Akhil P Oommen <akhilpo@oss.qualcomm.com>
Patchwork: https://patchwork.freedesktop.org/patch/688997/
Message-ID: <20251118-kaana-gpu-support-v4-3-86eeb8e93fb6@oss.qualcomm.com>
Signed-off-by: Rob Clark <robin.clark@oss.qualcomm.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/gpu/drm/msm/adreno/a6xx_gmu.c

index 4e6dc16e4a4c4846f8a174c663a25452aa433f12..605bb55de8d529f8644f44ea911d00ac1ef0999e 100644 (file)
@@ -485,8 +485,9 @@ static void a6xx_gemnoc_workaround(struct a6xx_gmu *gmu)
         * in the power down sequence not being fully executed. That in turn can
         * prevent CX_GDSC from collapsing. Assert Qactive to avoid this.
         */
-       if (adreno_is_a621(adreno_gpu) || adreno_is_7c3(adreno_gpu))
-               gmu_write(gmu, REG_A6XX_GMU_AO_AHB_FENCE_CTRL, BIT(0));
+       if (adreno_is_a7xx(adreno_gpu) || (adreno_is_a621(adreno_gpu) ||
+                               adreno_is_7c3(adreno_gpu)))
+               gmu_write(gmu, REG_A6XX_GPU_GMU_CX_GMU_CX_FALNEXT_INTF, BIT(0));
 }
 
 /* Let the GMU know that we are about to go into slumber */
@@ -522,10 +523,9 @@ static int a6xx_gmu_notify_slumber(struct a6xx_gmu *gmu)
        }
 
 out:
-       a6xx_gemnoc_workaround(gmu);
-
        /* Put fence into allow mode */
        gmu_write(gmu, REG_A6XX_GMU_AO_AHB_FENCE_CTRL, 0);
+       a6xx_gemnoc_workaround(gmu);
        return ret;
 }