From: Jonathan Liu Date: Tue, 30 Aug 2016 06:55:00 +0000 (+1000) Subject: drm/sun4i: rgb: add missing calls to drm_panel_{prepare,unprepare} X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=4b30950252265140139ce441fd7d8743d1d6052e;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git 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 Signed-off-by: Maxime Ripard --- 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) 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); + } if (!IS_ERR(encoder->bridge)) drm_bridge_enable(encoder->bridge); @@ -173,8 +175,10 @@ static void sun4i_rgb_encoder_disable(struct drm_encoder *encoder) if (!IS_ERR(encoder->bridge)) drm_bridge_disable(encoder->bridge); - if (!IS_ERR(tcon->panel)) + if (!IS_ERR(tcon->panel)) { drm_panel_disable(tcon->panel); + drm_panel_unprepare(tcon->panel); + } } static void sun4i_rgb_encoder_mode_set(struct drm_encoder *encoder,