diff options
author | Yannick Fertré <yannick.fertre@st.com> | 2019-03-21 11:15:20 +0300 |
---|---|---|
committer | Benjamin Gaignard <benjamin.gaignard@linaro.org> | 2019-04-01 12:00:18 +0300 |
commit | df61c776657fa5986267199fdf271bf0fca32d69 (patch) | |
tree | 8ceb1a6c83cf4621659137c6d55eea5ab7b2828b /drivers/gpu/drm/stm/ltdc.c | |
parent | 1861a1ffbc08ad53e1f07af8d754514298c22eb4 (diff) | |
download | linux-df61c776657fa5986267199fdf271bf0fca32d69.tar.xz |
drm/stm: add sleep power management
Implements system sleep power management ops.
Signed-off-by: Yannick Fertré <yannick.fertre@st.com>
Acked-by: Philippe Cornu <philippe.cornu@st.com>
Signed-off-by: Benjamin Gaignard <benjamin.gaignard@linaro.org>
Link: https://patchwork.freedesktop.org/patch/msgid/1553156120-13851-1-git-send-email-yannick.fertre@st.com
Diffstat (limited to 'drivers/gpu/drm/stm/ltdc.c')
-rw-r--r-- | drivers/gpu/drm/stm/ltdc.c | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/drivers/gpu/drm/stm/ltdc.c b/drivers/gpu/drm/stm/ltdc.c index b1741a9d5be2..32fd6a3b37fb 100644 --- a/drivers/gpu/drm/stm/ltdc.c +++ b/drivers/gpu/drm/stm/ltdc.c @@ -1062,6 +1062,30 @@ static int ltdc_get_caps(struct drm_device *ddev) return 0; } +void ltdc_suspend(struct drm_device *ddev) +{ + struct ltdc_device *ldev = ddev->dev_private; + + DRM_DEBUG_DRIVER("\n"); + clk_disable_unprepare(ldev->pixel_clk); +} + +int ltdc_resume(struct drm_device *ddev) +{ + struct ltdc_device *ldev = ddev->dev_private; + int ret; + + DRM_DEBUG_DRIVER("\n"); + + ret = clk_prepare_enable(ldev->pixel_clk); + if (ret) { + DRM_ERROR("failed to enable pixel clock (%d)\n", ret); + return ret; + } + + return 0; +} + int ltdc_load(struct drm_device *ddev) { struct platform_device *pdev = to_platform_device(ddev->dev); |