]> git.hungrycats.org Git - linux/commitdiff
drm/msm/a6xx: Fix stale rpmh votes after suspend
authorShivam Rawat <shivrawa@qti.qualcomm.com>
Thu, 4 Jun 2026 20:08:17 +0000 (01:38 +0530)
committerRob Clark <robin.clark@oss.qualcomm.com>
Thu, 16 Jul 2026 20:37:22 +0000 (13:37 -0700)
There are stale RPMH votes (BCM votes) observed after GMU suspend. This
is because the rpmh stop sequences are skipped during gmu suspend. Fix
this and also move GMU to reset state to avoid any further activity.

Fixes: f248d5d5159a ("drm/msm/a6xx: Fix PDC sleep sequence")
Signed-off-by: Shivam Rawat <shivrawa@qti.qualcomm.com>
Signed-off-by: Akhil P Oommen <akhilpo@oss.qualcomm.com>
Tested-by: Neil Armstrong <neil.armstrong@linaro.org> # on SM8650-HDK
Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
Reviewed-by: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com>
Patchwork: https://patchwork.freedesktop.org/patch/730652/
Message-ID: <20260605-assorted-fixes-june-v1-1-2caa04f7287c@oss.qualcomm.com>
Signed-off-by: Rob Clark <robin.clark@oss.qualcomm.com>
drivers/gpu/drm/msm/adreno/a6xx_gmu.c

index 2e5d7b53a0c380c664a1bd66eb7e51be8a151b93..a2f6918c4f7f23043eb28d9ddfbd27015d45dbba 100644 (file)
@@ -642,7 +642,7 @@ static void a6xx_rpmh_stop(struct a6xx_gmu *gmu)
        int ret;
        u32 val;
 
-       if (test_and_clear_bit(GMU_STATUS_FW_START, &gmu->status))
+       if (!test_and_clear_bit(GMU_STATUS_FW_START, &gmu->status))
                return;
 
        if (adreno_is_a840(adreno_gpu))
@@ -1465,6 +1465,9 @@ static void a6xx_gmu_shutdown(struct a6xx_gmu *gmu)
        /* Stop the interrupts and mask the hardware */
        a6xx_gmu_irq_disable(gmu);
 
+       /* Halt the gmu cm3 core */
+       gmu_write(gmu, REG_A6XX_GMU_CM3_SYSRESET, 1);
+
        /* Tell RPMh to power off the GPU */
        a6xx_rpmh_stop(gmu);