RE: OMAP DSS Enable clocks in dss_setup_partial_planes

2011-01-20 Thread Taneja, Archit
Hi,

I am not sure if this is needed. All calls within configure_dispc()
ensure that clocks are enabled before a register write.

The functions which read/write to registers and don't enable/disable
clocks have names which start with a _(for most cases).

Regards,
Archit

linux-omap-ow...@vger.kernel.org wrote:
 From 086e3454c8f154cd90a4669899f2179f16ef32cd Mon Sep 17 00:00:00
 2001 From: Ben Tucker btuc...@mpc-data.co.uk
 Date: Thu, 13 Jan 2011 12:56:45 +
 Subject: [PATCH] OMAP DSS Enable clocks in
 dss_setup_partial_planes  Enable the interface clocks while
 calling  configure_dispc().
 
 ---
  drivers/video/omap2/dss/manager.c |2 ++
  1 files changed, 2 insertions(+), 0 deletions(-)
 
 diff --git a/drivers/video/omap2/dss/manager.c
 b/drivers/video/omap2/dss/manager.c
 index 545e9b9..cb90dac 100644
 --- a/drivers/video/omap2/dss/manager.c
 +++ b/drivers/video/omap2/dss/manager.c
 @@ -1106,7 +1106,9 @@ void dss_setup_partial_planes(struct
 omap_dss_device *dssdev, mc-w = w;
 mc-h = h;
 
 +   dss_clk_enable(DSS_CLK_ICK | DSS_CLK_FCK1);
 configure_dispc(); +   dss_clk_disable(DSS_CLK_ICK |
 DSS_CLK_FCK1); 
 
 mc-do_manual_update = false;
 
 --
 1.7.3.2--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: OMAP DSS Enable clocks in dss_setup_partial_planes

2011-01-12 Thread Tomi Valkeinen
Hi,

On Tue, 2011-01-11 at 17:41 +, ext Ben Tucker wrote:
 From 086e3454c8f154cd90a4669899f2179f16ef32cd Mon Sep 17 00:00:00 2001
 From: Ben Tucker btuc...@mpc-data.co.uk
 Date: Thu, 13 Jan 2011 12:56:45 +
 Subject: [PATCH] OMAP DSS Enable clocks in dss_setup_partial_planes
  Enable the interface clocks while calling
  configure_dispc().

This description doesn't really tell anything which isn't selfevident
from the code below. Please check
http://who-t.blogspot.com/2009/12/on-commit-messages.html

But I presume this is about RFBI. If so, correct place to enable the
clocks would be in rfbi.c.

 Tomi

 ---
  drivers/video/omap2/dss/manager.c |2 ++
  1 files changed, 2 insertions(+), 0 deletions(-)
 
 diff --git a/drivers/video/omap2/dss/manager.c
 b/drivers/video/omap2/dss/manager.c
 index 545e9b9..cb90dac 100644
 --- a/drivers/video/omap2/dss/manager.c
 +++ b/drivers/video/omap2/dss/manager.c
 @@ -1106,7 +1106,9 @@ void dss_setup_partial_planes(struct omap_dss_device
 *dssdev,
 mc-w = w;
 mc-h = h;
 
 +   dss_clk_enable(DSS_CLK_ICK | DSS_CLK_FCK1);
 configure_dispc();
 +   dss_clk_disable(DSS_CLK_ICK | DSS_CLK_FCK1);
 
 mc-do_manual_update = false;
 
 --
 1.7.3.2
 --
 To unsubscribe from this list: send the line unsubscribe linux-omap in
 the body of a message to majord...@vger.kernel.org
 More majordomo info at  http://vger.kernel.org/majordomo-info.html


--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


RE: OMAP DSS Enable clocks in dss_setup_partial_planes

2011-01-12 Thread Ben Tucker
 -Original Message-
 From: Tomi Valkeinen [mailto:tomi.valkei...@nokia.com]
 Sent: 12 January 2011 09:14
 To: ext Ben Tucker
 Cc: linux-omap@vger.kernel.org
 Subject: Re: OMAP DSS Enable clocks in dss_setup_partial_planes

 Hi,

 On Tue, 2011-01-11 at 17:41 +, ext Ben Tucker wrote:
  From 086e3454c8f154cd90a4669899f2179f16ef32cd Mon Sep 17 00:00:00
 2001
  From: Ben Tucker btuc...@mpc-data.co.uk
  Date: Thu, 13 Jan 2011 12:56:45 +
  Subject: [PATCH] OMAP DSS Enable clocks in dss_setup_partial_planes
   Enable the interface clocks while calling
 configure_dispc().

 This description doesn't really tell anything which isn't selfevident
 from the code below. Please check
 http://who-t.blogspot.com/2009/12/on-commit-messages.html

 But I presume this is about RFBI. If so, correct place to enable the
 clocks would be in rfbi.c.

  Tomi


Apologies for the commit message. Updated patch below.

Are you sure the code to enable clocks should be placed in rfbi.c? The DSI
code (dsi.c) uses dss_setup_partial_planes() in the same way as rfbi.c and
there is no clock enable code there. Also omap_dss_mgr_apply() within
manager.c enables clocks for the configure_dispc() call.

Ben


From fac7afefc4f80c3045ce73bb34e24a037ed26edc Mon Sep 17 00:00:00 2001
From: Ben Tucker btuc...@mpc-data.co.uk
Date: Sat, 15 Jan 2011 07:18:49 +
Subject: [PATCH] OMAP2,3: DSS2: Enable clocks in dss_setup_partial_planes

Fix a deadly bus halt when using RFBI or DSI interfaced panels
due to access to the OMAP DSS subsystem while interface and
peripheral clocks are disabled.
Resolved by enabling the clocks while calling the
configure_dispc() in dss_setup_partial_planes().
---
 drivers/video/omap2/dss/manager.c |2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/drivers/video/omap2/dss/manager.c
b/drivers/video/omap2/dss/manager.c
index 545e9b9..cb90dac 100644
--- a/drivers/video/omap2/dss/manager.c
+++ b/drivers/video/omap2/dss/manager.c
@@ -1106,7 +1106,9 @@ void dss_setup_partial_planes(struct omap_dss_device
*dssdev,
mc-w = w;
mc-h = h;

+   dss_clk_enable(DSS_CLK_ICK | DSS_CLK_FCK1);
configure_dispc();
+   dss_clk_disable(DSS_CLK_ICK | DSS_CLK_FCK1);

mc-do_manual_update = false;

--
1.7.3.2
--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


RE: OMAP DSS Enable clocks in dss_setup_partial_planes

2011-01-12 Thread Tomi Valkeinen
On Wed, 2011-01-12 at 11:20 +, ext Ben Tucker wrote:
  -Original Message-
  From: Tomi Valkeinen [mailto:tomi.valkei...@nokia.com]
  Sent: 12 January 2011 09:14
  To: ext Ben Tucker
  Cc: linux-omap@vger.kernel.org
  Subject: Re: OMAP DSS Enable clocks in dss_setup_partial_planes
 
  Hi,
 
  On Tue, 2011-01-11 at 17:41 +, ext Ben Tucker wrote:
   From 086e3454c8f154cd90a4669899f2179f16ef32cd Mon Sep 17 00:00:00
  2001
   From: Ben Tucker btuc...@mpc-data.co.uk
   Date: Thu, 13 Jan 2011 12:56:45 +
   Subject: [PATCH] OMAP DSS Enable clocks in dss_setup_partial_planes
Enable the interface clocks while calling
  configure_dispc().
 
  This description doesn't really tell anything which isn't selfevident
  from the code below. Please check
  http://who-t.blogspot.com/2009/12/on-commit-messages.html
 
  But I presume this is about RFBI. If so, correct place to enable the
  clocks would be in rfbi.c.
 
   Tomi
 
 
 Apologies for the commit message. Updated patch below.
 
 Are you sure the code to enable clocks should be placed in rfbi.c? The DSI
 code (dsi.c) uses dss_setup_partial_planes() in the same way as rfbi.c and
 there is no clock enable code there. Also omap_dss_mgr_apply() within
 manager.c enables clocks for the configure_dispc() call.

Usually the user should enable the clocks, in this case rfbi.c. DSI
handles this so that the clocks are always enabled when the display is
enabled. This could be easier for RFBI also, but due to legacy reasons
RFBI currently tries to keep clocks disabled except when its actually
doing something.

As for omap_dss_mgr_apply(), that function is also a user in this
case. Apply is called from outside DSS driver, usually from omapfb.

If the clk_enable/disable calls would be in the lower levels, this would
mean a) greater overhead from clk_enable/disable calls and b) context
saves and restores, as the DSS HW could go into OFF mode when the clocks
are disabled.

 Tomi


--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


OMAP DSS Enable clocks in dss_setup_partial_planes

2011-01-11 Thread Ben Tucker
From 086e3454c8f154cd90a4669899f2179f16ef32cd Mon Sep 17 00:00:00 2001
From: Ben Tucker btuc...@mpc-data.co.uk
Date: Thu, 13 Jan 2011 12:56:45 +
Subject: [PATCH] OMAP DSS Enable clocks in dss_setup_partial_planes
 Enable the interface clocks while calling
 configure_dispc().

---
 drivers/video/omap2/dss/manager.c |2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/drivers/video/omap2/dss/manager.c
b/drivers/video/omap2/dss/manager.c
index 545e9b9..cb90dac 100644
--- a/drivers/video/omap2/dss/manager.c
+++ b/drivers/video/omap2/dss/manager.c
@@ -1106,7 +1106,9 @@ void dss_setup_partial_planes(struct omap_dss_device
*dssdev,
mc-w = w;
mc-h = h;

+   dss_clk_enable(DSS_CLK_ICK | DSS_CLK_FCK1);
configure_dispc();
+   dss_clk_disable(DSS_CLK_ICK | DSS_CLK_FCK1);

mc-do_manual_update = false;

--
1.7.3.2
--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html