|
@@ -152,15 +152,16 @@ 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_prepare(tcon->panel);
|
|
- drm_panel_enable(tcon->panel);
|
|
|
|
- }
|
|
|
|
|
|
|
|
/* encoder->bridge can be NULL; drm_bridge_enable checks for it */
|
|
/* encoder->bridge can be NULL; drm_bridge_enable checks for it */
|
|
drm_bridge_enable(encoder->bridge);
|
|
drm_bridge_enable(encoder->bridge);
|
|
|
|
|
|
sun4i_tcon_channel_enable(tcon, 0);
|
|
sun4i_tcon_channel_enable(tcon, 0);
|
|
|
|
+
|
|
|
|
+ if (!IS_ERR(tcon->panel))
|
|
|
|
+ drm_panel_enable(tcon->panel);
|
|
}
|
|
}
|
|
|
|
|
|
static void sun4i_rgb_encoder_disable(struct drm_encoder *encoder)
|
|
static void sun4i_rgb_encoder_disable(struct drm_encoder *encoder)
|
|
@@ -171,15 +172,16 @@ static void sun4i_rgb_encoder_disable(struct drm_encoder *encoder)
|
|
|
|
|
|
DRM_DEBUG_DRIVER("Disabling RGB output\n");
|
|
DRM_DEBUG_DRIVER("Disabling RGB output\n");
|
|
|
|
|
|
|
|
+ if (!IS_ERR(tcon->panel))
|
|
|
|
+ drm_panel_disable(tcon->panel);
|
|
|
|
+
|
|
sun4i_tcon_channel_disable(tcon, 0);
|
|
sun4i_tcon_channel_disable(tcon, 0);
|
|
|
|
|
|
/* encoder->bridge can be NULL; drm_bridge_disable checks for it */
|
|
/* encoder->bridge can be NULL; drm_bridge_disable checks for it */
|
|
drm_bridge_disable(encoder->bridge);
|
|
drm_bridge_disable(encoder->bridge);
|
|
|
|
|
|
- if (!IS_ERR(tcon->panel)) {
|
|
|
|
- drm_panel_disable(tcon->panel);
|
|
|
|
|
|
+ if (!IS_ERR(tcon->panel))
|
|
drm_panel_unprepare(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,
|