linux-fbdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/5] OMAP: DSS: fixes for rc
@ 2011-04-15  8:11 Tomi Valkeinen
  2011-04-15  8:11 ` [PATCH 1/5] OMAP: DSS2: DSI: fix use_sys_clk & highfreq Tomi Valkeinen
                   ` (5 more replies)
  0 siblings, 6 replies; 7+ messages in thread
From: Tomi Valkeinen @ 2011-04-15  8:11 UTC (permalink / raw)
  To: linux-omap, linux-fbdev; +Cc: archit, Tomi Valkeinen

Some small fixes to OMAP DSS for the next rc.

I will send a pull request to Paul Mundt soon if there are no problems with the
patches.

Note that DSS doesn't still work for OMAP4. It needs a clock patch which has
been discussed on l-o, and Paul Walmsley will handle that patch.

 Tomi

Archit Taneja (1):
  OMAP: DSS2: Fix: Return correct lcd clock source for OMAP2/3

Tomi Valkeinen (4):
  OMAP: DSS2: DSI: fix use_sys_clk & highfreq
  OMAP: DSS2: DSI: fix dsi_dump_clocks()
  OMAP: DSS2: DSI: Fix DSI PLL power bug
  OMAP: DSS2: fix panel Kconfig dependencies

 drivers/video/omap2/displays/Kconfig   |    9 +++++----
 drivers/video/omap2/dss/dsi.c          |   14 +++++++++-----
 drivers/video/omap2/dss/dss.c          |   10 ++++++++--
 drivers/video/omap2/dss/dss_features.c |    2 +-
 drivers/video/omap2/dss/dss_features.h |    2 ++
 5 files changed, 25 insertions(+), 12 deletions(-)


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

* [PATCH 1/5] OMAP: DSS2: DSI: fix use_sys_clk & highfreq
  2011-04-15  8:11 [PATCH 0/5] OMAP: DSS: fixes for rc Tomi Valkeinen
@ 2011-04-15  8:11 ` Tomi Valkeinen
  2011-04-15  8:11 ` [PATCH 2/5] OMAP: DSS2: DSI: fix dsi_dump_clocks() Tomi Valkeinen
                   ` (4 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: Tomi Valkeinen @ 2011-04-15  8:11 UTC (permalink / raw)
  To: linux-omap, linux-fbdev; +Cc: archit, Tomi Valkeinen

use_sys_clk and highfreq fields in dsi.current_cinfo were never set.
Luckily they weren't used anywhere so it didn't cause any problems.

This patch fixes those fields and they are now set at the same time as
the rest of the fields.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
---
 drivers/video/omap2/dss/dsi.c |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)

diff --git a/drivers/video/omap2/dss/dsi.c b/drivers/video/omap2/dss/dsi.c
index 0a7f1a4..8604153 100644
--- a/drivers/video/omap2/dss/dsi.c
+++ b/drivers/video/omap2/dss/dsi.c
@@ -1276,6 +1276,9 @@ int dsi_pll_set_clock_div(struct dsi_clock_info *cinfo)
 
 	DSSDBGF();
 
+	dsi.current_cinfo.use_sys_clk = cinfo->use_sys_clk;
+	dsi.current_cinfo.highfreq = cinfo->highfreq;
+
 	dsi.current_cinfo.fint = cinfo->fint;
 	dsi.current_cinfo.clkin4ddr = cinfo->clkin4ddr;
 	dsi.current_cinfo.dsi_pll_hsdiv_dispc_clk -- 
1.7.1


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

* [PATCH 2/5] OMAP: DSS2: DSI: fix dsi_dump_clocks()
  2011-04-15  8:11 [PATCH 0/5] OMAP: DSS: fixes for rc Tomi Valkeinen
  2011-04-15  8:11 ` [PATCH 1/5] OMAP: DSS2: DSI: fix use_sys_clk & highfreq Tomi Valkeinen
@ 2011-04-15  8:11 ` Tomi Valkeinen
  2011-04-15  8:11 ` [PATCH 3/5] OMAP: DSS2: Fix: Return correct lcd clock source for OMAP2/3 Tomi Valkeinen
                   ` (3 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: Tomi Valkeinen @ 2011-04-15  8:11 UTC (permalink / raw)
  To: linux-omap, linux-fbdev; +Cc: archit, Tomi Valkeinen

On OMAP4, reading DSI_PLL_CONFIGURATION2 register requires the L3 clock
(CIO_CLK_ICG) to PLL. Currently dsi_dump_clocks() tries to read that
register without enabling the L3 clock, leading to crash if DSI is not
in use.

The status of the bit being read from DSI_PLL_CONFIGURATION2 is
available from dsi_clock_info->use_sys_clk, so we can avoid the whole
problem by just using that.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
---
 drivers/video/omap2/dss/dsi.c |    6 +-----
 1 files changed, 1 insertions(+), 5 deletions(-)

diff --git a/drivers/video/omap2/dss/dsi.c b/drivers/video/omap2/dss/dsi.c
index 8604153..1464ac4 100644
--- a/drivers/video/omap2/dss/dsi.c
+++ b/drivers/video/omap2/dss/dsi.c
@@ -1491,7 +1491,6 @@ void dsi_pll_uninit(void)
 
 void dsi_dump_clocks(struct seq_file *s)
 {
-	int clksel;
 	struct dsi_clock_info *cinfo = &dsi.current_cinfo;
 	enum dss_clk_source dispc_clk_src, dsi_clk_src;
 
@@ -1500,13 +1499,10 @@ void dsi_dump_clocks(struct seq_file *s)
 
 	enable_clocks(1);
 
-	clksel = REG_GET(DSI_PLL_CONFIGURATION2, 11, 11);
-
 	seq_printf(s,	"- DSI PLL -\n");
 
 	seq_printf(s,	"dsi pll source = %s\n",
-			clksel = 0 ?
-			"dss_sys_clk" : "pclkfree");
+			cinfo->use_sys_clk ? "dss_sys_clk" : "pclkfree");
 
 	seq_printf(s,	"Fint\t\t%-16luregn %u\n", cinfo->fint, cinfo->regn);
 
-- 
1.7.1


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

* [PATCH 3/5] OMAP: DSS2: Fix: Return correct lcd clock source for OMAP2/3
  2011-04-15  8:11 [PATCH 0/5] OMAP: DSS: fixes for rc Tomi Valkeinen
  2011-04-15  8:11 ` [PATCH 1/5] OMAP: DSS2: DSI: fix use_sys_clk & highfreq Tomi Valkeinen
  2011-04-15  8:11 ` [PATCH 2/5] OMAP: DSS2: DSI: fix dsi_dump_clocks() Tomi Valkeinen
@ 2011-04-15  8:11 ` Tomi Valkeinen
  2011-04-15  8:11 ` [PATCH 4/5] OMAP: DSS2: DSI: Fix DSI PLL power bug Tomi Valkeinen
                   ` (2 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: Tomi Valkeinen @ 2011-04-15  8:11 UTC (permalink / raw)
  To: linux-omap, linux-fbdev; +Cc: archit, Tomi Valkeinen

From: Archit Taneja <archit@ti.com>

dss.lcd_clk_source is set to the default value DSS_CLK_SRC_FCK at dss_init.
For OMAP2 and OMAP3, the dss.lcd_clk_source should always be the same as
dss.dispc_clk_source. The function dss_get_lcd_clk_source() always returns the
default value DSS_CLK_SRC_FCK for OMAP2/3. This leads to wrong clock dumps when
dispc_clk_source is not DSS_CLK_SRC_FCK.

Correct this function to always return dss.dispc_clk_source for OMAP2/3.

Signed-off-by: Archit Taneja <archit@ti.com>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
---
 drivers/video/omap2/dss/dss.c |   10 ++++++++--
 1 files changed, 8 insertions(+), 2 deletions(-)

diff --git a/drivers/video/omap2/dss/dss.c b/drivers/video/omap2/dss/dss.c
index 3f1fee6..c3b48a0 100644
--- a/drivers/video/omap2/dss/dss.c
+++ b/drivers/video/omap2/dss/dss.c
@@ -385,8 +385,14 @@ enum dss_clk_source dss_get_dsi_clk_source(void)
 
 enum dss_clk_source dss_get_lcd_clk_source(enum omap_channel channel)
 {
-	int ix = channel = OMAP_DSS_CHANNEL_LCD ? 0 : 1;
-	return dss.lcd_clk_source[ix];
+	if (dss_has_feature(FEAT_LCD_CLK_SRC)) {
+		int ix = channel = OMAP_DSS_CHANNEL_LCD ? 0 : 1;
+		return dss.lcd_clk_source[ix];
+	} else {
+		/* LCD_CLK source is the same as DISPC_FCLK source for
+		 * OMAP2 and OMAP3 */
+		return dss.dispc_clk_source;
+	}
 }
 
 /* calculate clock rates using dividers in cinfo */
-- 
1.7.1


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

* [PATCH 4/5] OMAP: DSS2: DSI: Fix DSI PLL power bug
  2011-04-15  8:11 [PATCH 0/5] OMAP: DSS: fixes for rc Tomi Valkeinen
                   ` (2 preceding siblings ...)
  2011-04-15  8:11 ` [PATCH 3/5] OMAP: DSS2: Fix: Return correct lcd clock source for OMAP2/3 Tomi Valkeinen
@ 2011-04-15  8:11 ` Tomi Valkeinen
  2011-04-15  8:11 ` [PATCH 5/5] OMAP: DSS2: fix panel Kconfig dependencies Tomi Valkeinen
  2011-04-15 17:32 ` [PATCH 0/5] OMAP: DSS: fixes for rc Steve Sakoman
  5 siblings, 0 replies; 7+ messages in thread
From: Tomi Valkeinen @ 2011-04-15  8:11 UTC (permalink / raw)
  To: linux-omap, linux-fbdev; +Cc: archit, Tomi Valkeinen

OMAP3630 has a HW bug causing DSI PLL power command POWER_ON_DIV (0x3)
to not work properly. The bug prevents us from enabling DSI PLL power
only to HS divider block.

This patch adds a dss feature for the bug and converts POWER_ON_DIV
requests to POWER_ON_ALL (0x2).

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
---
 drivers/video/omap2/dss/dsi.c          |    5 +++++
 drivers/video/omap2/dss/dss_features.c |    2 +-
 drivers/video/omap2/dss/dss_features.h |    2 ++
 3 files changed, 8 insertions(+), 1 deletions(-)

diff --git a/drivers/video/omap2/dss/dsi.c b/drivers/video/omap2/dss/dsi.c
index 1464ac4..cbd9ca4 100644
--- a/drivers/video/omap2/dss/dsi.c
+++ b/drivers/video/omap2/dss/dsi.c
@@ -1059,6 +1059,11 @@ static int dsi_pll_power(enum dsi_pll_power_state state)
 {
 	int t = 0;
 
+	/* DSI-PLL power command 0x3 is not working */
+	if (dss_has_feature(FEAT_DSI_PLL_PWR_BUG) &&
+			state = DSI_PLL_POWER_ON_DIV)
+		state = DSI_PLL_POWER_ON_ALL;
+
 	REG_FLD_MOD(DSI_CLK_CTRL, state, 31, 30);	/* PLL_PWR_CMD */
 
 	/* PLL_PWR_STATUS */
diff --git a/drivers/video/omap2/dss/dss_features.c b/drivers/video/omap2/dss/dss_features.c
index aa16222..8c50e18 100644
--- a/drivers/video/omap2/dss/dss_features.c
+++ b/drivers/video/omap2/dss/dss_features.c
@@ -271,7 +271,7 @@ static struct omap_dss_features omap3630_dss_features = {
 		FEAT_LCDENABLESIGNAL | FEAT_PCKFREEENABLE |
 		FEAT_PRE_MULT_ALPHA | FEAT_FUNCGATED |
 		FEAT_ROWREPEATENABLE | FEAT_LINEBUFFERSPLIT |
-		FEAT_RESIZECONF,
+		FEAT_RESIZECONF | FEAT_DSI_PLL_PWR_BUG,
 
 	.num_mgrs = 2,
 	.num_ovls = 3,
diff --git a/drivers/video/omap2/dss/dss_features.h b/drivers/video/omap2/dss/dss_features.h
index 12e9c4e..37922ce 100644
--- a/drivers/video/omap2/dss/dss_features.h
+++ b/drivers/video/omap2/dss/dss_features.h
@@ -40,6 +40,8 @@ enum dss_feat_id {
 	/* Independent core clk divider */
 	FEAT_CORE_CLK_DIV	= 1 << 11,
 	FEAT_LCD_CLK_SRC	= 1 << 12,
+	/* DSI-PLL power command 0x3 is not working */
+	FEAT_DSI_PLL_PWR_BUG	= 1 << 13,
 };
 
 /* DSS register field id */
-- 
1.7.1


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

* [PATCH 5/5] OMAP: DSS2: fix panel Kconfig dependencies
  2011-04-15  8:11 [PATCH 0/5] OMAP: DSS: fixes for rc Tomi Valkeinen
                   ` (3 preceding siblings ...)
  2011-04-15  8:11 ` [PATCH 4/5] OMAP: DSS2: DSI: Fix DSI PLL power bug Tomi Valkeinen
@ 2011-04-15  8:11 ` Tomi Valkeinen
  2011-04-15 17:32 ` [PATCH 0/5] OMAP: DSS: fixes for rc Steve Sakoman
  5 siblings, 0 replies; 7+ messages in thread
From: Tomi Valkeinen @ 2011-04-15  8:11 UTC (permalink / raw)
  To: linux-omap, linux-fbdev; +Cc: archit, Tomi Valkeinen

All DPI panels were missing dependency to OMAP2_DSS_DPI. Add the
dependency.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
---
 drivers/video/omap2/displays/Kconfig |    9 +++++----
 1 files changed, 5 insertions(+), 4 deletions(-)

diff --git a/drivers/video/omap2/displays/Kconfig b/drivers/video/omap2/displays/Kconfig
index d18ad6b..609a280 100644
--- a/drivers/video/omap2/displays/Kconfig
+++ b/drivers/video/omap2/displays/Kconfig
@@ -3,6 +3,7 @@ menu "OMAP2/3 Display Device Drivers"
 
 config PANEL_GENERIC_DPI
         tristate "Generic DPI Panel"
+	depends on OMAP2_DSS_DPI
         help
 	  Generic DPI panel driver.
 	  Supports DVI output for Beagle and OMAP3 SDP.
@@ -11,20 +12,20 @@ config PANEL_GENERIC_DPI
 
 config PANEL_LGPHILIPS_LB035Q02
 	tristate "LG.Philips LB035Q02 LCD Panel"
-	depends on OMAP2_DSS && SPI
+	depends on OMAP2_DSS_DPI && SPI
 	help
 	  LCD Panel used on the Gumstix Overo Palo35
 
 config PANEL_SHARP_LS037V7DW01
         tristate "Sharp LS037V7DW01 LCD Panel"
-        depends on OMAP2_DSS
+        depends on OMAP2_DSS_DPI
         select BACKLIGHT_CLASS_DEVICE
         help
           LCD Panel used in TI's SDP3430 and EVM boards
 
 config PANEL_NEC_NL8048HL11_01B
 	tristate "NEC NL8048HL11-01B Panel"
-	depends on OMAP2_DSS
+	depends on OMAP2_DSS_DPI
 	help
 		This NEC NL8048HL11-01B panel is TFT LCD
 		used in the Zoom2/3/3630 sdp boards.
@@ -37,7 +38,7 @@ config PANEL_TAAL
 
 config PANEL_TPO_TD043MTEA1
         tristate "TPO TD043MTEA1 LCD Panel"
-        depends on OMAP2_DSS && SPI
+        depends on OMAP2_DSS_DPI && SPI
         help
           LCD Panel used in OMAP3 Pandora
 
-- 
1.7.1


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

* Re: [PATCH 0/5] OMAP: DSS: fixes for rc
  2011-04-15  8:11 [PATCH 0/5] OMAP: DSS: fixes for rc Tomi Valkeinen
                   ` (4 preceding siblings ...)
  2011-04-15  8:11 ` [PATCH 5/5] OMAP: DSS2: fix panel Kconfig dependencies Tomi Valkeinen
@ 2011-04-15 17:32 ` Steve Sakoman
  5 siblings, 0 replies; 7+ messages in thread
From: Steve Sakoman @ 2011-04-15 17:32 UTC (permalink / raw)
  To: Tomi Valkeinen; +Cc: linux-omap, linux-fbdev, archit

On Fri, Apr 15, 2011 at 1:11 AM, Tomi Valkeinen <tomi.valkeinen@ti.com> wrote:
> Some small fixes to OMAP DSS for the next rc.
>
> I will send a pull request to Paul Mundt soon if there are no problems with the
> patches.

Tested on Overo (both 35XX and 37XX versions).

This patch series fixes the earlier issue of no video output on 37XX boards.

Tested-by: Steve Sakoman <steve@sakoman.com>

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

end of thread, other threads:[~2011-04-15 17:32 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-04-15  8:11 [PATCH 0/5] OMAP: DSS: fixes for rc Tomi Valkeinen
2011-04-15  8:11 ` [PATCH 1/5] OMAP: DSS2: DSI: fix use_sys_clk & highfreq Tomi Valkeinen
2011-04-15  8:11 ` [PATCH 2/5] OMAP: DSS2: DSI: fix dsi_dump_clocks() Tomi Valkeinen
2011-04-15  8:11 ` [PATCH 3/5] OMAP: DSS2: Fix: Return correct lcd clock source for OMAP2/3 Tomi Valkeinen
2011-04-15  8:11 ` [PATCH 4/5] OMAP: DSS2: DSI: Fix DSI PLL power bug Tomi Valkeinen
2011-04-15  8:11 ` [PATCH 5/5] OMAP: DSS2: fix panel Kconfig dependencies Tomi Valkeinen
2011-04-15 17:32 ` [PATCH 0/5] OMAP: DSS: fixes for rc Steve Sakoman

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).