]> git.proxmox.com Git - mirror_ubuntu-jammy-kernel.git/commitdiff
drm/msm/a6xx: fix frequency not always being restored on GMU resume
authorJonathan Marek <jonathan@marek.ca>
Thu, 13 Aug 2020 18:54:48 +0000 (14:54 -0400)
committerRob Clark <robdclark@chromium.org>
Sat, 22 Aug 2020 17:56:45 +0000 (10:56 -0700)
The patch reorganizing the set_freq function made it so the gmu resume
doesn't always set the frequency, because a6xx_gmu_set_freq() exits early
when the frequency hasn't been changed. Note this always happens when
resuming GMU after recovering from a hang.

Use a simple workaround to prevent this from happening.

Fixes: 1f60d11423db ("drm: msm: a6xx: send opp instead of a frequency")
Signed-off-by: Jonathan Marek <jonathan@marek.ca>
Signed-off-by: Rob Clark <robdclark@chromium.org>
drivers/gpu/drm/msm/adreno/a6xx_gmu.c

index b3b5047bb7e7760f88e908ed0550df45690518bb..46a29e383bfd1c1aae4f9bd06b00e67027095f43 100644 (file)
@@ -851,6 +851,7 @@ static void a6xx_gmu_set_initial_freq(struct msm_gpu *gpu, struct a6xx_gmu *gmu)
        if (IS_ERR_OR_NULL(gpu_opp))
                return;
 
+       gmu->freq = 0; /* so a6xx_gmu_set_freq() doesn't exit early */
        a6xx_gmu_set_freq(gpu, gpu_opp);
        dev_pm_opp_put(gpu_opp);
 }