From: Maxime Ripard Date: Fri, 16 Feb 2018 14:10:25 +0100 Subject: [U-Boot] [PATCH] sunxi: video: lcdc: fix HSYNC and VSYNC polarity In-Reply-To: <1518716453-120273-1-git-send-email-giulio.benetti@micronovasrl.com> References: <1518716453-120273-1-git-send-email-giulio.benetti@micronovasrl.com> Message-ID: <20180216131025.shmdl45tnyoextig@flea.lan> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Hi, On Thu, Feb 15, 2018 at 06:40:53PM +0100, Giulio Benetti wrote: > Differently from other Lcd signals, HSYNC and VSYNC signals > result inverted if their bits are cleared to 0. > > Invert their settings of IO_POL register. > > Signed-off-by: Giulio Benetti > --- > drivers/video/sunxi/lcdc.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/drivers/video/sunxi/lcdc.c b/drivers/video/sunxi/lcdc.c > index 4cb86fb..007057c 100644 > --- a/drivers/video/sunxi/lcdc.c > +++ b/drivers/video/sunxi/lcdc.c > @@ -132,9 +132,9 @@ void lcdc_tcon0_mode_set(struct sunxi_lcdc_reg * const lcdc, > } > > val = SUNXI_LCDC_TCON0_IO_POL_DCLK_PHASE(dclk_phase); > - if (mode->flags & DISPLAY_FLAGS_HSYNC_LOW) > + if (mode->flags & DISPLAY_FLAGS_HSYNC_HIGH) > val |= SUNXI_LCDC_TCON_HSYNC_MASK; > - if (mode->flags & DISPLAY_FLAGS_VSYNC_LOW) > + if (mode->flags & DISPLAY_FLAGS_VSYNC_HIGH) > val |= SUNXI_LCDC_TCON_VSYNC_MASK; > As we discussed earlier, I'm really not sure this is worth it. This is going to break all the boards out there that store the modeline in the environment. And we should fix all the defconfigs (but that's the easy part). Anatolij, any suggestion? Thanks! Maxime -- Maxime Ripard, Bootlin (formerly Free Electrons) Embedded Linux and Kernel engineering http://bootlin.com -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 833 bytes Desc: not available URL: