diff options
author | Leonard Crestez <leonard.crestez@nxp.com> | 2018-09-17 09:42:13 -0400 |
---|---|---|
committer | Stefan Agner <stefan@agner.ch> | 2018-09-26 16:07:40 -0400 |
commit | 4201f4e8484509499a40feb9fd6a6642f453f61e (patch) | |
tree | 90aa701ce4524c091b6ac331c3d2b3a1b8337358 | |
parent | 2dc3620eac2df1545bc4a4b9110dcc7961c24a50 (diff) |
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
-rw-r--r-- | drivers/gpu/drm/mxsfb/mxsfb_drv.c | 4 |
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, | |||
103 | struct drm_plane_state *plane_state) | 103 | struct drm_plane_state *plane_state) |
104 | { | 104 | { |
105 | struct mxsfb_drm_private *mxsfb = drm_pipe_to_mxsfb_drm_private(pipe); | 105 | struct mxsfb_drm_private *mxsfb = drm_pipe_to_mxsfb_drm_private(pipe); |
106 | struct drm_device *drm = pipe->plane.dev; | ||
106 | 107 | ||
108 | pm_runtime_get_sync(drm->dev); | ||
107 | drm_panel_prepare(mxsfb->panel); | 109 | drm_panel_prepare(mxsfb->panel); |
108 | mxsfb_crtc_enable(mxsfb); | 110 | mxsfb_crtc_enable(mxsfb); |
109 | drm_panel_enable(mxsfb->panel); | 111 | drm_panel_enable(mxsfb->panel); |
@@ -112,10 +114,12 @@ static void mxsfb_pipe_enable(struct drm_simple_display_pipe *pipe, | |||
112 | static void mxsfb_pipe_disable(struct drm_simple_display_pipe *pipe) | 114 | static void mxsfb_pipe_disable(struct drm_simple_display_pipe *pipe) |
113 | { | 115 | { |
114 | struct mxsfb_drm_private *mxsfb = drm_pipe_to_mxsfb_drm_private(pipe); | 116 | struct mxsfb_drm_private *mxsfb = drm_pipe_to_mxsfb_drm_private(pipe); |
117 | struct drm_device *drm = pipe->plane.dev; | ||
115 | 118 | ||
116 | drm_panel_disable(mxsfb->panel); | 119 | drm_panel_disable(mxsfb->panel); |
117 | mxsfb_crtc_disable(mxsfb); | 120 | mxsfb_crtc_disable(mxsfb); |
118 | drm_panel_unprepare(mxsfb->panel); | 121 | drm_panel_unprepare(mxsfb->panel); |
122 | pm_runtime_put_sync(drm->dev); | ||
119 | } | 123 | } |
120 | 124 | ||
121 | static void mxsfb_pipe_update(struct drm_simple_display_pipe *pipe, | 125 | static void mxsfb_pipe_update(struct drm_simple_display_pipe *pipe, |