imx-drm: parallel-display: Fix drm_panel support
authorPhilipp Zabel <philipp.zabel@gmail.com>
Mon, 3 Nov 2014 14:54:47 +0000 (15:54 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 4 Nov 2014 00:19:58 +0000 (16:19 -0800)
Call drm_panel_enable/disable in reaction to encoder_commit
and encoder_disable callbacks.

Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
Signed-off-by: Markus Pargmann <mpa@pengutronix.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/imx-drm/parallel-display.c

index 015a454..ac89a18 100644 (file)
@@ -128,6 +128,10 @@ static void imx_pd_encoder_prepare(struct drm_encoder *encoder)
 
 static void imx_pd_encoder_commit(struct drm_encoder *encoder)
 {
+       struct imx_parallel_display *imxpd = enc_to_imxpd(encoder);
+
+       drm_panel_prepare(imxpd->panel);
+       drm_panel_enable(imxpd->panel);
 }
 
 static void imx_pd_encoder_mode_set(struct drm_encoder *encoder,
@@ -138,6 +142,10 @@ static void imx_pd_encoder_mode_set(struct drm_encoder *encoder,
 
 static void imx_pd_encoder_disable(struct drm_encoder *encoder)
 {
+       struct imx_parallel_display *imxpd = enc_to_imxpd(encoder);
+
+       drm_panel_disable(imxpd->panel);
+       drm_panel_unprepare(imxpd->panel);
 }
 
 static struct drm_connector_funcs imx_pd_connector_funcs = {