linux-fbdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] OMAP1: PM: Fix omapfb/lcd on Amstrad Delta broken when PM set
@ 2009-10-29 22:39 Janusz Krzysztofik
  2009-10-29 23:47 ` Janusz Krzysztofik
  2009-10-30 14:42 ` Janusz Krzysztofik
  0 siblings, 2 replies; 8+ messages in thread
From: Janusz Krzysztofik @ 2009-10-29 22:39 UTC (permalink / raw)
  To: Kevin Hilman
  Cc: Jonathan McDowell, Tony Lindgren, linux-omap@vger.kernel.org,
	linux-arm-kernel, Imre Deak, linux-fbdev-devel, Paul Walmsley

With CONFIG_PM=y, the omapfb/lcd device on Amstrad Delta, after initially
starting correctly, breaks with the following error messages:

omapfb omapfb: resetting (status 0xffffff96,reset count 1)
...
omapfb omapfb: resetting (status 0xffffff96,reset count 100)
omapfb omapfb: too many reset attempts, giving up.

Looking closer at this I have found that it had been broken almost 2 years ago
with commit 2418996e3b100114edb2ae110d5d4acb928909d2, PM fixes for OMAP1.

The definite reason for broken omapfb/lcd_ams_delta in PM mode appeared to be
ARM_IDLECT1:IDLIF_ARM (bit 6) put into idle. The patch below fixes it.

Created and tested against linux-2.6.32-rc5

Signed-off-by: Janusz Krzysztofik <jkrzyszt@tis.icnet.pl>

---
Hi,

I already reported this issue a few months ago, when
drivers/video/omap/lcd_ams_delta.c was proposed to get into mainline - see
http://www.spinics.net/lists/linux-omap/msg14546.html. Now I've found some
time to look at it again.

Since PM area is quite new to me, I am not sure if there may be a better
solution. AFAICS, the standard way to prevent an ARM_CLKCT1 bit being switched
to idle is to enable a clock that uses it (tipb_ck, dma_ck, or tc_ck or one of
its children in this case, right?).

I assume there is no bug in omapfb nor lcdc, as that would be already
detected. Maybe it would be better to fix drivers/video/omap/lcd_ams_delta.c
(or arch/arm/mach-omap1/board-ams-delta), but I don't know what clock should I
enable, if any.

--- linux-2.6.32-rc5/arch/arm/mach-omap1/pm.c.orig	2009-10-16 02:41:50.000000000 +0200
+++ linux-2.6.32-rc5/arch/arm/mach-omap1/pm.c	2009-10-29 22:07:58.000000000 +0100
@@ -45,6 +45,7 @@
 
 #include <asm/irq.h>
 #include <asm/atomic.h>
+#include <asm/mach-types.h>
 #include <asm/mach/time.h>
 #include <asm/mach/irq.h>
 
@@ -139,7 +140,7 @@ void omap1_pm_idle(void)
 	use_idlect1 = omap_dm_timer_modify_idlect_mask(use_idlect1);
 #endif
 
-	if (omap_dma_running())
+	if ((omap_dma_running()) || (machine_is_ams_delta()))
 		use_idlect1 &= ~(1 << 6);
 
 	/* We should be able to remove the do_sleep variable and multiple

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

end of thread, other threads:[~2009-11-11  0:02 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-10-29 22:39 [PATCH] OMAP1: PM: Fix omapfb/lcd on Amstrad Delta broken when PM set Janusz Krzysztofik
2009-10-29 23:47 ` Janusz Krzysztofik
2009-10-30 14:42 ` Janusz Krzysztofik
2009-10-30 17:33   ` Tony Lindgren
2009-11-01  1:18     ` Janusz Krzysztofik
2009-11-03 17:11       ` Tony Lindgren
2009-11-10 10:50   ` Paul Walmsley
2009-11-11  0:02     ` Janusz Krzysztofik

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