linux/drivers/gpu/drm/msm
Jordan Crouse eadf79286a drm/msm: Check for powered down HW in the devfreq callbacks
Writing to the devfreq sysfs nodes while the GPU is powered down can
result in a system crash (on a5xx) or a nasty GMU error (on a6xx):

 $ /sys/class/devfreq/5000000.gpu# echo 500000000 > min_freq
  [  104.841625] platform 506a000.gmu: [drm:a6xx_gmu_set_oob]
	*ERROR* Timeout waiting for GMU OOB set GPU_DCVS: 0x0

Despite the fact that we carefully try to suspend the devfreq device when
the hardware is powered down there are lots of holes in the governors that
don't check for the suspend state and blindly call into the devfreq
callbacks that end up triggering hardware reads in the GPU driver.

Call pm_runtime_get_if_in_use() in the gpu_busy() and gpu_set_freq()
callbacks to skip the hardware access if it isn't active.

v3: Only check pm_runtime_get_if_in_use() for == 0 per Eric Anholt
v2: Use pm_runtime_get_if_in_use() per Eric Anholt

Cc: stable@vger.kernel.org
Reviewed-by: Eric Anholt <eric@anholt.net>
Signed-off-by: Jordan Crouse <jcrouse@codeaurora.org>
Signed-off-by: Rob Clark <robdclark@chromium.org>
2020-05-18 09:26:32 -07:00
..
adreno drm/msm: Check for powered down HW in the devfreq callbacks 2020-05-18 09:26:32 -07:00
disp drm/msm/dpu: update bandwidth threshold check 2020-05-18 09:26:32 -07:00
dsi Linux 5.6-rc5 2020-03-11 07:27:21 +10:00
edp Merge tag 'drm-msm-next-2020-03-22' of https://gitlab.freedesktop.org/drm/msm into drm-next 2020-03-31 16:34:55 +10:00
hdmi Merge tag 'drm-msm-next-2020-03-22' of https://gitlab.freedesktop.org/drm/msm into drm-next 2020-03-31 16:34:55 +10:00
Kconfig
Makefile drm/msm/dpu: add support for color processing blocks in dpu driver 2020-05-18 09:26:32 -07:00
msm_atomic.c
msm_atomic_trace.h
msm_atomic_tracepoints.c
msm_debugfs.c
msm_debugfs.h
msm_drv.c drm/msm: Add syncobj support. 2020-05-18 09:26:32 -07:00
msm_drv.h drm/msm/dpu: add support for color processing blocks in dpu driver 2020-05-18 09:26:32 -07:00
msm_fb.c
msm_fbdev.c drm: Remove drm_fb_helper add, add all and remove connector calls 2020-03-06 14:19:58 +01:00
msm_fence.c
msm_fence.h
msm_gem.c
msm_gem.h drm/msm: devcoredump should dump MSM_SUBMIT_BO_DUMP buffers 2020-03-19 12:18:44 -07:00
msm_gem_prime.c
msm_gem_shrinker.c
msm_gem_submit.c drm/msm: Add syncobj support. 2020-05-18 09:26:32 -07:00
msm_gem_vma.c
msm_gpu.c drm/msm: devcoredump should dump MSM_SUBMIT_BO_DUMP buffers 2020-03-19 12:18:44 -07:00
msm_gpu.h
msm_gpu_trace.h
msm_gpu_tracepoints.c
msm_gpummu.c
msm_iommu.c
msm_kms.h
msm_mmu.h
msm_perf.c
msm_rd.c drm/msm: Fix undefined "rd_full" link error 2020-05-18 09:26:32 -07:00
msm_ringbuffer.c
msm_ringbuffer.h
msm_submitqueue.c
NOTES