diff options
author | Leonard Crestez <leonard.crestez@nxp.com> | 2018-09-17 16:42:13 +0300 |
---|---|---|
committer | Robert Chiras <robert.chiras@nxp.com> | 2018-11-08 15:07:03 +0200 |
commit | 37526cc27b92306f6409de6b6b76f58531da8b4e (patch) | |
tree | 217ac3e050dc939c98aac0a71949168bb79d4211 /drivers/gpu | |
parent | f83ab92705122edc942c162351154de93d2bdcf7 (diff) |
MLK-20181-3: drm/mxsfb: Add pm_runtime calls to pipe_enable/disable
Adding lcdif nodes to a power domain currently results in
black/corrupted screens or hangs because power is not correctly enabled
when required.
Ensure power is on when display is active by adding
pm_runtime_get/put_sync to mxsfb_pipe_enable/disable.
Signed-off-by: Leonard Crestez <leonard.crestez@nxp.com>
Reviewed-by: Stefan Agner <stefan@agner.ch>
Reviewed-by: Sean Paul <seanpaul@chromium.org>
Signed-off-by: Stefan Agner <stefan@agner.ch>
Link: https://patchwork.freedesktop.org/patch/msgid/ee88148399c63494cda4129b05444b0ac331b7a7.1537191359.git.leonard.crestez@nxp.com
Diffstat (limited to 'drivers/gpu')
-rw-r--r-- | drivers/gpu/drm/mxsfb/mxsfb_drv.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/gpu/drm/mxsfb/mxsfb_drv.c b/drivers/gpu/drm/mxsfb/mxsfb_drv.c index ee450e7d84e3..46df81b1b3a9 100644 --- a/drivers/gpu/drm/mxsfb/mxsfb_drv.c +++ b/drivers/gpu/drm/mxsfb/mxsfb_drv.c @@ -191,16 +191,17 @@ static void mxsfb_pipe_enable(struct drm_simple_display_pipe *pipe, drm_crtc_vblank_on(&mxsfb->pipe.crtc); + pm_runtime_get_sync(drm->dev); drm_panel_prepare(mxsfb->panel); mxsfb_crtc_enable(mxsfb); drm_panel_enable(mxsfb->panel); - pm_runtime_get_sync(mxsfb->dev); } static void mxsfb_pipe_disable(struct drm_simple_display_pipe *pipe) { struct mxsfb_drm_private *mxsfb = drm_pipe_to_mxsfb_drm_private(pipe); struct drm_crtc *crtc = &pipe->crtc; + struct drm_device *drm = pipe->plane.dev; spin_lock_irq(&crtc->dev->event_lock); if (crtc->state->event) { @@ -212,7 +213,7 @@ static void mxsfb_pipe_disable(struct drm_simple_display_pipe *pipe) drm_panel_disable(mxsfb->panel); mxsfb_crtc_disable(mxsfb); drm_panel_unprepare(mxsfb->panel); - pm_runtime_put_sync(mxsfb->dev); + pm_runtime_put_sync(drm->dev); if (mxsfb->connector != &mxsfb->panel_connector) mxsfb->connector = NULL; |