summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/lima/Kconfig
diff options
context:
space:
mode:
authorMartin Blumenstingl <martin.blumenstingl@googlemail.com>2020-03-19 21:34:27 +0100
committerQiang Yu <yuq825@gmail.com>2020-03-28 16:29:46 +0800
commit1996970773a323533e1cc1b6b97f00a95d675f32 (patch)
tree15843b481458a6369712db5b6351e45f72ebfde5 /drivers/gpu/drm/lima/Kconfig
parent6bb0942e8f46863a745489cce27efe5be2a3885e (diff)
downloadlinux-stable-1996970773a323533e1cc1b6b97f00a95d675f32.tar.gz
linux-stable-1996970773a323533e1cc1b6b97f00a95d675f32.tar.bz2
linux-stable-1996970773a323533e1cc1b6b97f00a95d675f32.zip
drm/lima: Add optional devfreq and cooling device support
Most platforms with a Mali-400 or Mali-450 GPU also have support for changing the GPU clock frequency. Add devfreq support so the GPU clock rate is updated based on the actual GPU usage when the "operating-points-v2" property is present in the board.dts. The actual devfreq code is taken from panfrost_devfreq.c and modified so it matches what the lima hardware needs: - a call to dev_pm_opp_set_clkname() during initialization because there are two clocks on Mali-4x0 IPs. "core" is the one that actually clocks the GPU so we need to control it using devfreq. - locking when reading or writing the devfreq statistics because (unlike than panfrost) we have multiple PP and GP IRQs which may finish jobs concurrently. Signed-off-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com> Signed-off-by: Qiang Yu <yuq825@gmail.com> Link: https://patchwork.freedesktop.org/patch/msgid/20200319203427.2259891-3-martin.blumenstingl@googlemail.com
Diffstat (limited to 'drivers/gpu/drm/lima/Kconfig')
-rw-r--r--drivers/gpu/drm/lima/Kconfig2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/gpu/drm/lima/Kconfig b/drivers/gpu/drm/lima/Kconfig
index d589f09d04d9..fa1d4f5df31e 100644
--- a/drivers/gpu/drm/lima/Kconfig
+++ b/drivers/gpu/drm/lima/Kconfig
@@ -10,5 +10,7 @@ config DRM_LIMA
depends on OF
select DRM_SCHED
select DRM_GEM_SHMEM_HELPER
+ select PM_DEVFREQ
+ select DEVFREQ_GOV_SIMPLE_ONDEMAND
help
DRM driver for ARM Mali 400/450 GPUs.