All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/3] OMAP: DSS PM fixes
@ 2012-01-23 12:15 ` Tomi Valkeinen
  0 siblings, 0 replies; 18+ messages in thread
From: Tomi Valkeinen @ 2012-01-23 12:15 UTC (permalink / raw)
  To: linux-omap, linux-fbdev, paul
  Cc: archit, neilb, jean.pihet, khilman, jw, Tomi Valkeinen

Here are two fixes to get DSS work better with PM on OMAP3.

The first two patches fix the missing SYSC_HAS_ENAWAKEUP flag, which removes
the SYNC_LOST problem.

The third patch changes omapdss to use pm_runtime_put_sync functions, which
fixes the system suspend.

I've tested both only on v3.3-rc1, OMAP3 Overo. I get problems on system
suspend from TWL and MTD drivers (also without my patches =), but disabling MTD
and ignoring TWL errors shows that the warning from omapdss has disappeared,
and I get an image on the screen on resume.

The two fixes are independent, so either I can take them through dss tree (with
appropriate Acks), or the hwmod patches can go through some other tree.

The fixes should also work directly on v3.2, even though I haven't tested them
yet.

 Tomi

Tomi Valkeinen (3):
  ARM: OMAP: HWMOD: split omap2/3 dispc hwmod class
  ARM: OMAP3: HWMOD: add SYSC_HAS_ENAWAKEUP for dispc
  OMAPDSS: use sync versions of pm_runtime_put

 .../mach-omap2/omap_hwmod_2xxx_3xxx_ipblock_data.c |   21 -----------------
 arch/arm/mach-omap2/omap_hwmod_2xxx_ipblock_data.c |   22 ++++++++++++++++++
 arch/arm/mach-omap2/omap_hwmod_3xxx_data.c         |   24 +++++++++++++++++++-
 drivers/video/omap2/dss/dispc.c                    |    2 +-
 drivers/video/omap2/dss/dsi.c                      |    2 +-
 drivers/video/omap2/dss/dss.c                      |    2 +-
 drivers/video/omap2/dss/hdmi.c                     |    2 +-
 drivers/video/omap2/dss/rfbi.c                     |    2 +-
 drivers/video/omap2/dss/venc.c                     |    2 +-
 9 files changed, 51 insertions(+), 28 deletions(-)

-- 
1.7.4.1


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

* [PATCH 0/3] OMAP: DSS PM fixes
@ 2012-01-23 12:15 ` Tomi Valkeinen
  0 siblings, 0 replies; 18+ messages in thread
From: Tomi Valkeinen @ 2012-01-23 12:15 UTC (permalink / raw)
  To: linux-omap, linux-fbdev, paul
  Cc: archit, neilb, jean.pihet, khilman, jw, Tomi Valkeinen

Here are two fixes to get DSS work better with PM on OMAP3.

The first two patches fix the missing SYSC_HAS_ENAWAKEUP flag, which removes
the SYNC_LOST problem.

The third patch changes omapdss to use pm_runtime_put_sync functions, which
fixes the system suspend.

I've tested both only on v3.3-rc1, OMAP3 Overo. I get problems on system
suspend from TWL and MTD drivers (also without my patches =), but disabling MTD
and ignoring TWL errors shows that the warning from omapdss has disappeared,
and I get an image on the screen on resume.

The two fixes are independent, so either I can take them through dss tree (with
appropriate Acks), or the hwmod patches can go through some other tree.

The fixes should also work directly on v3.2, even though I haven't tested them
yet.

 Tomi

Tomi Valkeinen (3):
  ARM: OMAP: HWMOD: split omap2/3 dispc hwmod class
  ARM: OMAP3: HWMOD: add SYSC_HAS_ENAWAKEUP for dispc
  OMAPDSS: use sync versions of pm_runtime_put

 .../mach-omap2/omap_hwmod_2xxx_3xxx_ipblock_data.c |   21 -----------------
 arch/arm/mach-omap2/omap_hwmod_2xxx_ipblock_data.c |   22 ++++++++++++++++++
 arch/arm/mach-omap2/omap_hwmod_3xxx_data.c         |   24 +++++++++++++++++++-
 drivers/video/omap2/dss/dispc.c                    |    2 +-
 drivers/video/omap2/dss/dsi.c                      |    2 +-
 drivers/video/omap2/dss/dss.c                      |    2 +-
 drivers/video/omap2/dss/hdmi.c                     |    2 +-
 drivers/video/omap2/dss/rfbi.c                     |    2 +-
 drivers/video/omap2/dss/venc.c                     |    2 +-
 9 files changed, 51 insertions(+), 28 deletions(-)

-- 
1.7.4.1


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

* [PATCH 1/3] ARM: OMAP: HWMOD: split omap2/3 dispc hwmod class
  2012-01-23 12:15 ` Tomi Valkeinen
@ 2012-01-23 12:15   ` Tomi Valkeinen
  -1 siblings, 0 replies; 18+ messages in thread
From: Tomi Valkeinen @ 2012-01-23 12:15 UTC (permalink / raw)
  To: linux-omap, linux-fbdev, paul
  Cc: archit, neilb, jean.pihet, khilman, jw, Tomi Valkeinen

Currently OMAP2 and 3 share the same omap_hwmod_class and
omap_hwmod_class_sysconfig for dispc. However, OMAP3 has sysconfig
bits that OMAP2 doesn't have, so we need to split those structs into
OMAP2 and OMAP3 specific versions.

This patch only splits the structs, without changing the contents.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
---
 .../mach-omap2/omap_hwmod_2xxx_3xxx_ipblock_data.c |   21 ------------------
 arch/arm/mach-omap2/omap_hwmod_2xxx_ipblock_data.c |   22 +++++++++++++++++++
 arch/arm/mach-omap2/omap_hwmod_3xxx_data.c         |   23 +++++++++++++++++++-
 3 files changed, 44 insertions(+), 22 deletions(-)

diff --git a/arch/arm/mach-omap2/omap_hwmod_2xxx_3xxx_ipblock_data.c b/arch/arm/mach-omap2/omap_hwmod_2xxx_3xxx_ipblock_data.c
index c11273d..f08e442 100644
--- a/arch/arm/mach-omap2/omap_hwmod_2xxx_3xxx_ipblock_data.c
+++ b/arch/arm/mach-omap2/omap_hwmod_2xxx_3xxx_ipblock_data.c
@@ -56,27 +56,6 @@ struct omap_hwmod_class omap2_dss_hwmod_class = {
 };
 
 /*
- * 'dispc' class
- * display controller
- */
-
-static struct omap_hwmod_class_sysconfig omap2_dispc_sysc = {
-	.rev_offs	= 0x0000,
-	.sysc_offs	= 0x0010,
-	.syss_offs	= 0x0014,
-	.sysc_flags	= (SYSC_HAS_SIDLEMODE | SYSC_HAS_MIDLEMODE |
-			   SYSC_HAS_SOFTRESET | SYSC_HAS_AUTOIDLE),
-	.idlemodes	= (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART |
-			   MSTANDBY_FORCE | MSTANDBY_NO | MSTANDBY_SMART),
-	.sysc_fields	= &omap_hwmod_sysc_type1,
-};
-
-struct omap_hwmod_class omap2_dispc_hwmod_class = {
-	.name	= "dispc",
-	.sysc	= &omap2_dispc_sysc,
-};
-
-/*
  * 'rfbi' class
  * remote frame buffer interface
  */
diff --git a/arch/arm/mach-omap2/omap_hwmod_2xxx_ipblock_data.c b/arch/arm/mach-omap2/omap_hwmod_2xxx_ipblock_data.c
index 177dee2..2a67297 100644
--- a/arch/arm/mach-omap2/omap_hwmod_2xxx_ipblock_data.c
+++ b/arch/arm/mach-omap2/omap_hwmod_2xxx_ipblock_data.c
@@ -28,6 +28,28 @@ struct omap_hwmod_dma_info omap2xxx_dss_sdma_chs[] = {
 	{ .name = "dispc", .dma_req = 5 },
 	{ .dma_req = -1 }
 };
+
+/*
+ * 'dispc' class
+ * display controller
+ */
+
+static struct omap_hwmod_class_sysconfig omap2_dispc_sysc = {
+	.rev_offs	= 0x0000,
+	.sysc_offs	= 0x0010,
+	.syss_offs	= 0x0014,
+	.sysc_flags	= (SYSC_HAS_SIDLEMODE | SYSC_HAS_MIDLEMODE |
+			   SYSC_HAS_SOFTRESET | SYSC_HAS_AUTOIDLE),
+	.idlemodes	= (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART |
+			   MSTANDBY_FORCE | MSTANDBY_NO | MSTANDBY_SMART),
+	.sysc_fields	= &omap_hwmod_sysc_type1,
+};
+
+struct omap_hwmod_class omap2_dispc_hwmod_class = {
+	.name	= "dispc",
+	.sysc	= &omap2_dispc_sysc,
+};
+
 /* OMAP2xxx Timer Common */
 static struct omap_hwmod_class_sysconfig omap2xxx_timer_sysc = {
 	.rev_offs	= 0x0000,
diff --git a/arch/arm/mach-omap2/omap_hwmod_3xxx_data.c b/arch/arm/mach-omap2/omap_hwmod_3xxx_data.c
index 5324e8d..c965309 100644
--- a/arch/arm/mach-omap2/omap_hwmod_3xxx_data.c
+++ b/arch/arm/mach-omap2/omap_hwmod_3xxx_data.c
@@ -1480,6 +1480,27 @@ static struct omap_hwmod omap3xxx_dss_core_hwmod = {
 	.masters_cnt	= ARRAY_SIZE(omap3xxx_dss_masters),
 };
 
+/*
+ * 'dispc' class
+ * display controller
+ */
+
+static struct omap_hwmod_class_sysconfig omap3_dispc_sysc = {
+	.rev_offs	= 0x0000,
+	.sysc_offs	= 0x0010,
+	.syss_offs	= 0x0014,
+	.sysc_flags	= (SYSC_HAS_SIDLEMODE | SYSC_HAS_MIDLEMODE |
+			   SYSC_HAS_SOFTRESET | SYSC_HAS_AUTOIDLE),
+	.idlemodes	= (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART |
+			   MSTANDBY_FORCE | MSTANDBY_NO | MSTANDBY_SMART),
+	.sysc_fields	= &omap_hwmod_sysc_type1,
+};
+
+static struct omap_hwmod_class omap3_dispc_hwmod_class = {
+	.name	= "dispc",
+	.sysc	= &omap3_dispc_sysc,
+};
+
 /* l4_core -> dss_dispc */
 static struct omap_hwmod_ocp_if omap3xxx_l4_core__dss_dispc = {
 	.master		= &omap3xxx_l4_core_hwmod,
@@ -1503,7 +1524,7 @@ static struct omap_hwmod_ocp_if *omap3xxx_dss_dispc_slaves[] = {
 
 static struct omap_hwmod omap3xxx_dss_dispc_hwmod = {
 	.name		= "dss_dispc",
-	.class		= &omap2_dispc_hwmod_class,
+	.class		= &omap3_dispc_hwmod_class,
 	.mpu_irqs	= omap2_dispc_irqs,
 	.main_clk	= "dss1_alwon_fck",
 	.prcm		= {
-- 
1.7.4.1


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

* [PATCH 1/3] ARM: OMAP: HWMOD: split omap2/3 dispc hwmod class
@ 2012-01-23 12:15   ` Tomi Valkeinen
  0 siblings, 0 replies; 18+ messages in thread
From: Tomi Valkeinen @ 2012-01-23 12:15 UTC (permalink / raw)
  To: linux-omap, linux-fbdev, paul
  Cc: archit, neilb, jean.pihet, khilman, jw, Tomi Valkeinen

Currently OMAP2 and 3 share the same omap_hwmod_class and
omap_hwmod_class_sysconfig for dispc. However, OMAP3 has sysconfig
bits that OMAP2 doesn't have, so we need to split those structs into
OMAP2 and OMAP3 specific versions.

This patch only splits the structs, without changing the contents.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
---
 .../mach-omap2/omap_hwmod_2xxx_3xxx_ipblock_data.c |   21 ------------------
 arch/arm/mach-omap2/omap_hwmod_2xxx_ipblock_data.c |   22 +++++++++++++++++++
 arch/arm/mach-omap2/omap_hwmod_3xxx_data.c         |   23 +++++++++++++++++++-
 3 files changed, 44 insertions(+), 22 deletions(-)

diff --git a/arch/arm/mach-omap2/omap_hwmod_2xxx_3xxx_ipblock_data.c b/arch/arm/mach-omap2/omap_hwmod_2xxx_3xxx_ipblock_data.c
index c11273d..f08e442 100644
--- a/arch/arm/mach-omap2/omap_hwmod_2xxx_3xxx_ipblock_data.c
+++ b/arch/arm/mach-omap2/omap_hwmod_2xxx_3xxx_ipblock_data.c
@@ -56,27 +56,6 @@ struct omap_hwmod_class omap2_dss_hwmod_class = {
 };
 
 /*
- * 'dispc' class
- * display controller
- */
-
-static struct omap_hwmod_class_sysconfig omap2_dispc_sysc = {
-	.rev_offs	= 0x0000,
-	.sysc_offs	= 0x0010,
-	.syss_offs	= 0x0014,
-	.sysc_flags	= (SYSC_HAS_SIDLEMODE | SYSC_HAS_MIDLEMODE |
-			   SYSC_HAS_SOFTRESET | SYSC_HAS_AUTOIDLE),
-	.idlemodes	= (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART |
-			   MSTANDBY_FORCE | MSTANDBY_NO | MSTANDBY_SMART),
-	.sysc_fields	= &omap_hwmod_sysc_type1,
-};
-
-struct omap_hwmod_class omap2_dispc_hwmod_class = {
-	.name	= "dispc",
-	.sysc	= &omap2_dispc_sysc,
-};
-
-/*
  * 'rfbi' class
  * remote frame buffer interface
  */
diff --git a/arch/arm/mach-omap2/omap_hwmod_2xxx_ipblock_data.c b/arch/arm/mach-omap2/omap_hwmod_2xxx_ipblock_data.c
index 177dee2..2a67297 100644
--- a/arch/arm/mach-omap2/omap_hwmod_2xxx_ipblock_data.c
+++ b/arch/arm/mach-omap2/omap_hwmod_2xxx_ipblock_data.c
@@ -28,6 +28,28 @@ struct omap_hwmod_dma_info omap2xxx_dss_sdma_chs[] = {
 	{ .name = "dispc", .dma_req = 5 },
 	{ .dma_req = -1 }
 };
+
+/*
+ * 'dispc' class
+ * display controller
+ */
+
+static struct omap_hwmod_class_sysconfig omap2_dispc_sysc = {
+	.rev_offs	= 0x0000,
+	.sysc_offs	= 0x0010,
+	.syss_offs	= 0x0014,
+	.sysc_flags	= (SYSC_HAS_SIDLEMODE | SYSC_HAS_MIDLEMODE |
+			   SYSC_HAS_SOFTRESET | SYSC_HAS_AUTOIDLE),
+	.idlemodes	= (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART |
+			   MSTANDBY_FORCE | MSTANDBY_NO | MSTANDBY_SMART),
+	.sysc_fields	= &omap_hwmod_sysc_type1,
+};
+
+struct omap_hwmod_class omap2_dispc_hwmod_class = {
+	.name	= "dispc",
+	.sysc	= &omap2_dispc_sysc,
+};
+
 /* OMAP2xxx Timer Common */
 static struct omap_hwmod_class_sysconfig omap2xxx_timer_sysc = {
 	.rev_offs	= 0x0000,
diff --git a/arch/arm/mach-omap2/omap_hwmod_3xxx_data.c b/arch/arm/mach-omap2/omap_hwmod_3xxx_data.c
index 5324e8d..c965309 100644
--- a/arch/arm/mach-omap2/omap_hwmod_3xxx_data.c
+++ b/arch/arm/mach-omap2/omap_hwmod_3xxx_data.c
@@ -1480,6 +1480,27 @@ static struct omap_hwmod omap3xxx_dss_core_hwmod = {
 	.masters_cnt	= ARRAY_SIZE(omap3xxx_dss_masters),
 };
 
+/*
+ * 'dispc' class
+ * display controller
+ */
+
+static struct omap_hwmod_class_sysconfig omap3_dispc_sysc = {
+	.rev_offs	= 0x0000,
+	.sysc_offs	= 0x0010,
+	.syss_offs	= 0x0014,
+	.sysc_flags	= (SYSC_HAS_SIDLEMODE | SYSC_HAS_MIDLEMODE |
+			   SYSC_HAS_SOFTRESET | SYSC_HAS_AUTOIDLE),
+	.idlemodes	= (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART |
+			   MSTANDBY_FORCE | MSTANDBY_NO | MSTANDBY_SMART),
+	.sysc_fields	= &omap_hwmod_sysc_type1,
+};
+
+static struct omap_hwmod_class omap3_dispc_hwmod_class = {
+	.name	= "dispc",
+	.sysc	= &omap3_dispc_sysc,
+};
+
 /* l4_core -> dss_dispc */
 static struct omap_hwmod_ocp_if omap3xxx_l4_core__dss_dispc = {
 	.master		= &omap3xxx_l4_core_hwmod,
@@ -1503,7 +1524,7 @@ static struct omap_hwmod_ocp_if *omap3xxx_dss_dispc_slaves[] = {
 
 static struct omap_hwmod omap3xxx_dss_dispc_hwmod = {
 	.name		= "dss_dispc",
-	.class		= &omap2_dispc_hwmod_class,
+	.class		= &omap3_dispc_hwmod_class,
 	.mpu_irqs	= omap2_dispc_irqs,
 	.main_clk	= "dss1_alwon_fck",
 	.prcm		= {
-- 
1.7.4.1


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

* [PATCH 2/3] ARM: OMAP3: HWMOD: add SYSC_HAS_ENAWAKEUP for dispc
  2012-01-23 12:15 ` Tomi Valkeinen
@ 2012-01-23 12:15   ` Tomi Valkeinen
  -1 siblings, 0 replies; 18+ messages in thread
From: Tomi Valkeinen @ 2012-01-23 12:15 UTC (permalink / raw)
  To: linux-omap, linux-fbdev, paul
  Cc: archit, neilb, jean.pihet, khilman, jw, Tomi Valkeinen

dispc's sysc_flags is missing SYSC_HAS_ENAWAKEUP flag. This seems to
cause SYNC_LOST errors from the DSS when the power management is
enabled.

This patch adds the missing SYSC_HAS_ENAWAKEUP flag. Note that there are
other flags missing also (clock activity, DSI's sysc flags), but as they
are not critical, they will be fixed in the next merge window.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
---
 arch/arm/mach-omap2/omap_hwmod_3xxx_data.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/arch/arm/mach-omap2/omap_hwmod_3xxx_data.c b/arch/arm/mach-omap2/omap_hwmod_3xxx_data.c
index c965309..b176d44 100644
--- a/arch/arm/mach-omap2/omap_hwmod_3xxx_data.c
+++ b/arch/arm/mach-omap2/omap_hwmod_3xxx_data.c
@@ -1490,7 +1490,8 @@ static struct omap_hwmod_class_sysconfig omap3_dispc_sysc = {
 	.sysc_offs	= 0x0010,
 	.syss_offs	= 0x0014,
 	.sysc_flags	= (SYSC_HAS_SIDLEMODE | SYSC_HAS_MIDLEMODE |
-			   SYSC_HAS_SOFTRESET | SYSC_HAS_AUTOIDLE),
+			   SYSC_HAS_SOFTRESET | SYSC_HAS_AUTOIDLE |
+			   SYSC_HAS_ENAWAKEUP),
 	.idlemodes	= (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART |
 			   MSTANDBY_FORCE | MSTANDBY_NO | MSTANDBY_SMART),
 	.sysc_fields	= &omap_hwmod_sysc_type1,
-- 
1.7.4.1


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

* [PATCH 2/3] ARM: OMAP3: HWMOD: add SYSC_HAS_ENAWAKEUP for dispc
@ 2012-01-23 12:15   ` Tomi Valkeinen
  0 siblings, 0 replies; 18+ messages in thread
From: Tomi Valkeinen @ 2012-01-23 12:15 UTC (permalink / raw)
  To: linux-omap, linux-fbdev, paul
  Cc: archit, neilb, jean.pihet, khilman, jw, Tomi Valkeinen

dispc's sysc_flags is missing SYSC_HAS_ENAWAKEUP flag. This seems to
cause SYNC_LOST errors from the DSS when the power management is
enabled.

This patch adds the missing SYSC_HAS_ENAWAKEUP flag. Note that there are
other flags missing also (clock activity, DSI's sysc flags), but as they
are not critical, they will be fixed in the next merge window.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
---
 arch/arm/mach-omap2/omap_hwmod_3xxx_data.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/arch/arm/mach-omap2/omap_hwmod_3xxx_data.c b/arch/arm/mach-omap2/omap_hwmod_3xxx_data.c
index c965309..b176d44 100644
--- a/arch/arm/mach-omap2/omap_hwmod_3xxx_data.c
+++ b/arch/arm/mach-omap2/omap_hwmod_3xxx_data.c
@@ -1490,7 +1490,8 @@ static struct omap_hwmod_class_sysconfig omap3_dispc_sysc = {
 	.sysc_offs	= 0x0010,
 	.syss_offs	= 0x0014,
 	.sysc_flags	= (SYSC_HAS_SIDLEMODE | SYSC_HAS_MIDLEMODE |
-			   SYSC_HAS_SOFTRESET | SYSC_HAS_AUTOIDLE),
+			   SYSC_HAS_SOFTRESET | SYSC_HAS_AUTOIDLE |
+			   SYSC_HAS_ENAWAKEUP),
 	.idlemodes	= (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART |
 			   MSTANDBY_FORCE | MSTANDBY_NO | MSTANDBY_SMART),
 	.sysc_fields	= &omap_hwmod_sysc_type1,
-- 
1.7.4.1


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

* [PATCH 3/3] OMAPDSS: use sync versions of pm_runtime_put
  2012-01-23 12:15 ` Tomi Valkeinen
@ 2012-01-23 12:15   ` Tomi Valkeinen
  -1 siblings, 0 replies; 18+ messages in thread
From: Tomi Valkeinen @ 2012-01-23 12:15 UTC (permalink / raw)
  To: linux-omap, linux-fbdev, paul
  Cc: archit, neilb, jean.pihet, khilman, jw, Tomi Valkeinen

omapdss doesn't work properly on system suspend. The problem seems to be
the fact that omapdss uses pm_runtime_put() functions when turning off
the hardware, and when system suspend is in process only sync versions
are allowed.

Using non-sync versions normally and sync versions when suspending would
need rather ugly hacks to convey the information of
suspending/not-suspending to different functions. Optimally the driver
wouldn't even need to care about this, and the PM layer would handle
syncing when suspend is in process.

This patch changes all omapdss's pm_runtime_put calls to
pm_runtime_put_sync. This fixes the suspend problem, and probably the
performance penalty of always using sync versions is negligible.

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

diff --git a/drivers/video/omap2/dss/dispc.c b/drivers/video/omap2/dss/dispc.c
index a5ec7f3..e1626a1 100644
--- a/drivers/video/omap2/dss/dispc.c
+++ b/drivers/video/omap2/dss/dispc.c
@@ -401,7 +401,7 @@ void dispc_runtime_put(void)
 
 	DSSDBG("dispc_runtime_put\n");
 
-	r = pm_runtime_put(&dispc.pdev->dev);
+	r = pm_runtime_put_sync(&dispc.pdev->dev);
 	WARN_ON(r < 0);
 }
 
diff --git a/drivers/video/omap2/dss/dsi.c b/drivers/video/omap2/dss/dsi.c
index d4d676c..52f36ec 100644
--- a/drivers/video/omap2/dss/dsi.c
+++ b/drivers/video/omap2/dss/dsi.c
@@ -1079,7 +1079,7 @@ void dsi_runtime_put(struct platform_device *dsidev)
 
 	DSSDBG("dsi_runtime_put\n");
 
-	r = pm_runtime_put(&dsi->pdev->dev);
+	r = pm_runtime_put_sync(&dsi->pdev->dev);
 	WARN_ON(r < 0);
 }
 
diff --git a/drivers/video/omap2/dss/dss.c b/drivers/video/omap2/dss/dss.c
index 1703345..77c2b5a 100644
--- a/drivers/video/omap2/dss/dss.c
+++ b/drivers/video/omap2/dss/dss.c
@@ -720,7 +720,7 @@ void dss_runtime_put(void)
 
 	DSSDBG("dss_runtime_put\n");
 
-	r = pm_runtime_put(&dss.pdev->dev);
+	r = pm_runtime_put_sync(&dss.pdev->dev);
 	WARN_ON(r < 0);
 }
 
diff --git a/drivers/video/omap2/dss/hdmi.c b/drivers/video/omap2/dss/hdmi.c
index b4c270e..c39f9c3 100644
--- a/drivers/video/omap2/dss/hdmi.c
+++ b/drivers/video/omap2/dss/hdmi.c
@@ -176,7 +176,7 @@ static void hdmi_runtime_put(void)
 
 	DSSDBG("hdmi_runtime_put\n");
 
-	r = pm_runtime_put(&hdmi.pdev->dev);
+	r = pm_runtime_put_sync(&hdmi.pdev->dev);
 	WARN_ON(r < 0);
 }
 
diff --git a/drivers/video/omap2/dss/rfbi.c b/drivers/video/omap2/dss/rfbi.c
index 814bb95..55f3980 100644
--- a/drivers/video/omap2/dss/rfbi.c
+++ b/drivers/video/omap2/dss/rfbi.c
@@ -140,7 +140,7 @@ static void rfbi_runtime_put(void)
 
 	DSSDBG("rfbi_runtime_put\n");
 
-	r = pm_runtime_put(&rfbi.pdev->dev);
+	r = pm_runtime_put_sync(&rfbi.pdev->dev);
 	WARN_ON(r < 0);
 }
 
diff --git a/drivers/video/omap2/dss/venc.c b/drivers/video/omap2/dss/venc.c
index b3e9f90..5c3d0f9 100644
--- a/drivers/video/omap2/dss/venc.c
+++ b/drivers/video/omap2/dss/venc.c
@@ -401,7 +401,7 @@ static void venc_runtime_put(void)
 
 	DSSDBG("venc_runtime_put\n");
 
-	r = pm_runtime_put(&venc.pdev->dev);
+	r = pm_runtime_put_sync(&venc.pdev->dev);
 	WARN_ON(r < 0);
 }
 
-- 
1.7.4.1


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

* [PATCH 3/3] OMAPDSS: use sync versions of pm_runtime_put
@ 2012-01-23 12:15   ` Tomi Valkeinen
  0 siblings, 0 replies; 18+ messages in thread
From: Tomi Valkeinen @ 2012-01-23 12:15 UTC (permalink / raw)
  To: linux-omap, linux-fbdev, paul
  Cc: archit, neilb, jean.pihet, khilman, jw, Tomi Valkeinen

omapdss doesn't work properly on system suspend. The problem seems to be
the fact that omapdss uses pm_runtime_put() functions when turning off
the hardware, and when system suspend is in process only sync versions
are allowed.

Using non-sync versions normally and sync versions when suspending would
need rather ugly hacks to convey the information of
suspending/not-suspending to different functions. Optimally the driver
wouldn't even need to care about this, and the PM layer would handle
syncing when suspend is in process.

This patch changes all omapdss's pm_runtime_put calls to
pm_runtime_put_sync. This fixes the suspend problem, and probably the
performance penalty of always using sync versions is negligible.

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

diff --git a/drivers/video/omap2/dss/dispc.c b/drivers/video/omap2/dss/dispc.c
index a5ec7f3..e1626a1 100644
--- a/drivers/video/omap2/dss/dispc.c
+++ b/drivers/video/omap2/dss/dispc.c
@@ -401,7 +401,7 @@ void dispc_runtime_put(void)
 
 	DSSDBG("dispc_runtime_put\n");
 
-	r = pm_runtime_put(&dispc.pdev->dev);
+	r = pm_runtime_put_sync(&dispc.pdev->dev);
 	WARN_ON(r < 0);
 }
 
diff --git a/drivers/video/omap2/dss/dsi.c b/drivers/video/omap2/dss/dsi.c
index d4d676c..52f36ec 100644
--- a/drivers/video/omap2/dss/dsi.c
+++ b/drivers/video/omap2/dss/dsi.c
@@ -1079,7 +1079,7 @@ void dsi_runtime_put(struct platform_device *dsidev)
 
 	DSSDBG("dsi_runtime_put\n");
 
-	r = pm_runtime_put(&dsi->pdev->dev);
+	r = pm_runtime_put_sync(&dsi->pdev->dev);
 	WARN_ON(r < 0);
 }
 
diff --git a/drivers/video/omap2/dss/dss.c b/drivers/video/omap2/dss/dss.c
index 1703345..77c2b5a 100644
--- a/drivers/video/omap2/dss/dss.c
+++ b/drivers/video/omap2/dss/dss.c
@@ -720,7 +720,7 @@ void dss_runtime_put(void)
 
 	DSSDBG("dss_runtime_put\n");
 
-	r = pm_runtime_put(&dss.pdev->dev);
+	r = pm_runtime_put_sync(&dss.pdev->dev);
 	WARN_ON(r < 0);
 }
 
diff --git a/drivers/video/omap2/dss/hdmi.c b/drivers/video/omap2/dss/hdmi.c
index b4c270e..c39f9c3 100644
--- a/drivers/video/omap2/dss/hdmi.c
+++ b/drivers/video/omap2/dss/hdmi.c
@@ -176,7 +176,7 @@ static void hdmi_runtime_put(void)
 
 	DSSDBG("hdmi_runtime_put\n");
 
-	r = pm_runtime_put(&hdmi.pdev->dev);
+	r = pm_runtime_put_sync(&hdmi.pdev->dev);
 	WARN_ON(r < 0);
 }
 
diff --git a/drivers/video/omap2/dss/rfbi.c b/drivers/video/omap2/dss/rfbi.c
index 814bb95..55f3980 100644
--- a/drivers/video/omap2/dss/rfbi.c
+++ b/drivers/video/omap2/dss/rfbi.c
@@ -140,7 +140,7 @@ static void rfbi_runtime_put(void)
 
 	DSSDBG("rfbi_runtime_put\n");
 
-	r = pm_runtime_put(&rfbi.pdev->dev);
+	r = pm_runtime_put_sync(&rfbi.pdev->dev);
 	WARN_ON(r < 0);
 }
 
diff --git a/drivers/video/omap2/dss/venc.c b/drivers/video/omap2/dss/venc.c
index b3e9f90..5c3d0f9 100644
--- a/drivers/video/omap2/dss/venc.c
+++ b/drivers/video/omap2/dss/venc.c
@@ -401,7 +401,7 @@ static void venc_runtime_put(void)
 
 	DSSDBG("venc_runtime_put\n");
 
-	r = pm_runtime_put(&venc.pdev->dev);
+	r = pm_runtime_put_sync(&venc.pdev->dev);
 	WARN_ON(r < 0);
 }
 
-- 
1.7.4.1


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

* Re: [PATCH 3/3] OMAPDSS: use sync versions of pm_runtime_put
  2012-01-23 12:15   ` Tomi Valkeinen
@ 2012-01-23 22:33     ` Kevin Hilman
  -1 siblings, 0 replies; 18+ messages in thread
From: Kevin Hilman @ 2012-01-23 22:33 UTC (permalink / raw)
  To: Tomi Valkeinen
  Cc: linux-omap, linux-fbdev, paul, archit, neilb, jean.pihet, jw

Tomi Valkeinen <tomi.valkeinen@ti.com> writes:

> omapdss doesn't work properly on system suspend. The problem seems to be
> the fact that omapdss uses pm_runtime_put() functions when turning off
> the hardware, and when system suspend is in process only sync versions
> are allowed.
>
> Using non-sync versions normally and sync versions when suspending would
> need rather ugly hacks to convey the information of
> suspending/not-suspending to different functions. Optimally the driver
> wouldn't even need to care about this, and the PM layer would handle
> syncing when suspend is in process.
>
> This patch changes all omapdss's pm_runtime_put calls to
> pm_runtime_put_sync. This fixes the suspend problem, and probably the
> performance penalty of always using sync versions is negligible.
>
> Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>

Acked-by: Kevin Hilman <khilman@ti.com>

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

* Re: [PATCH 3/3] OMAPDSS: use sync versions of pm_runtime_put
@ 2012-01-23 22:33     ` Kevin Hilman
  0 siblings, 0 replies; 18+ messages in thread
From: Kevin Hilman @ 2012-01-23 22:33 UTC (permalink / raw)
  To: Tomi Valkeinen
  Cc: linux-omap, linux-fbdev, paul, archit, neilb, jean.pihet, jw

Tomi Valkeinen <tomi.valkeinen@ti.com> writes:

> omapdss doesn't work properly on system suspend. The problem seems to be
> the fact that omapdss uses pm_runtime_put() functions when turning off
> the hardware, and when system suspend is in process only sync versions
> are allowed.
>
> Using non-sync versions normally and sync versions when suspending would
> need rather ugly hacks to convey the information of
> suspending/not-suspending to different functions. Optimally the driver
> wouldn't even need to care about this, and the PM layer would handle
> syncing when suspend is in process.
>
> This patch changes all omapdss's pm_runtime_put calls to
> pm_runtime_put_sync. This fixes the suspend problem, and probably the
> performance penalty of always using sync versions is negligible.
>
> Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>

Acked-by: Kevin Hilman <khilman@ti.com>

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

* Re: [PATCH 0/3] OMAP: DSS PM fixes
  2012-01-23 12:15 ` Tomi Valkeinen
@ 2012-01-25  8:04   ` Tomi Valkeinen
  -1 siblings, 0 replies; 18+ messages in thread
From: Tomi Valkeinen @ 2012-01-25  8:04 UTC (permalink / raw)
  To: Paul Walmsley
  Cc: linux-fbdev, archit, neilb, jean.pihet, khilman, jw,
	linux-omap mailing list

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

Hi Paul,

On Mon, 2012-01-23 at 14:15 +0200, Tomi Valkeinen wrote:
> Here are two fixes to get DSS work better with PM on OMAP3.
> 
> The first two patches fix the missing SYSC_HAS_ENAWAKEUP flag, which removes
> the SYNC_LOST problem.
> 
> The third patch changes omapdss to use pm_runtime_put_sync functions, which
> fixes the system suspend.
> 
> I've tested both only on v3.3-rc1, OMAP3 Overo. I get problems on system
> suspend from TWL and MTD drivers (also without my patches =), but disabling MTD
> and ignoring TWL errors shows that the warning from omapdss has disappeared,
> and I get an image on the screen on resume.
> 
> The two fixes are independent, so either I can take them through dss tree (with
> appropriate Acks), or the hwmod patches can go through some other tree.

Ping. Sorry to be hurrying with this, but I'd like to get these into the
next rc. Can you ack these (perhaps the first two patches?) or do you
want to take them through your tree?

 Tomi


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

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

* Re: [PATCH 0/3] OMAP: DSS PM fixes
@ 2012-01-25  8:04   ` Tomi Valkeinen
  0 siblings, 0 replies; 18+ messages in thread
From: Tomi Valkeinen @ 2012-01-25  8:04 UTC (permalink / raw)
  To: Paul Walmsley
  Cc: linux-fbdev, archit, neilb, jean.pihet, khilman, jw,
	linux-omap mailing list

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

Hi Paul,

On Mon, 2012-01-23 at 14:15 +0200, Tomi Valkeinen wrote:
> Here are two fixes to get DSS work better with PM on OMAP3.
> 
> The first two patches fix the missing SYSC_HAS_ENAWAKEUP flag, which removes
> the SYNC_LOST problem.
> 
> The third patch changes omapdss to use pm_runtime_put_sync functions, which
> fixes the system suspend.
> 
> I've tested both only on v3.3-rc1, OMAP3 Overo. I get problems on system
> suspend from TWL and MTD drivers (also without my patches =), but disabling MTD
> and ignoring TWL errors shows that the warning from omapdss has disappeared,
> and I get an image on the screen on resume.
> 
> The two fixes are independent, so either I can take them through dss tree (with
> appropriate Acks), or the hwmod patches can go through some other tree.

Ping. Sorry to be hurrying with this, but I'd like to get these into the
next rc. Can you ack these (perhaps the first two patches?) or do you
want to take them through your tree?

 Tomi


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

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

* Re: [PATCH 0/3] OMAP: DSS PM fixes
  2012-01-25  8:04   ` Tomi Valkeinen
@ 2012-01-25 18:55     ` Paul Walmsley
  -1 siblings, 0 replies; 18+ messages in thread
From: Paul Walmsley @ 2012-01-25 18:55 UTC (permalink / raw)
  To: Tomi Valkeinen
  Cc: linux-fbdev, archit, neilb, jean.pihet, khilman, jw,
	linux-omap mailing list

Hi Tomi,

sorry about the delay,

On Wed, 25 Jan 2012, Tomi Valkeinen wrote:

> On Mon, 2012-01-23 at 14:15 +0200, Tomi Valkeinen wrote:
> > Here are two fixes to get DSS work better with PM on OMAP3.

...

> > The two fixes are independent, so either I can take them through dss tree (with
> > appropriate Acks), or the hwmod patches can go through some other tree.
> 
> Ping. Sorry to be hurrying with this, but I'd like to get these into the
> next rc. Can you ack these (perhaps the first two patches?) or do you
> want to take them through your tree?

I'll take the two hwmod data changes through my tree here & will plan to 
send a pull request today.


regards

- Paul

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

* Re: [PATCH 0/3] OMAP: DSS PM fixes
@ 2012-01-25 18:55     ` Paul Walmsley
  0 siblings, 0 replies; 18+ messages in thread
From: Paul Walmsley @ 2012-01-25 18:55 UTC (permalink / raw)
  To: Tomi Valkeinen
  Cc: linux-fbdev, archit, neilb, jean.pihet, khilman, jw,
	linux-omap mailing list

Hi Tomi,

sorry about the delay,

On Wed, 25 Jan 2012, Tomi Valkeinen wrote:

> On Mon, 2012-01-23 at 14:15 +0200, Tomi Valkeinen wrote:
> > Here are two fixes to get DSS work better with PM on OMAP3.

...

> > The two fixes are independent, so either I can take them through dss tree (with
> > appropriate Acks), or the hwmod patches can go through some other tree.
> 
> Ping. Sorry to be hurrying with this, but I'd like to get these into the
> next rc. Can you ack these (perhaps the first two patches?) or do you
> want to take them through your tree?

I'll take the two hwmod data changes through my tree here & will plan to 
send a pull request today.


regards

- Paul

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

* Re: [PATCH 1/3] ARM: OMAP: HWMOD: split omap2/3 dispc hwmod class
  2012-01-23 12:15   ` Tomi Valkeinen
@ 2012-01-25 19:02     ` Paul Walmsley
  -1 siblings, 0 replies; 18+ messages in thread
From: Paul Walmsley @ 2012-01-25 19:02 UTC (permalink / raw)
  To: Tomi Valkeinen
  Cc: linux-omap, linux-fbdev, archit, neilb, jean.pihet, khilman, jw

On Mon, 23 Jan 2012, Tomi Valkeinen wrote:

> Currently OMAP2 and 3 share the same omap_hwmod_class and
> omap_hwmod_class_sysconfig for dispc. However, OMAP3 has sysconfig
> bits that OMAP2 doesn't have, so we need to split those structs into
> OMAP2 and OMAP3 specific versions.
> 
> This patch only splits the structs, without changing the contents.
> 
> Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>

Thanks, queued for 3.3-rc.


- Paul

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

* Re: [PATCH 1/3] ARM: OMAP: HWMOD: split omap2/3 dispc hwmod class
@ 2012-01-25 19:02     ` Paul Walmsley
  0 siblings, 0 replies; 18+ messages in thread
From: Paul Walmsley @ 2012-01-25 19:02 UTC (permalink / raw)
  To: Tomi Valkeinen
  Cc: linux-omap, linux-fbdev, archit, neilb, jean.pihet, khilman, jw

On Mon, 23 Jan 2012, Tomi Valkeinen wrote:

> Currently OMAP2 and 3 share the same omap_hwmod_class and
> omap_hwmod_class_sysconfig for dispc. However, OMAP3 has sysconfig
> bits that OMAP2 doesn't have, so we need to split those structs into
> OMAP2 and OMAP3 specific versions.
> 
> This patch only splits the structs, without changing the contents.
> 
> Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>

Thanks, queued for 3.3-rc.


- Paul

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

* Re: [PATCH 2/3] ARM: OMAP3: HWMOD: add SYSC_HAS_ENAWAKEUP for dispc
  2012-01-23 12:15   ` Tomi Valkeinen
@ 2012-01-25 19:02     ` Paul Walmsley
  -1 siblings, 0 replies; 18+ messages in thread
From: Paul Walmsley @ 2012-01-25 19:02 UTC (permalink / raw)
  To: Tomi Valkeinen
  Cc: linux-omap, linux-fbdev, archit, neilb, jean.pihet, khilman, jw

On Mon, 23 Jan 2012, Tomi Valkeinen wrote:

> dispc's sysc_flags is missing SYSC_HAS_ENAWAKEUP flag. This seems to
> cause SYNC_LOST errors from the DSS when the power management is
> enabled.
> 
> This patch adds the missing SYSC_HAS_ENAWAKEUP flag. Note that there are
> other flags missing also (clock activity, DSI's sysc flags), but as they
> are not critical, they will be fixed in the next merge window.
> 
> Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>

Thanks, queued for 3.3-rc.


- Paul

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

* Re: [PATCH 2/3] ARM: OMAP3: HWMOD: add SYSC_HAS_ENAWAKEUP for dispc
@ 2012-01-25 19:02     ` Paul Walmsley
  0 siblings, 0 replies; 18+ messages in thread
From: Paul Walmsley @ 2012-01-25 19:02 UTC (permalink / raw)
  To: Tomi Valkeinen
  Cc: linux-omap, linux-fbdev, archit, neilb, jean.pihet, khilman, jw

On Mon, 23 Jan 2012, Tomi Valkeinen wrote:

> dispc's sysc_flags is missing SYSC_HAS_ENAWAKEUP flag. This seems to
> cause SYNC_LOST errors from the DSS when the power management is
> enabled.
> 
> This patch adds the missing SYSC_HAS_ENAWAKEUP flag. Note that there are
> other flags missing also (clock activity, DSI's sysc flags), but as they
> are not critical, they will be fixed in the next merge window.
> 
> Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>

Thanks, queued for 3.3-rc.


- Paul

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

end of thread, other threads:[~2012-01-25 19:02 UTC | newest]

Thread overview: 18+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-01-23 12:15 [PATCH 0/3] OMAP: DSS PM fixes Tomi Valkeinen
2012-01-23 12:15 ` Tomi Valkeinen
2012-01-23 12:15 ` [PATCH 1/3] ARM: OMAP: HWMOD: split omap2/3 dispc hwmod class Tomi Valkeinen
2012-01-23 12:15   ` Tomi Valkeinen
2012-01-25 19:02   ` Paul Walmsley
2012-01-25 19:02     ` Paul Walmsley
2012-01-23 12:15 ` [PATCH 2/3] ARM: OMAP3: HWMOD: add SYSC_HAS_ENAWAKEUP for dispc Tomi Valkeinen
2012-01-23 12:15   ` Tomi Valkeinen
2012-01-25 19:02   ` Paul Walmsley
2012-01-25 19:02     ` Paul Walmsley
2012-01-23 12:15 ` [PATCH 3/3] OMAPDSS: use sync versions of pm_runtime_put Tomi Valkeinen
2012-01-23 12:15   ` Tomi Valkeinen
2012-01-23 22:33   ` Kevin Hilman
2012-01-23 22:33     ` Kevin Hilman
2012-01-25  8:04 ` [PATCH 0/3] OMAP: DSS PM fixes Tomi Valkeinen
2012-01-25  8:04   ` Tomi Valkeinen
2012-01-25 18:55   ` Paul Walmsley
2012-01-25 18:55     ` Paul Walmsley

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.