Skip to contentSkip to conversation

OMAPDSS: Miscellaneous Fixes

PATCH In review Archit Taneja 2 participants 5 messages Dec 12, 2011 – Dec 13, 2011 Framebuffer layer

lore
Share & tools
lore
#0 lore raw

cover OMAPDSS: Miscellaneous Fixes

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(-)
Signature · 1 line
1.7.4.1
#1 lore raw

PATCH 1/3 OMAPDSS: DSI: Fix HSDIV related PLL info in dsi_dump_clocks()

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.

---
 drivers/video/omap2/dss/dsi.c |   14 ++++++++------
 1 files changed, 8 insertions(+), 6 deletions(-)
drivers/video/omap2/dss/dsi.c +8 -6
index 4dc98b6..511ae2a 100644
@@ -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 ?
Signature · 1 line
1.7.4.1
#2 lore raw

PATCH 2/3 OMAPDSS: Panel NEC: Set omap_dss_device states correctly

In reply to Archit Taneja

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.

---
 .../omap2/displays/panel-nec-nl8048hl11-01b.c      |   61 +++++++++++++++++---
 1 files changed, 52 insertions(+), 9 deletions(-)
drivers/video/omap2/displays/panel-nec-nl8048hl11-01b.c +52 -9
index 2ba9d0c..94e0f20 100644
@@ -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)
Signature · 1 line
1.7.4.1
#3 lore raw

PATCH 3/3 OMAPDSS: Displays: Make PICODLP driver depend on DPI

In reply to Archit Taneja

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

---
 drivers/video/omap2/displays/Kconfig |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
drivers/video/omap2/displays/Kconfig +1 -1
index 8d8e1fe..74d29b5 100644
@@ -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/
Signature · 1 line
1.7.4.1
#4 lore raw
In reply to Archit Taneja
Quoted 11 lines · 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

Quoted 4 lines
 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