Re: [GIT PULL] OMAP DSS for v3.5

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Jean,

On Tue, 2012-06-05 at 14:17 +0200, Jean Pihet wrote:
> Hi Tomi,

> I am using a mainline kernel (3.5.0-rc1) with the patches below integrated.
> I have an issue with suspend/resume on OMAP3 Beagleboard, where the
> system hangs at resume time.
> 
> Here below is a log with the option no_console_suspend set and a few
> added messages in case of null pointer in _od_resume_noirq.
> It looks like there is no omap_device associated to the "omapdss_dpi" pdev.
> 
> What do you think? How to fix this?
> Sorry I know there have been some discussions on the lists but I am
> not aware of all the details in the devices creation for DSS.
> 
> / # echo mem > /sys/power/state
> [   23.262298] PM: Syncing filesystems ... done.
> [   23.295501] Freezing user space processes ... (elapsed 0.02 seconds) done.
> [   23.326507] Freezing remaining freezable tasks ... (elapsed 0.02 seconds) don
> e.
> [   23.502197] PM: suspend of devices complete after 163.766 msecs
> [   23.511932] PM: late suspend of devices complete after 3.418 msecs
> [   23.524444] PM: noirq suspend of devices complete after 5.860 msecs
> [   23.531249] Disabling non-boot CPUs ...
> [   24.476562] Powerdomain (per_pwrdm) didn't enter target state 1
> [   24.482818] Powerdomain (core_pwrdm) didn't enter target state 1
> [   24.489166] Could not enter target state in pm_suspend
> [   24.495147] *** _od_resume_noirq: od=NULL, dev=0xc78bcc08
> [   24.500915] *** _od_resume_noirq: od=NULL, pdev=0xc78bcc00
> [   24.506805] *** _od_resume_noirq: od=NULL, pdev->name:omapdss_dpi
> [   24.513336] Unable to handle kernel NULL pointer dereference at virtual addre
> ss 00000018
> [   24.521942] pgd = c62f0000
> [   24.524841] [00000018] *pgd=862c1831, *pte=00000000, *ppte=00000000
> [   24.531524] Internal error: Oops: 17 [#1] SMP ARM
> [   24.536529] Modules linked in:
> [   24.539764] CPU: 0    Not tainted  (3.5.0-rc1-00010-g5041caa-dirty #131)
> [   24.546844] PC is at _od_resume_noirq+0x1c/0xac
> [   24.551635] LR is at _od_resume_noirq+0x94/0xac
> ...

I'm on leave currently, so I can't test it right now. But can you try
the attached patch? Or even better, try merging the tag:

git://gitorious.org/linux-omap-dss2/linux.git tags/omapdss-for-3.5-rc2

which contains the included patch plus a couple other fixes.

 Tomi

From 4ea30e9e0f2956b2ebcf1e81ac08d7c6691cf32d Mon Sep 17 00:00:00 2001
From: Tomi Valkeinen <tomi.valkeinen@xxxxxx>
Date: Tue, 5 Jun 2012 13:17:32 +0300
Subject: [PATCH] OMAPDSS: fix registration of DPI and SDI devices

The omapdss arch initialization code registers all the output devices as
omap_devices. However, DPI and SDI are not proper omap_devices, as they
do not have any corresponding HWMOD. This leads to crashes or problems
when the platform code tries to use omap_device functions for DPI and
SDI devices.

One such crash was reported by John Stultz <johnstul@xxxxxxxxxx>:

[   18.756835] Unable to handle kernel NULL pointer dereference at
virtual addr8
[   18.765319] pgd = ea6b8000
[   18.768188] [00000018] *pgd=aa942831, *pte=00000000, *ppte=00000000
[   18.774749] Internal error: Oops: 17 [#1] SMP ARM
[   18.779663] Modules linked in:
[   18.782836] CPU: 0    Not tainted  (3.5.0-rc1-dirty #456)
[   18.788482] PC is at _od_resume_noirq+0x1c/0x78
[   18.793212] LR is at _od_resume_noirq+0x6c/0x78
[   18.797943] pc : [<c00307ec>]    lr : [<c003083c>]    psr: 20000113
[   18.797943] sp : ec3abe80  ip : ec3abdb8  fp : 00000006
[   18.809936] r10: ec1148b8  r9 : c08a48f0  r8 : c00307d0
[   18.815368] r7 : 00000000  r6 : 00000000  r5 : ec114800  r4 :
ec114808
[   18.822174] r3 : 00000000  r2 : 00000000  r1 : ec154fe8  r0 :
00000006
[   18.829010] Flags: nzCv  IRQs on  FIQs on  Mode SVC_32  ISA ARM
Segment user
[   18.836456] Control: 10c5387d  Table: aa6b804a  DAC: 00000015
[   18.842437] Process sh (pid: 1139, stack limit = 0xec3aa2f0)
[   18.848358] Stack: (0xec3abe80 to 0xec3ac000)

DPI and SDI can be plain platform_devices. This patch changes the
registration from omap_device_register() to platform_device_add().

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@xxxxxx>
Reported-by: John Stultz <johnstul@xxxxxxxxxx>
---
 arch/arm/mach-omap2/display.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/arch/arm/mach-omap2/display.c b/arch/arm/mach-omap2/display.c
index 54d49dd..5fb47a1 100644
--- a/arch/arm/mach-omap2/display.c
+++ b/arch/arm/mach-omap2/display.c
@@ -271,9 +271,9 @@ static struct platform_device *create_simple_dss_pdev(const char *pdev_name,
 		goto err;
 	}
 
-	r = omap_device_register(pdev);
+	r = platform_device_add(pdev);
 	if (r) {
-		pr_err("Could not register omap_device for %s\n", pdev_name);
+		pr_err("Could not register platform_device for %s\n", pdev_name);
 		goto err;
 	}
 
-- 
1.7.9.5

Attachment: signature.asc
Description: This is a digitally signed message part


[Index of Archives]     [Linux Arm (vger)]     [ARM Kernel]     [ARM MSM]     [Linux Tegra]     [Linux WPAN Networking]     [Linux Wireless Networking]     [Maemo Users]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite Trails]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux