linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] OMAP3: hwmod_data: add HWMOD_INIT_NO_RESET flag for dss_dispc
@ 2011-12-22  1:00 Ilya Yanok
  2011-12-22 10:13 ` Tomi Valkeinen
  0 siblings, 1 reply; 3+ messages in thread
From: Ilya Yanok @ 2011-12-22  1:00 UTC (permalink / raw)
  To: linux-arm-kernel

Resetting DISPC when a DISPC output is enabled causes the DSS to go into
an inconsistent state.

commit b923d40dd4211c4ef7d4efa2bd81b7ca1d8744c1
Author: Archit Taneja <archit@ti.com>
Date:   Thu Oct 6 18:04:08 2011 -0600

    ARM: OMAP2PLUS: DSS: Ensure DSS works correctly if display is
enabled in bootloader

tries to deal with this problem by checking if display is enabled and
disabling it before doing reset.

But in my setup dss_dispc is resetted from omap_hwmod_setup_all function
_before_ calling omap_dss_reset. So when dispc_disable_outputs is
executed dispc is already reset and nothing happens.

This patch and HWMOD_INIT_NO_RESET flags to dss_dispc hwmod thus leaving
DISPC untouched so that omap_dss_reset can take care of it.

This solves the l3_app_irq BUG problem on my AM3517 based board.

CC: Archit Taneja <archit@ti.com>
CC: Paul Walmsley <paul@pwsan.com>
Signed-off-by: Ilya Yanok <yanok@emcraft.com>
---
 arch/arm/mach-omap2/omap_hwmod_3xxx_data.c |    2 +-
 1 files changed, 1 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 5324e8d..226b365 100644
--- a/arch/arm/mach-omap2/omap_hwmod_3xxx_data.c
+++ b/arch/arm/mach-omap2/omap_hwmod_3xxx_data.c
@@ -1515,7 +1515,7 @@ static struct omap_hwmod omap3xxx_dss_dispc_hwmod = {
 	},
 	.slaves		= omap3xxx_dss_dispc_slaves,
 	.slaves_cnt	= ARRAY_SIZE(omap3xxx_dss_dispc_slaves),
-	.flags		= HWMOD_NO_IDLEST,
+	.flags		= HWMOD_NO_IDLEST | HWMOD_INIT_NO_RESET,
 	.dev_attr	= &omap2_3_dss_dispc_dev_attr
 };
 
-- 
1.7.6.4

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

* [PATCH] OMAP3: hwmod_data: add HWMOD_INIT_NO_RESET flag for dss_dispc
  2011-12-22  1:00 [PATCH] OMAP3: hwmod_data: add HWMOD_INIT_NO_RESET flag for dss_dispc Ilya Yanok
@ 2011-12-22 10:13 ` Tomi Valkeinen
  2011-12-22 12:42   ` Ilya Yanok
  0 siblings, 1 reply; 3+ messages in thread
From: Tomi Valkeinen @ 2011-12-22 10:13 UTC (permalink / raw)
  To: linux-arm-kernel

On Thu, 2011-12-22 at 02:00 +0100, Ilya Yanok wrote:
> Resetting DISPC when a DISPC output is enabled causes the DSS to go into
> an inconsistent state.
> 
> commit b923d40dd4211c4ef7d4efa2bd81b7ca1d8744c1
> Author: Archit Taneja <archit@ti.com>
> Date:   Thu Oct 6 18:04:08 2011 -0600
> 
>     ARM: OMAP2PLUS: DSS: Ensure DSS works correctly if display is
> enabled in bootloader
> 
> tries to deal with this problem by checking if display is enabled and
> disabling it before doing reset.
> 
> But in my setup dss_dispc is resetted from omap_hwmod_setup_all function
> _before_ calling omap_dss_reset. So when dispc_disable_outputs is
> executed dispc is already reset and nothing happens.

Hmm, why is that? You don't have the dss hwmod before dispc in the list
of hwmods? The code presumes that dss hwmod is handled first.

> This patch and HWMOD_INIT_NO_RESET flags to dss_dispc hwmod thus leaving
> DISPC untouched so that omap_dss_reset can take care of it.

omap_dss_reset() doesn't reset dispc, so this will leave dispc
un-reseted.

The idea of the current code is to do the reset similarly on all OMAPs.
The sequence should be:

- omap_dss_reset(), which disables dispc outputs and manually resets dss
registers.
- then the rest of the dss modules reset themselves normally, using the
softreset bit.

Your patch would break that.

 Tomi

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: This is a digitally signed message part
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20111222/f0e484eb/attachment.sig>

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

* [PATCH] OMAP3: hwmod_data: add HWMOD_INIT_NO_RESET flag for dss_dispc
  2011-12-22 10:13 ` Tomi Valkeinen
@ 2011-12-22 12:42   ` Ilya Yanok
  0 siblings, 0 replies; 3+ messages in thread
From: Ilya Yanok @ 2011-12-22 12:42 UTC (permalink / raw)
  To: linux-arm-kernel

Hi Tomi,

On 22.12.2011 14:13, Tomi Valkeinen wrote:
> On Thu, 2011-12-22 at 02:00 +0100, Ilya Yanok wrote:
>> Resetting DISPC when a DISPC output is enabled causes the DSS to go into
>> an inconsistent state.
>>
>> commit b923d40dd4211c4ef7d4efa2bd81b7ca1d8744c1
>> Author: Archit Taneja <archit@ti.com>
>> Date:   Thu Oct 6 18:04:08 2011 -0600
>>
>>     ARM: OMAP2PLUS: DSS: Ensure DSS works correctly if display is
>> enabled in bootloader
>>
>> tries to deal with this problem by checking if display is enabled and
>> disabling it before doing reset.
>>
>> But in my setup dss_dispc is resetted from omap_hwmod_setup_all function
>> _before_ calling omap_dss_reset. So when dispc_disable_outputs is
>> executed dispc is already reset and nothing happens.
> 
> Hmm, why is that? You don't have the dss hwmod before dispc in the list
> of hwmods? The code presumes that dss hwmod is handled first.

Looking at the arch/arm/mach-omap2/omap_hwmod_3xxx_data.c I can see that
dss_dispc is in the list of generic hwmods which is registered first
while dss_core hwmod is in revision-specific lists which are registered
later. I think this is the real root of the problem, thanks for pointing
this out!

> 
>> This patch and HWMOD_INIT_NO_RESET flags to dss_dispc hwmod thus leaving
>> DISPC untouched so that omap_dss_reset can take care of it.
> 
> omap_dss_reset() doesn't reset dispc, so this will leave dispc
> un-reseted.
> 
> The idea of the current code is to do the reset similarly on all OMAPs.
> The sequence should be:
> 
> - omap_dss_reset(), which disables dispc outputs and manually resets dss
> registers.
> - then the rest of the dss modules reset themselves normally, using the
> softreset bit.

But currently omap_dss_reset() is called the last.

Regards, Ilya.

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

end of thread, other threads:[~2011-12-22 12:42 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-12-22  1:00 [PATCH] OMAP3: hwmod_data: add HWMOD_INIT_NO_RESET flag for dss_dispc Ilya Yanok
2011-12-22 10:13 ` Tomi Valkeinen
2011-12-22 12:42   ` Ilya Yanok

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