aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJonathan Liu <net147@gmail.com>2016-08-30 02:55:00 -0400
committerMaxime Ripard <maxime.ripard@free-electrons.com>2016-08-30 08:52:21 -0400
commit4b30950252265140139ce441fd7d8743d1d6052e (patch)
tree75beed94e2695a060f1c68b937d420b79dfe186b
parentaf346f5570f208dcfb319f1214fcf8ca310c6fdd (diff)
drm/sun4i: rgb: add missing calls to drm_panel_{prepare,unprepare}
If the enable-gpios property of a simple panel in device tree is set, the GPIO is not toggled on/off because of missing calls to drm_panel_prepare and drm_panel_unprepare. Signed-off-by: Jonathan Liu <net147@gmail.com> Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>
-rw-r--r--drivers/gpu/drm/sun4i/sun4i_rgb.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/drivers/gpu/drm/sun4i/sun4i_rgb.c b/drivers/gpu/drm/sun4i/sun4i_rgb.c
index d4e52522ec53..c07697902ab1 100644
--- a/drivers/gpu/drm/sun4i/sun4i_rgb.c
+++ b/drivers/gpu/drm/sun4i/sun4i_rgb.c
@@ -151,8 +151,10 @@ static void sun4i_rgb_encoder_enable(struct drm_encoder *encoder)
151 151
152 DRM_DEBUG_DRIVER("Enabling RGB output\n"); 152 DRM_DEBUG_DRIVER("Enabling RGB output\n");
153 153
154 if (!IS_ERR(tcon->panel)) 154 if (!IS_ERR(tcon->panel)) {
155 drm_panel_prepare(tcon->panel);
155 drm_panel_enable(tcon->panel); 156 drm_panel_enable(tcon->panel);
157 }
156 158
157 if (!IS_ERR(encoder->bridge)) 159 if (!IS_ERR(encoder->bridge))
158 drm_bridge_enable(encoder->bridge); 160 drm_bridge_enable(encoder->bridge);
@@ -173,8 +175,10 @@ static void sun4i_rgb_encoder_disable(struct drm_encoder *encoder)
173 if (!IS_ERR(encoder->bridge)) 175 if (!IS_ERR(encoder->bridge))
174 drm_bridge_disable(encoder->bridge); 176 drm_bridge_disable(encoder->bridge);
175 177
176 if (!IS_ERR(tcon->panel)) 178 if (!IS_ERR(tcon->panel)) {
177 drm_panel_disable(tcon->panel); 179 drm_panel_disable(tcon->panel);
180 drm_panel_unprepare(tcon->panel);
181 }
178} 182}
179 183
180static void sun4i_rgb_encoder_mode_set(struct drm_encoder *encoder, 184static void sun4i_rgb_encoder_mode_set(struct drm_encoder *encoder,