public inbox for linux-omap@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/3] OMAPDSS: Miscellaneous Fixes
@ 2011-12-12  6:17 Archit Taneja
  2011-12-12  6:17 ` [PATCH 1/3] OMAPDSS: DSI: Fix HSDIV related PLL info in dsi_dump_clocks() Archit Taneja
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: Archit Taneja @ 2011-12-12  6:17 UTC (permalink / raw)
  To: tomi.valkeinen; +Cc: linux-omap, Archit Taneja

These are some minor fixes for DSS2.

Based on Tomi's master branch in:

git://gitorious.org/linux-omap-dss2/linux.git

Archit Taneja (3):
  OMAPDSS: DSI: Fix HSDIV related PLL info in dsi_dump_clocks()
  OMAPDSS: Panel NEC: Set omap_dss_device states correctly
  OMAPDSS: Displays: Make PICODLP driver depend on DPI

 drivers/video/omap2/displays/Kconfig               |    2 +-
 .../omap2/displays/panel-nec-nl8048hl11-01b.c      |   61 +++++++++++++++++---
 drivers/video/omap2/dss/dsi.c                      |   14 +++--
 3 files changed, 61 insertions(+), 16 deletions(-)

-- 
1.7.4.1


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

* [PATCH 1/3] OMAPDSS: DSI: Fix HSDIV related PLL info in dsi_dump_clocks()
  2011-12-12  6:17 [PATCH 0/3] OMAPDSS: Miscellaneous Fixes Archit Taneja
@ 2011-12-12  6:17 ` Archit Taneja
  2011-12-12  6:17 ` [PATCH 2/3] OMAPDSS: Panel NEC: Set omap_dss_device states correctly Archit Taneja
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 5+ messages in thread
From: Archit Taneja @ 2011-12-12  6:17 UTC (permalink / raw)
  To: tomi.valkeinen; +Cc: linux-omap, Archit Taneja

The clock names of DSI_PLL_HSDIV_DISPC and DSI_PLL_HSDIV_DSI was made
dynamic based on the current value of DISPC and DSI FCLK sources. This
doesn't need to be done since we are just interested in the clock names,
and not the current clock sources for DISPC and DSI FCLKs.

Use only the generic and omap specific names for the DSI PLL's HSDIV
clocks.

Signed-off-by: Archit Taneja <archit@ti.com>
---
 drivers/video/omap2/dss/dsi.c |   14 ++++++++------
 1 files changed, 8 insertions(+), 6 deletions(-)

diff --git a/drivers/video/omap2/dss/dsi.c b/drivers/video/omap2/dss/dsi.c
index 4dc98b6..511ae2a 100644
--- a/drivers/video/omap2/dss/dsi.c
+++ b/drivers/video/omap2/dss/dsi.c
@@ -1734,17 +1734,19 @@ static void dsi_dump_dsidev_clocks(struct platform_device *dsidev,
 	seq_printf(s,	"CLKIN4DDR\t%-16luregm %u\n",
 			cinfo->clkin4ddr, cinfo->regm);
 
-	seq_printf(s,	"%s (%s)\t%-16luregm_dispc %u\t(%s)\n",
-			dss_get_generic_clk_source_name(dispc_clk_src),
-			dss_feat_get_clk_source_name(dispc_clk_src),
+	seq_printf(s,	"DSI_PLL_HSDIV_DISPC (%s)\t%-16luregm_dispc %u\t(%s)\n",
+			dss_feat_get_clk_source_name(dsi_module == 0 ?
+				OMAP_DSS_CLK_SRC_DSI_PLL_HSDIV_DISPC :
+				OMAP_DSS_CLK_SRC_DSI2_PLL_HSDIV_DISPC),
 			cinfo->dsi_pll_hsdiv_dispc_clk,
 			cinfo->regm_dispc,
 			dispc_clk_src == OMAP_DSS_CLK_SRC_FCK ?
 			"off" : "on");
 
-	seq_printf(s,	"%s (%s)\t%-16luregm_dsi %u\t(%s)\n",
-			dss_get_generic_clk_source_name(dsi_clk_src),
-			dss_feat_get_clk_source_name(dsi_clk_src),
+	seq_printf(s,	"DSI_PLL_HSDIV_DSI (%s)\t%-16luregm_dsi %u\t(%s)\n",
+			dss_feat_get_clk_source_name(dsi_module == 0 ?
+				OMAP_DSS_CLK_SRC_DSI_PLL_HSDIV_DSI :
+				OMAP_DSS_CLK_SRC_DSI2_PLL_HSDIV_DSI),
 			cinfo->dsi_pll_hsdiv_dsi_clk,
 			cinfo->regm_dsi,
 			dsi_clk_src == OMAP_DSS_CLK_SRC_FCK ?
-- 
1.7.4.1


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

* [PATCH 2/3] OMAPDSS: Panel NEC: Set omap_dss_device states correctly
  2011-12-12  6:17 [PATCH 0/3] OMAPDSS: Miscellaneous Fixes Archit Taneja
  2011-12-12  6:17 ` [PATCH 1/3] OMAPDSS: DSI: Fix HSDIV related PLL info in dsi_dump_clocks() Archit Taneja
@ 2011-12-12  6:17 ` Archit Taneja
  2011-12-12  6:17 ` [PATCH 3/3] OMAPDSS: Displays: Make PICODLP driver depend on DPI Archit Taneja
  2011-12-13 11:32 ` [PATCH 0/3] OMAPDSS: Miscellaneous Fixes Tomi Valkeinen
  3 siblings, 0 replies; 5+ messages in thread
From: Archit Taneja @ 2011-12-12  6:17 UTC (permalink / raw)
  To: tomi.valkeinen; +Cc: linux-omap, Archit Taneja, Erik Gilling

The display state parameter of omap_dss_device struct is not being set correctly
in the panel driver NEC panel driver panel-nec-nl8048hl11-01b.c. Set the correct
states in the panel's enable/disable/suspend/resume functions.

CC: Erik Gilling <konkers@android.com>
Signed-off-by: Archit Taneja <archit@ti.com>
---
 .../omap2/displays/panel-nec-nl8048hl11-01b.c      |   61 +++++++++++++++++---
 1 files changed, 52 insertions(+), 9 deletions(-)

diff --git a/drivers/video/omap2/displays/panel-nec-nl8048hl11-01b.c b/drivers/video/omap2/displays/panel-nec-nl8048hl11-01b.c
index 2ba9d0c..94e0f20 100644
--- a/drivers/video/omap2/displays/panel-nec-nl8048hl11-01b.c
+++ b/drivers/video/omap2/displays/panel-nec-nl8048hl11-01b.c
@@ -163,50 +163,93 @@ static void nec_8048_panel_remove(struct omap_dss_device *dssdev)
 	kfree(necd);
 }
 
-static int nec_8048_panel_enable(struct omap_dss_device *dssdev)
+static int nec_8048_panel_power_on(struct omap_dss_device *dssdev)
 {
-	int r = 0;
+	int r;
 	struct nec_8048_data *necd = dev_get_drvdata(&dssdev->dev);
 	struct backlight_device *bl = necd->bl;
 
+	if (dssdev->state == OMAP_DSS_DISPLAY_ACTIVE)
+		return 0;
+
+	r = omapdss_dpi_display_enable(dssdev);
+	if (r)
+		goto err0;
+
 	if (dssdev->platform_enable) {
 		r = dssdev->platform_enable(dssdev);
 		if (r)
-			return r;
+			goto err1;
 	}
 
 	r = nec_8048_bl_update_status(bl);
 	if (r < 0)
 		dev_err(&dssdev->dev, "failed to set lcd brightness\n");
 
-	r = omapdss_dpi_display_enable(dssdev);
-
+	return 0;
+err1:
+	omapdss_dpi_display_disable(dssdev);
+err0:
 	return r;
 }
 
-static void nec_8048_panel_disable(struct omap_dss_device *dssdev)
+static void nec_8048_panel_power_off(struct omap_dss_device *dssdev)
 {
 	struct nec_8048_data *necd = dev_get_drvdata(&dssdev->dev);
 	struct backlight_device *bl = necd->bl;
 
-	omapdss_dpi_display_disable(dssdev);
+	if (dssdev->state != OMAP_DSS_DISPLAY_ACTIVE)
+		return;
 
 	bl->props.brightness = 0;
 	nec_8048_bl_update_status(bl);
 
 	if (dssdev->platform_disable)
 		dssdev->platform_disable(dssdev);
+
+	omapdss_dpi_display_disable(dssdev);
+}
+
+static int nec_8048_panel_enable(struct omap_dss_device *dssdev)
+{
+	int r;
+
+	r = nec_8048_panel_power_on(dssdev);
+	if (r)
+		return r;
+
+	dssdev->state = OMAP_DSS_DISPLAY_ACTIVE;
+
+	return 0;
+}
+
+static void nec_8048_panel_disable(struct omap_dss_device *dssdev)
+{
+	nec_8048_panel_power_off(dssdev);
+
+	dssdev->state = OMAP_DSS_DISPLAY_DISABLED;
 }
 
 static int nec_8048_panel_suspend(struct omap_dss_device *dssdev)
 {
-	nec_8048_panel_disable(dssdev);
+	nec_8048_panel_power_off(dssdev);
+
+	dssdev->state = OMAP_DSS_DISPLAY_SUSPENDED;
+
 	return 0;
 }
 
 static int nec_8048_panel_resume(struct omap_dss_device *dssdev)
 {
-	return nec_8048_panel_enable(dssdev);
+	int r;
+
+	r = nec_8048_panel_power_on(dssdev);
+	if (r)
+		return r;
+
+	dssdev->state = OMAP_DSS_DISPLAY_ACTIVE;
+
+	return 0;
 }
 
 static int nec_8048_recommended_bpp(struct omap_dss_device *dssdev)
-- 
1.7.4.1


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

* [PATCH 3/3] OMAPDSS: Displays: Make PICODLP driver depend on DPI
  2011-12-12  6:17 [PATCH 0/3] OMAPDSS: Miscellaneous Fixes Archit Taneja
  2011-12-12  6:17 ` [PATCH 1/3] OMAPDSS: DSI: Fix HSDIV related PLL info in dsi_dump_clocks() Archit Taneja
  2011-12-12  6:17 ` [PATCH 2/3] OMAPDSS: Panel NEC: Set omap_dss_device states correctly Archit Taneja
@ 2011-12-12  6:17 ` Archit Taneja
  2011-12-13 11:32 ` [PATCH 0/3] OMAPDSS: Miscellaneous Fixes Tomi Valkeinen
  3 siblings, 0 replies; 5+ messages in thread
From: Archit Taneja @ 2011-12-12  6:17 UTC (permalink / raw)
  To: tomi.valkeinen; +Cc: linux-omap, Archit Taneja

Make PICODLP driver on OMAP2_DSS_DPI since it is the display interface it uses.

Signed-off-by: Archit Taneja <archit@ti.com>
---
 drivers/video/omap2/displays/Kconfig |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/video/omap2/displays/Kconfig b/drivers/video/omap2/displays/Kconfig
index 8d8e1fe..74d29b5 100644
--- a/drivers/video/omap2/displays/Kconfig
+++ b/drivers/video/omap2/displays/Kconfig
@@ -41,7 +41,7 @@ config PANEL_NEC_NL8048HL11_01B
 
 config PANEL_PICODLP
 	tristate "TI PICO DLP mini-projector"
-	depends on OMAP2_DSS && I2C
+	depends on OMAP2_DSS_DPI && I2C
 	help
 		A mini-projector used in TI's SDP4430 and EVM boards
 		For more info please visit http://www.dlp.com/projector/
-- 
1.7.4.1


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

* Re: [PATCH 0/3] OMAPDSS: Miscellaneous Fixes
  2011-12-12  6:17 [PATCH 0/3] OMAPDSS: Miscellaneous Fixes Archit Taneja
                   ` (2 preceding siblings ...)
  2011-12-12  6:17 ` [PATCH 3/3] OMAPDSS: Displays: Make PICODLP driver depend on DPI Archit Taneja
@ 2011-12-13 11:32 ` Tomi Valkeinen
  3 siblings, 0 replies; 5+ messages in thread
From: Tomi Valkeinen @ 2011-12-13 11:32 UTC (permalink / raw)
  To: Archit Taneja; +Cc: linux-omap

[-- Attachment #1: Type: text/plain, Size: 747 bytes --]

On Mon, 2011-12-12 at 11:47 +0530, Archit Taneja wrote:
> These are some minor fixes for DSS2.
> 
> Based on Tomi's master branch in:
> 
> git://gitorious.org/linux-omap-dss2/linux.git
> 
> Archit Taneja (3):
>   OMAPDSS: DSI: Fix HSDIV related PLL info in dsi_dump_clocks()
>   OMAPDSS: Panel NEC: Set omap_dss_device states correctly
>   OMAPDSS: Displays: Make PICODLP driver depend on DPI
> 
>  drivers/video/omap2/displays/Kconfig               |    2 +-
>  .../omap2/displays/panel-nec-nl8048hl11-01b.c      |   61 +++++++++++++++++---
>  drivers/video/omap2/dss/dsi.c                      |   14 +++--
>  3 files changed, 61 insertions(+), 16 deletions(-)

I think these are fine. Applying to DSS tree. Thanks!

 Tomi


[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 836 bytes --]

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

end of thread, other threads:[~2011-12-13 11:33 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-12-12  6:17 [PATCH 0/3] OMAPDSS: Miscellaneous Fixes Archit Taneja
2011-12-12  6:17 ` [PATCH 1/3] OMAPDSS: DSI: Fix HSDIV related PLL info in dsi_dump_clocks() Archit Taneja
2011-12-12  6:17 ` [PATCH 2/3] OMAPDSS: Panel NEC: Set omap_dss_device states correctly Archit Taneja
2011-12-12  6:17 ` [PATCH 3/3] OMAPDSS: Displays: Make PICODLP driver depend on DPI Archit Taneja
2011-12-13 11:32 ` [PATCH 0/3] OMAPDSS: Miscellaneous Fixes Tomi Valkeinen

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