mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] drm/sun4i: fix HSYNC and VSYNC polarity
@ 2018-02-15 17:54 Giulio Benetti
  2018-02-16 20:18 ` Maxime Ripard
  2018-12-06  7:29 ` Jonathan Liu
  0 siblings, 2 replies; 12+ messages in thread
From: Giulio Benetti @ 2018-02-15 17:54 UTC (permalink / raw)
  To: Maxime Ripard
  Cc: Chen-Yu Tsai, dri-devel, linux-arm-kernel, linux-kernel, Giulio Benetti

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 <giulio.benetti@micronovasrl.com>
---
 drivers/gpu/drm/sun4i/sun4i_tcon.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/gpu/drm/sun4i/sun4i_tcon.c b/drivers/gpu/drm/sun4i/sun4i_tcon.c
index 3c15cf2..aaf911a 100644
--- a/drivers/gpu/drm/sun4i/sun4i_tcon.c
+++ b/drivers/gpu/drm/sun4i/sun4i_tcon.c
@@ -389,10 +389,10 @@ static void sun4i_tcon0_mode_set_rgb(struct sun4i_tcon *tcon,
 		     SUN4I_TCON0_BASIC3_H_SYNC(hsync));
 
 	/* Setup the polarity of the various signals */
-	if (!(mode->flags & DRM_MODE_FLAG_PHSYNC))
+	if (mode->flags & DRM_MODE_FLAG_PHSYNC)
 		val |= SUN4I_TCON0_IO_POL_HSYNC_POSITIVE;
 
-	if (!(mode->flags & DRM_MODE_FLAG_PVSYNC))
+	if (mode->flags & DRM_MODE_FLAG_PVSYNC)
 		val |= SUN4I_TCON0_IO_POL_VSYNC_POSITIVE;
 
 	regmap_update_bits(tcon->regs, SUN4I_TCON0_IO_POL_REG,
-- 
2.7.4

^ permalink raw reply	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2018-12-13 12:32 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-02-15 17:54 [PATCH] drm/sun4i: fix HSYNC and VSYNC polarity Giulio Benetti
2018-02-16 20:18 ` Maxime Ripard
2018-12-06  7:29 ` Jonathan Liu
2018-12-06 11:00   ` Giulio Benetti
2018-12-11 10:49     ` Jonathan Liu
2018-12-11 17:20       ` Giulio Benetti
2018-12-11 17:39         ` Giulio Benetti
2018-12-13  2:55           ` Jonathan Liu
2018-12-13 11:42             ` Giulio Benetti
2018-12-13  3:08         ` Jonathan Liu
2018-12-13 11:58           ` Giulio Benetti
2018-12-13 12:32             ` Giulio Benetti

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®