From 2ccfac8bf576b9b76c6a57f15ec8299c43382c11 Mon Sep 17 00:00:00 2001 From: Max Krummenacher Date: Mon, 10 Feb 2014 11:05:26 +0100 Subject: apalis_imx6: video dac oe polarity hack Apply the hack only if on IPU#1 DI0 --- drivers/video/mxc/mxc_ipuv3_fb.c | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/drivers/video/mxc/mxc_ipuv3_fb.c b/drivers/video/mxc/mxc_ipuv3_fb.c index 5f2b1bbedff7..d7c48dfd145b 100644 --- a/drivers/video/mxc/mxc_ipuv3_fb.c +++ b/drivers/video/mxc/mxc_ipuv3_fb.c @@ -589,14 +589,16 @@ static int mxcfb_set_par(struct fb_info *fbi) sig_cfg.clk_pol = true; if (fbi->var.sync & FB_SYNC_DATA_INVERT) sig_cfg.data_pol = true; - if ( + if (!(fbi->var.sync & FB_SYNC_OE_LOW_ACT)) + sig_cfg.enable_pol = true; +#ifdef CONFIG_MACH_APALIS_IMX6 /* Hack: The home-brew resistor video DAC on Apalis iMX6 uses DI0_PIN15 as - output enable but with reversed polarity. */ -#ifndef CONFIG_MACH_APALIS_IMX6 - ! + output enable but with reversed polarity. + if we're on IPU1, DI0 force reversed polarity */ + if ((mxc_fbi->ipu_id)==1 && (mxc_fbi->ipu_di)==0) { + sig_cfg.enable_pol = false; + } #endif - (fbi->var.sync & FB_SYNC_OE_LOW_ACT)) - sig_cfg.enable_pol = true; if (fbi->var.sync & FB_SYNC_CLK_IDLE_EN) sig_cfg.clkidle_en = true; -- cgit v1.2.3