DSS2 segfault

I get a segfault for most geometry values written to /sys/devices/platform/omapfb/displays. In fact I haven't been able to change resolution by this method so far, tho it works for minor changes, say a porch tweak. I'm on the latest OE linux-omap-2.6.28 kernel.

It happens when it tries to actually apply the values. For example I can disable the display, successfully pass the values, then it will crash when I enable the display.

Here's a log:

/sys/devices/platform/omapfb# echo dvi h:800/40/88/128 v:600/1/23/4 p:40000 > displays

Unable to handle kernel NULL pointer dereference at virtual address 00000000
pgd = c71c0000
[00000000] *pgd=87bb1031, *pte=00000000, *ppte=00000000
Internal error: Oops: 817 [#1]
Modules linked in:
CPU: 0 Not tainted (2.6.28-omap1 #1)
PC is at dispc_set_lcd_timings+0x3c/0x238
LR is at dpi_set_mode+0xb0/0xc4
pc : [<c004729c>] lr : [<c0048cb4>] psr: 20000013
sp : c7b67d38 ip : c7b67d90 fp : c7b67d8c
r10: 00000001 r9 : 00000000 r8 : 00000001
r7 : c04dbb20 r6 : c04f038c r5 : 00000028 r4 : 00000001
r3 : 00000000 r2 : 00000017 r1 : 00000004 r0 : 0000007f
Flags: nzCv IRQs on FIQs on Mode SVC_32 ISA ARM Segment user
Control: 10c5387d Table: 871c0018 DAC: 00000015
Process echo (pid: 1522, stack limit = 0xc7b662e8)
Stack: (0xc7b67d38 to 0xc7b68000)
7d20: c7b67d5c c7b67d48
7d40: c00446b4 c0044480 00000003 00000001 c7b67d74 c7b67d60 c0044a70 c0044644
7d60: 00000002 00009c40 000003e8 c04f0364 c04dbb20 00000001 00000000 00000001
7d80: c7b67dec c7b67d90 c0048cb4 c004726c c7b67e10 001c5676 3dfd2400 00c65d40
7da0: 04c4b400 03dfd240 04c4b400 02625a00 00000007 00000118 0000000d 00000010
7dc0: 00000001 00000002 00000000 00000001 c7b67df8 c7b67e9c c050b0a0 00000076
7de0: c7b67e04 c7b67df0 c0048d24 c0048c10 c7b67e9c c050b0a0 c7b67f04 c7b67e08
7e00: c01be1d8 c0048cd4 c7b67ec8 c7b67ec4 00000021 c7a58404 c7b67e44 00697664
7e20: 30383a68 30342f30 2f38382f 00383231 30363a76 2f312f30 342f3332 c7b60000
7e40: c008a7f0 c008aaa8 00000044 c7b67e58 c009b83c 00000000 c0509698 00000000
7e60: 00000000 00000001 00000000 c7b66000 c05090e4 c05090e4 c008581c c0509698
7e80: 000080d0 c0509694 00000000 c78cf5e0 00000000 c7b67f70 c7b67f04 02580320
7ea0: 00009c40 00280080 00040058 00170001 03000400 00009c40 00500020 00040030
7ec0: 000f0003 00000004 00000017 00000001 00000258 00000000 22222222 c7984f38
7ee0: 00000021 c7b35420 c04dbb88 c04f4180 c7b35438 c7b67f70 c7b67f14 c7b67f08
7f00: c01dee90 c01bde40 c7b67f44 c7b67f18 c00eb85c c01dee78 c7b67f70 c70135a0
7f20: 4001e000 c7b67f70 00000021 4001e000 c7b66000 00000001 c7b67f6c c7b67f48
7f40: c00a9e80 c00eb758 00000000 00000000 00000000 00000000 c70135a0 00000021
7f60: c7b67fa4 c7b67f70 c00aa340 c00a9dd0 00000000 00000000 c0036004 00000000
7f80: ffffffff 00000021 4001e000 401ac600 00000004 c0030fc4 00000000 c7b67fa8
7fa0: c0030e40 c00aa308 00000021 4001e000 00000001 4001e000 00000021 00000000
7fc0: 00000021 4001e000 401ac600 00000004 00000021 0000001e 00000001 beda7e14
7fe0: 00000000 beda7bf8 400f578c 4014299c 60000010 00000001 00000000 00000000
Backtrace:
[<c0047260>] (dispc_set_lcd_timings+0x0/0x238) from [<c0048cb4>] (dpi_set_mode+0xb0/0xc4)
[<c0048c04>] (dpi_set_mode+0x0/0xc4) from [<c0048d24>] (dpi_set_timings+0x5c/0x70)
r6:00000076 r5:c050b0a0 r4:c7b67e9c
[<c0048cc8>] (dpi_set_timings+0x0/0x70) from [<c01be1d8>] (store_displays+0x3a4/0x4ac)
r5:c050b0a0 r4:c7b67e9c
[<c01bde34>] (store_displays+0x0/0x4ac) from [<c01dee90>] (dev_attr_store+0x24/0x28)
[<c01dee6c>] (dev_attr_store+0x0/0x28) from [<c00eb85c>] (sysfs_write_file+0x110/0x144)
[<c00eb74c>] (sysfs_write_file+0x0/0x144) from [<c00a9e80>] (vfs_write+0xbc/0x14c)
[<c00a9dc4>] (vfs_write+0x0/0x14c) from [<c00aa340>] (sys_write+0x44/0x70)
r7:00000021 r6:c70135a0 r5:00000000 r4:00000000
[<c00aa2fc>] (sys_write+0x0/0x70) from [<c0030e40>] (ret_fast_syscall+0x0/0x2c)
r8:c0030fc4 r7:00000004 r6:401ac600 r5:4001e000 r4:00000021
Code: e1d641b0 e1d621b2 9a000002 e3a03000 (e5833000)
---[ end trace a915365cc4415988 ]---
Segmentation fault

I get a segfault for most geometry values written to
/sys/devices/platform/omapfb/displays. In fact I haven't been able to
change resolution by this method so far, tho it works for minor changes, say
a porch tweak. I'm on the latest OE linux-omap-2.6.28 kernel.

It happens when it tries to actually apply the values. For example I can
disable the display, successfully pass the values, then it will crash when I
enable the display.

There was a bug in DSS2, crashing it if you gave it illegal timings. It's
been fixed in my DSS tree.

Maximum hsw is 64, you're trying 128.

  Tomi