dri-devel.lists.freedesktop.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/2] drm/msm/gpu: System suspend fixes
@ 2022-01-06 18:14 Rob Clark
  2022-01-06 18:14 ` [PATCH 1/2] drm/msm/gpu: Wait for idle before suspending Rob Clark
  2022-01-06 18:14 ` [PATCH 2/2] drm/msm/gpu: Cancel idle/boost work on suspend Rob Clark
  0 siblings, 2 replies; 7+ messages in thread
From: Rob Clark @ 2022-01-06 18:14 UTC (permalink / raw)
  To: dri-devel
  Cc: Rob Clark, Jonathan Marek, Akhil P Oommen, linux-arm-msm,
	Vladimir Lypak, Abhinav Kumar, Bjorn Andersson, Iskren Chernev,
	Jordan Crouse, freedreno, open list, AngeloGioacchino Del Regno

From: Rob Clark <robdclark@chromium.org>

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 |  9 +++++++++
 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, 34 insertions(+), 2 deletions(-)

-- 
2.33.1


^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2022-01-08 17:41 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-01-06 18:14 [PATCH 0/2] drm/msm/gpu: System suspend fixes Rob Clark
2022-01-06 18:14 ` [PATCH 1/2] drm/msm/gpu: Wait for idle before suspending Rob Clark
2022-01-06 23:25   ` Bjorn Andersson
2022-01-07  9:05   ` AngeloGioacchino Del Regno
2022-01-08  0:27   ` Stephen Boyd
2022-01-08 17:41     ` Rob Clark
2022-01-06 18:14 ` [PATCH 2/2] drm/msm/gpu: Cancel idle/boost work on suspend Rob Clark

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).