linux-fbdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/5] OMAPDSS: Fix writes to DISPC_POL_FREQ
@ 2014-05-09 12:32 Tomi Valkeinen
  2014-05-09 12:32 ` [PATCH 2/5] OMAPDSS: remove venc_panel.c Tomi Valkeinen
                   ` (3 more replies)
  0 siblings, 4 replies; 7+ messages in thread
From: Tomi Valkeinen @ 2014-05-09 12:32 UTC (permalink / raw)
  To: linux-fbdev, linux-omap; +Cc: Archit Taneja, Tomi Valkeinen

When omapdss writes to DISPC_POL_FREQ register, it always ORs the bits
with the current contents of the register, never clearing the old ones,
causing wrong signal polarity settings.

As we write all the bits in DISPC_POL_FREQ, we don't need to care about
the current contents of the register. So fix the issue by constructing
new register value from scratch.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
---
 drivers/video/fbdev/omap2/dss/dispc.c | 14 +++++++-------
 1 file changed, 7 insertions(+), 7 deletions(-)

diff --git a/drivers/video/fbdev/omap2/dss/dispc.c b/drivers/video/fbdev/omap2/dss/dispc.c
index f18397c33e8f..a22c64e26172 100644
--- a/drivers/video/fbdev/omap2/dss/dispc.c
+++ b/drivers/video/fbdev/omap2/dss/dispc.c
@@ -2945,13 +2945,13 @@ static void _dispc_mgr_set_lcd_timings(enum omap_channel channel, int hsw,
 		BUG();
 	}
 
-	l = dispc_read_reg(DISPC_POL_FREQ(channel));
-	l |= FLD_VAL(onoff, 17, 17);
-	l |= FLD_VAL(rf, 16, 16);
-	l |= FLD_VAL(de_level, 15, 15);
-	l |= FLD_VAL(ipc, 14, 14);
-	l |= FLD_VAL(hsync_level, 13, 13);
-	l |= FLD_VAL(vsync_level, 12, 12);
+	l = FLD_VAL(onoff, 17, 17) |
+		FLD_VAL(rf, 16, 16) |
+		FLD_VAL(de_level, 15, 15) |
+		FLD_VAL(ipc, 14, 14) |
+		FLD_VAL(hsync_level, 13, 13) |
+		FLD_VAL(vsync_level, 12, 12);
+
 	dispc_write_reg(DISPC_POL_FREQ(channel), l);
 }
 
-- 
1.9.1


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

end of thread, other threads:[~2014-05-12  6:30 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-05-09 12:32 [PATCH 1/5] OMAPDSS: Fix writes to DISPC_POL_FREQ Tomi Valkeinen
2014-05-09 12:32 ` [PATCH 2/5] OMAPDSS: remove venc_panel.c Tomi Valkeinen
2014-05-09 12:32 ` [PATCH 3/5] OMAPDSS: remove unused macros Tomi Valkeinen
2014-05-09 12:32 ` [PATCH 4/5] OMAPDSS: connector-hdmi: hpd support Tomi Valkeinen
2014-05-09 12:32 ` [PATCH 5/5] Doc/DT: hdmi-connector: add HPD GPIO documentation Tomi Valkeinen
     [not found]   ` <1399638727-23254-5-git-send-email-tomi.valkeinen-l0cyMroinI0@public.gmane.org>
2014-05-12  5:48     ` Archit Taneja
2014-05-12  6:30       ` Tomi Valkeinen

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).