From mboxrd@z Thu Jan 1 00:00:00 1970 From: Vasily Khoruzhick Date: Sat, 28 Apr 2018 14:57:28 -0700 Subject: [U-Boot] [PATCH 1/2] Revert "sunxi: video: HDMI: split VSYNC and HSYNC polarity settings" In-Reply-To: <20180428215729.22048-1-anarsoul@gmail.com> References: <20180428215729.22048-1-anarsoul@gmail.com> Message-ID: <20180428215729.22048-2-anarsoul@gmail.com> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de This reverts commit 64089178219371a512ddca8016d78bfdbe84565d. Signed-off-by: Vasily Khoruzhick --- drivers/video/sunxi/sunxi_dw_hdmi.c | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/drivers/video/sunxi/sunxi_dw_hdmi.c b/drivers/video/sunxi/sunxi_dw_hdmi.c index 4f01d1bded..33920a2b67 100644 --- a/drivers/video/sunxi/sunxi_dw_hdmi.c +++ b/drivers/video/sunxi/sunxi_dw_hdmi.c @@ -304,11 +304,15 @@ static int sunxi_dw_hdmi_enable(struct udevice *dev, int panel_bpp, sunxi_dw_hdmi_lcdc_init(priv->mux, edid, panel_bpp); - if (edid->flags & DISPLAY_FLAGS_HSYNC_LOW) - setbits_le32(&phy->pol, 0x200); - - if (edid->flags & DISPLAY_FLAGS_VSYNC_LOW) - setbits_le32(&phy->pol, 0x100); + /* + * Condition in original code is a bit weird. This is attempt + * to make it more reasonable and it works. It could be that + * bits and conditions are related and should be separated. + */ + if (!((edid->flags & DISPLAY_FLAGS_HSYNC_HIGH) && + (edid->flags & DISPLAY_FLAGS_VSYNC_HIGH))) { + setbits_le32(&phy->pol, 0x300); + } setbits_le32(&phy->ctrl, 0xf << 12); -- 2.17.0