Skip to content

drm/msm/gpu: System suspend fixes

Rob Clark dri-devel linux-arm-msm lkml 3 versions – New

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v3 Latest2 patches 0 repliesNew
  2. v22 patches 0 repliesSuperseded
  3. v12 patches 4 repliesSuperseded

Patches in v3 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/2drm/msm/gpu: Wait for idle before suspendingdrivers/gpu/drm/msm/adreno/adreno_device.c drivers/gpu/drm/msm/msm_gpu.c drivers/gpu/drm/msm/msm_gpu.h+24 -00 replies
2/2drm/msm/gpu: Cancel idle/boost work on suspenddrivers/gpu/drm/msm/msm_gpu_devfreq.c+19 -20 replies

Reviews trailers per patch

1 of 2 patches has a Reviewed-by or Acked-by.

PatchBjorn AnderssonAngeloGioacchino Del Regno
1/2R-b R-b
2/2

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v3 thread

Cover letter [PATCH v3 0/2] drm/msm/gpu: System suspend fixes

From: Rob Clark <[email protected]>

Because system suspend uses pm_runtime_force_suspend() we can't rely runpm refcnt's to protect us if the GPU is active, etc. Fortunately *usually* the GPU is idle when system suspend is triggered. But that isn't quite good enough.

The first patch attempts to block for a modest amount of time until GPU is idle (and failing that, returns -EBUSY). We could have taken a slightly easier approach and just returned -EBUSY if GPU is not idle, but that would cause system suspend to fail. And no one likes pulling a hot laptop out of their backpack.

The second patch avoids getting devfreq callbacks after suspend, since pm_runtime_force_suspend() breaks the pm_runtime_get_if_in_use() tricks used to deal with devfreq callbacks while suspended.

Rob Clark (2):
drm/msm/gpu: Wait for idle before suspending
drm/msm/gpu: Cancel idle/boost work on suspend

 drivers/gpu/drm/msm/adreno/adreno_device.c | 18 ++++++++++++++++++
 drivers/gpu/drm/msm/msm_gpu.c              |  3 +++
 drivers/gpu/drm/msm/msm_gpu.h              |  3 +++
 drivers/gpu/drm/msm/msm_gpu_devfreq.c      | 21 +++++++++++++++++++--
 4 files changed, 43 insertions(+), 2 deletions(-)
Signature · 1 line
2.33.1