summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/mxsfb
diff options
context:
space:
mode:
authorLeonard Crestez2018-09-17 15:42:13 +0200
committerStefan Agner2018-09-26 22:07:40 +0200
commit4201f4e8484509499a40feb9fd6a6642f453f61e (patch)
tree90aa701ce4524c091b6ac331c3d2b3a1b8337358 /drivers/gpu/drm/mxsfb
parentdrm/mxsfb: Fix initial corrupt frame when activating display (diff)
downloadkernel-qcow2-linux-4201f4e8484509499a40feb9fd6a6642f453f61e.tar.gz
kernel-qcow2-linux-4201f4e8484509499a40feb9fd6a6642f453f61e.tar.xz
kernel-qcow2-linux-4201f4e8484509499a40feb9fd6a6642f453f61e.zip
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/drm/mxsfb')
-rw-r--r--drivers/gpu/drm/mxsfb/mxsfb_drv.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/gpu/drm/mxsfb/mxsfb_drv.c b/drivers/gpu/drm/mxsfb/mxsfb_drv.c
index ffe5137ccaf8..68d79f5dc0d3 100644
--- a/drivers/gpu/drm/mxsfb/mxsfb_drv.c
+++ b/drivers/gpu/drm/mxsfb/mxsfb_drv.c
@@ -103,7 +103,9 @@ static void mxsfb_pipe_enable(struct drm_simple_display_pipe *pipe,
struct drm_plane_state *plane_state)
{
struct mxsfb_drm_private *mxsfb = drm_pipe_to_mxsfb_drm_private(pipe);
+ struct drm_device *drm = pipe->plane.dev;
+ pm_runtime_get_sync(drm->dev);
drm_panel_prepare(mxsfb->panel);
mxsfb_crtc_enable(mxsfb);
drm_panel_enable(mxsfb->panel);
@@ -112,10 +114,12 @@ static void mxsfb_pipe_enable(struct drm_simple_display_pipe *pipe,
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_device *drm = pipe->plane.dev;
drm_panel_disable(mxsfb->panel);
mxsfb_crtc_disable(mxsfb);
drm_panel_unprepare(mxsfb->panel);
+ pm_runtime_put_sync(drm->dev);
}
static void mxsfb_pipe_update(struct drm_simple_display_pipe *pipe,