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 drm/msm/gpu: add ocmem init/cleanup functions 2019-10-07 08:17:39 -07:00
Makefile drm/msm/dpu: add support for color processing blocks in dpu driver 2020-05-18 09:26:32 -07:00
msm_atomic_trace.h drm/msm: add atomic traces 2019-09-03 16:17:02 -07:00
msm_atomic_tracepoints.c drm/msm: add atomic traces 2019-09-03 16:17:02 -07:00
msm_atomic.c drm/msm: add atomic traces 2019-09-03 16:17:02 -07:00
msm_debugfs.c drm/msm: fix memleak on release 2019-11-13 15:34:15 -05:00
msm_debugfs.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 234 2019-06-19 17:09:07 +02:00
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 drm/msm: drop use of drmP.h 2019-09-03 16:16:57 -07:00
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 treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 234 2019-06-19 17:09:07 +02:00
msm_fence.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 234 2019-06-19 17:09:07 +02:00
msm_gem_prime.c drm/msm: drop use of drmP.h 2019-09-03 16:16:57 -07:00
msm_gem_shrinker.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 234 2019-06-19 17:09:07 +02:00
msm_gem_submit.c drm/msm: Add syncobj support. 2020-05-18 09:26:32 -07:00
msm_gem_vma.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 234 2019-06-19 17:09:07 +02:00
msm_gem.c drm/msm: Use the correct dma_sync calls harder 2019-09-04 10:05:05 -07:00
msm_gem.h drm/msm: devcoredump should dump MSM_SUBMIT_BO_DUMP buffers 2020-03-19 12:18:44 -07:00
msm_gpu_trace.h drm/msm: add atomic traces 2019-09-03 16:17:02 -07:00
msm_gpu_tracepoints.c drm/msm/gpu: Add trace events for tracking GPU submissions 2018-12-11 13:05:28 -05:00
msm_gpu.c drm/msm: devcoredump should dump MSM_SUBMIT_BO_DUMP buffers 2020-03-19 12:18:44 -07:00
msm_gpu.h drm/msm/gpu: add support for ocmem interconnect path 2020-01-02 14:20:42 -08:00
msm_gpummu.c drm/msm: Remove unused function arguments 2019-10-07 08:25:30 -07:00
msm_iommu.c drm/msm: Remove unused function arguments 2019-10-07 08:25:30 -07:00
msm_kms.h drm/msm/dpu: async commit support 2019-09-03 16:17:01 -07:00
msm_mmu.h drm/msm: Remove unused function arguments 2019-10-07 08:25:30 -07:00
msm_perf.c drm/msm: drop use of drmP.h 2019-09-03 16:16:57 -07:00
msm_rd.c drm/msm: Fix undefined "rd_full" link error 2020-05-18 09:26:32 -07:00
msm_ringbuffer.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 234 2019-06-19 17:09:07 +02:00
msm_ringbuffer.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 234 2019-06-19 17:09:07 +02:00
msm_submitqueue.c drm/msm: drop use of drmP.h 2019-09-03 16:16:57 -07:00
NOTES