diff options
author | james qian wang (Arm Technology China) <james.qian.wang@arm.com> | 2019-12-12 10:48:13 +0300 |
---|---|---|
committer | james qian wang (Arm Technology China) <james.qian.wang@arm.com> | 2019-12-27 08:45:44 +0300 |
commit | efb4650885187425f1da96460e5d2a84650f861a (patch) | |
tree | 2e9c7a28e199a60c6e39cb59733e9358179461da /drivers/gpu/drm/arm/display/komeda/komeda_crtc.c | |
parent | 8f902dbd6ed2397ac16ab7f7f67e66f5ff1f8bba (diff) | |
download | linux-efb4650885187425f1da96460e5d2a84650f861a.tar.xz |
drm/komeda: Add runtime_pm support
- Add pm_runtime_get/put to crtc_enable/disable along with the real
display usage
- Add runtime_get/put to register_show, since register_show() will
access register, need to wakeup HW.
- For the case that PM is not enabled or configured, manually wakeup HW
Signed-off-by: james qian wang (Arm Technology China) <james.qian.wang@arm.com>
Reviewed-by: Mihail Atanassov <mihail.atanassov@arm.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20191212074756.14678-1-james.qian.wang@arm.com
Diffstat (limited to 'drivers/gpu/drm/arm/display/komeda/komeda_crtc.c')
-rw-r--r-- | drivers/gpu/drm/arm/display/komeda/komeda_crtc.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/gpu/drm/arm/display/komeda/komeda_crtc.c b/drivers/gpu/drm/arm/display/komeda/komeda_crtc.c index 1c452ea75999..56bd938961ee 100644 --- a/drivers/gpu/drm/arm/display/komeda/komeda_crtc.c +++ b/drivers/gpu/drm/arm/display/komeda/komeda_crtc.c @@ -5,6 +5,7 @@ * */ #include <linux/clk.h> +#include <linux/pm_runtime.h> #include <linux/spinlock.h> #include <drm/drm_atomic.h> @@ -274,6 +275,7 @@ static void komeda_crtc_atomic_enable(struct drm_crtc *crtc, struct drm_crtc_state *old) { + pm_runtime_get_sync(crtc->dev->dev); komeda_crtc_prepare(to_kcrtc(crtc)); drm_crtc_vblank_on(crtc); WARN_ON(drm_crtc_vblank_get(crtc)); @@ -372,6 +374,7 @@ komeda_crtc_atomic_disable(struct drm_crtc *crtc, drm_crtc_vblank_put(crtc); drm_crtc_vblank_off(crtc); komeda_crtc_unprepare(kcrtc); + pm_runtime_put(crtc->dev->dev); } static void |