[PATCH v2 2/3] imx-drm: parallel-display: Fix drm_panel support

Markus Pargmann mpa at pengutronix.de
Mon Nov 3 06:54:47 PST 2014


From: Philipp Zabel <philipp.zabel at gmail.com>

Call drm_panel_enable/disable in reaction to encoder_commit
and encoder_disable callbacks.

Signed-off-by: Philipp Zabel <p.zabel at pengutronix.de>
Signed-off-by: Markus Pargmann <mpa at pengutronix.de>
---
 drivers/staging/imx-drm/parallel-display.c | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/drivers/staging/imx-drm/parallel-display.c b/drivers/staging/imx-drm/parallel-display.c
index b2719c4a0561..0992bbf01adc 100644
--- a/drivers/staging/imx-drm/parallel-display.c
+++ b/drivers/staging/imx-drm/parallel-display.c
@@ -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 = {
-- 
2.1.1




More information about the linux-arm-kernel mailing list