提交 4b309502 编写于 作者: J Jonathan Liu 提交者: Maxime Ripard

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: NJonathan Liu <net147@gmail.com>
Signed-off-by: NMaxime Ripard <maxime.ripard@free-electrons.com>
上级 af346f55
...@@ -151,8 +151,10 @@ static void sun4i_rgb_encoder_enable(struct drm_encoder *encoder) ...@@ -151,8 +151,10 @@ static void sun4i_rgb_encoder_enable(struct drm_encoder *encoder)
DRM_DEBUG_DRIVER("Enabling RGB output\n"); DRM_DEBUG_DRIVER("Enabling RGB output\n");
if (!IS_ERR(tcon->panel)) if (!IS_ERR(tcon->panel)) {
drm_panel_prepare(tcon->panel);
drm_panel_enable(tcon->panel); drm_panel_enable(tcon->panel);
}
if (!IS_ERR(encoder->bridge)) if (!IS_ERR(encoder->bridge))
drm_bridge_enable(encoder->bridge); drm_bridge_enable(encoder->bridge);
...@@ -173,8 +175,10 @@ static void sun4i_rgb_encoder_disable(struct drm_encoder *encoder) ...@@ -173,8 +175,10 @@ static void sun4i_rgb_encoder_disable(struct drm_encoder *encoder)
if (!IS_ERR(encoder->bridge)) if (!IS_ERR(encoder->bridge))
drm_bridge_disable(encoder->bridge); drm_bridge_disable(encoder->bridge);
if (!IS_ERR(tcon->panel)) if (!IS_ERR(tcon->panel)) {
drm_panel_disable(tcon->panel); drm_panel_disable(tcon->panel);
drm_panel_unprepare(tcon->panel);
}
} }
static void sun4i_rgb_encoder_mode_set(struct drm_encoder *encoder, static void sun4i_rgb_encoder_mode_set(struct drm_encoder *encoder,
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册