Skip to content

Commit 730b64d

Browse files
committed
Merge tag 'drm-msm-fixes-2021-10-18' of https://gitlab.freedesktop.org/drm/msm into drm-fixes
One more fix for v5.15, to work around a power stability issue on a630 (and possibly others) Signed-off-by: Dave Airlie <[email protected]> From: Rob Clark <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/CAF6AEGs1WPLthmd=ToDcEHm=u-7O38RAVJ2XwRoS8xPmC520vg@mail.gmail.com
2 parents 519d819 + 5ca6779 commit 730b64d

File tree

3 files changed

+13
-1
lines changed

3 files changed

+13
-1
lines changed

drivers/gpu/drm/msm/adreno/a6xx_gpu.c

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1838,6 +1838,13 @@ struct msm_gpu *a6xx_gpu_init(struct drm_device *dev)
18381838
adreno_cmp_rev(ADRENO_REV(6, 3, 5, ANY_ID), info->rev)))
18391839
adreno_gpu->base.hw_apriv = true;
18401840

1841+
/*
1842+
* For now only clamp to idle freq for devices where this is known not
1843+
* to cause power supply issues:
1844+
*/
1845+
if (info && (info->revn == 618))
1846+
gpu->clamp_to_idle = true;
1847+
18411848
a6xx_llc_slices_init(pdev, a6xx_gpu);
18421849

18431850
ret = a6xx_set_supported_hw(&pdev->dev, config->rev);

drivers/gpu/drm/msm/msm_gpu.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -203,6 +203,10 @@ struct msm_gpu {
203203
uint32_t suspend_count;
204204

205205
struct msm_gpu_state *crashstate;
206+
207+
/* Enable clamping to idle freq when inactive: */
208+
bool clamp_to_idle;
209+
206210
/* True if the hardware supports expanded apriv (a650 and newer) */
207211
bool hw_apriv;
208212

drivers/gpu/drm/msm/msm_gpu_devfreq.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -200,7 +200,8 @@ void msm_devfreq_idle(struct msm_gpu *gpu)
200200

201201
idle_freq = get_freq(gpu);
202202

203-
msm_devfreq_target(&gpu->pdev->dev, &target_freq, 0);
203+
if (gpu->clamp_to_idle)
204+
msm_devfreq_target(&gpu->pdev->dev, &target_freq, 0);
204205

205206
df->idle_time = ktime_get();
206207
df->idle_freq = idle_freq;

0 commit comments

Comments
 (0)