This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

Trouble Loading VPSS Video Driver for TI8168

Other Parts Discussed in Thread: PCF8575, THS7375

We designed a custom board with the DM8168 processor and have no some trouble to load the VPSS video driver.

The board is equiped with 1GB RAM, but other than the EVM, it's only connected to EMIF0.

We are using the EZDSK 5_05_02_00 and therefore the included LINUX PSP 04.04.00.01.

The included guide for the VPSS driver says to set the HDVPSS notify memory to address 0xA0000000, so our complete bootargs are: "console=ttyO1,115200n8 rootwait root=/dev/mtdblock3 rw rootfstype=jffs2 mem=364M noinitrd notifyk.vpssm3_sva=0xA0000000 vram=50M ti816xfb.vram=0:16M,1:16M,2:6M ip=10.0.0.5:10.0.0.100:0.0.0.0:255.255.255.0::eth0:off" (Yes we use another tty device than the EVM indeed.)

After booting the kernel we execute the following commands: 1. insmod syslink.ko, which will be "answered" by "SysLink version : 2.20.02.20"

2. ./slaveloader startup VPSS-M3 ti816x_hdvpss.xem3 (whereby we are using the version 01_00_01_37) The result is: Attached to slave procId 2.
Loading procId 2.
Loaded file firmware on slave procId 2.
Started slave procId 2.

3. insmod vpss.ko sbufaddr=0xA0200000

The third call results in the following segmentation fault:

Unable to handle kernel NULL pointer dereference at virtual address 00000002
pgd = d2318000
[00000002] *pgd=922ab031, *pte=00000000, *ppte=00000000
Internal error: Oops: 17 [#1]
last sysfs file: /sys/kernel/uevent_seqnum
Modules linked in: vpss(+) syslink
CPU: 0    Not tainted  (2.6.37 #13)
PC is at pcf8575_ths7375_enable+0x30/0x78
LR is at vps_dc_init+0xbcc/0xd48 [vpss]
pc : [<c0059e88>]    lr : [<bf15dcf8>]    psr: 60000013
sp : d2911d60  ip : d2911d98  fp : d2911d94
r10: 00000000  r9 : 00000000  r8 : d2911d64
r7 : 00000000  r6 : bf1572ac  r5 : c047bbc0  r4 : 00000000
r3 : 00000000  r2 : 0000000c  r1 : 00000000  r0 : d2911d64
Flags: nZCv  IRQs on  FIQs on  Mode SVC_32  ISA ARM  Segment user
Control: 10c5387d  Table: 92318019  DAC: 00000015
Process insmod (pid: 1051, stack limit = 0xd29102e8)
Stack: (0xd2911d60 to 0xd2912000)
1d60: 00000000 00000003 d2911d94 00000004 00000000 00000004 00000000 bf1572ac
1d80: bf15716c c0458610 d2911e0c d2911d98 bf15dcf8 c0059e64 00000003 d2b1cc00
1da0: 00000000 c0458600 c046d528 00000002 00000003 00000002 00000004 00000000
1dc0: 00000000 00000000 00000000 c0458600 d2911e0c d2911de0 0000057c 0000057c
1de0: 00000000 c0458600 00000000 bf1575c0 d29b5000 c046d528 d2910000 00000000
1e00: d2911e2c d2911e10 bf148118 bf15d138 c0458608 c0458608 bf15712c d29b5000
1e20: d2911e3c d2911e30 c0222710 bf148070 d2911e5c d2911e40 c022167c c02226fc
1e40: c0458608 c045863c bf15712c d29b5000 d2911e7c d2911e60 c02217a4 c02215b8
1e60: 00000000 c022173c bf15712c d29b5000 d2911ea4 d2911e80 c0220e28 c0221748
1e80: d341bfb8 d34661b0 c01e0a98 00000000 bf157118 bf15712c d2911eb4 d2911ea8
1ea0: c02214a0 c0220de4 d2911ee4 d2911eb8 c0220700 c022148c bf15385f d2911ec8
1ec0: 00000000 bf157118 bf15712c 00012028 bf15d000 00000000 d2911f0c d2911ee8
1ee0: c0221adc c0220658 00000000 bf157118 00012008 00012028 bf15d000 d2910000
1f00: d2911f1c d2911f10 c02229fc c0221a38 d2911f34 d2911f20 c0222a30 c02229bc
1f20: 00000000 bf15749c d2911f44 d2911f38 bf15d030 c0222a1c d2911f7c d2911f48
1f40: c003842c bf15d00c bf15749c 00012008 00012028 c0042fa8 00000000 bf15749c
1f60: 00012008 00012028 c0042fa8 00000000 d2911fa4 d2911f80 c0095c68 c0038368
1f80: c00c157c c00c1494 00000000 00020000 00000003 00000080 00000000 d2911fa8
1fa0: c0042e00 c0095bd8 00000000 00020000 00012028 0001d29f 00012008 00000001
1fc0: 00000000 00020000 00000003 00000080 00012008 00000000 00012028 00000000
1fe0: bede5ed4 bede5c6c 00008da0 4022c7d4 60000010 00012028 68735f71 6900776f
Backtrace:
[<c0059e58>] (pcf8575_ths7375_enable+0x0/0x78) from [<bf15dcf8>] (vps_dc_init+0xbcc/0xd48 [vpss])
 r8:c0458610 r7:bf15716c r6:bf1572ac r5:00000000 r4:00000004
[<bf15d12c>] (vps_dc_init+0x0/0xd48 [vpss]) from [<bf148118>] (vps_probe+0xb4/0x174 [vpss])
[<bf148064>] (vps_probe+0x0/0x174 [vpss]) from [<c0222710>] (platform_drv_probe+0x20/0x24)
 r7:d29b5000 r6:bf15712c r5:c0458608 r4:c0458608
[<c02226f0>] (platform_drv_probe+0x0/0x24) from [<c022167c>] (driver_probe_device+0xd0/0x190)
[<c02215ac>] (driver_probe_device+0x0/0x190) from [<c02217a4>] (__driver_attach+0x68/0x8c)
 r7:d29b5000 r6:bf15712c r5:c045863c r4:c0458608
[<c022173c>] (__driver_attach+0x0/0x8c) from [<c0220e28>] (bus_for_each_dev+0x50/0x84)
 r7:d29b5000 r6:bf15712c r5:c022173c r4:00000000
[<c0220dd8>] (bus_for_each_dev+0x0/0x84) from [<c02214a0>] (driver_attach+0x20/0x28)
 r6:bf15712c r5:bf157118 r4:00000000
[<c0221480>] (driver_attach+0x0/0x28) from [<c0220700>] (bus_add_driver+0xb4/0x234)
[<c022064c>] (bus_add_driver+0x0/0x234) from [<c0221adc>] (driver_register+0xb0/0x13c)
[<c0221a2c>] (driver_register+0x0/0x13c) from [<c02229fc>] (platform_driver_register+0x4c/0x60)
 r9:d2910000 r8:bf15d000 r7:00012028 r6:00012008 r5:bf157118
r4:00000000
[<c02229b0>] (platform_driver_register+0x0/0x60) from [<c0222a30>] (platform_driver_probe+0x20/0x70)
[<c0222a10>] (platform_driver_probe+0x0/0x70) from [<bf15d030>] (vps_init+0x30/0x5c [vpss])
 r5:bf15749c r4:00000000
[<bf15d000>] (vps_init+0x0/0x5c [vpss]) from [<c003842c>] (do_one_initcall+0xd0/0x1a4)
[<c003835c>] (do_one_initcall+0x0/0x1a4) from [<c0095c68>] (sys_init_module+0x9c/0x1bc)
[<c0095bcc>] (sys_init_module+0x0/0x1bc) from [<c0042e00>] (ret_fast_syscall+0x0/0x30)
 r7:00000080 r6:00000003 r5:00020000 r4:00000000
Code: e3a0200c e1a00008 e5957000 e2044003 (e1d760b2)
---[ end trace fc48042429844b70 ]---
Segmentation fault

I don't understand what I am doing wrong. For any help you could provide I'm very thankful in advance.

At least I'm not sure about a few things:

In the document: http://processors.wiki.ti.com/index.php/EZSDK_Memory_Map it says for 1GB RAM the notify memory is 0xBF900000 and the according sbuf would be 0xBFB00000. Further the document always refers to "firmware_loader" instead of "slaveloader" as the tool to download the M3 firmware.

(The EVM, by the way, is using the address 0xBF900000 in the bootargs, but the running linux there is build using another EZSDK version, as far is I understand.)

Is it necessary to load the firmware of the HDVICP Core too, as it is done on the EVM?

Update:

Reading my post again, I've discovered that obviously the crash occurs in the function pcf8575_ths7375_enable. Since out board has no pcf8575 I'm quite convinced, that the error lies in accessing an non existent device. Seems like I need to get a wider understanding of the loading process of the VPSS driver, since I have no idea why removing the pfc8575 related parts from board specific files inside of /arch/arm/mach-omap2 in the linux sources is not enough. I though removing it there would do the trick. But obviously I'm wrong.

  • Hi,

    This crash is seen since you dont  have pcf io expander on your board. Make sure that you remove calls to io expander as a part of vpss.ko loading. Search for pcf8575_ths7375_enable in folder /drivers/video/ti81xx. These are board changes to be done.

  • Yeah, you were right. I removed the calls from the file /drivers/video/ti81xx/vpss/dctrl.c and now the module is loaded properly. Thanks.

    But I'm still a little bit concerned about the different memory maps. In http://processors.wiki.ti.com/index.php/EZSDK_Memory_Map it says the notify memory for 1G layout is located at 0xBF900000. But in our VPSS video driver user guide (lies as pdf in our ezsdk board support directory: $EZSDK/board-support/docs/TI81XX_VPSS_Video_Driver_User_Guide.pdf) it's at 0xA0000000. So I am using 0xA0000000 (via bootargs notifyk.vpssm3_sva=0xA0000000), but this is totaly in conflict with the 320M linux memory said to be at 0x9FC00000 in the mentioned EZSDK memory map document. I for now just omit this 320M of linux memory. But I would like to now how this different documents work together. Which is the right memory layout? Why is it different anyway?

  • Hi Peter,

    The EZSDK_Memory_Map is correct (0xBF900000) when you are using the EZSDK file system ({EZSDK}/filesystem/ezsdk-dm816x-evm-rootfs.tar.gz)

    The VPSS driver user guide (0xA0000000) is giving the address when ARAGO file system is used ({EZSDK}/filesystem/arago-base-tisdk-image-dm816x-evm.tar.gz)

    We have the following note in the TI81XX_VPSS_Video_Driver_User_Guide.pdf:

    The addresses of notifyk.vpssm3_sva and vpss.sbufaddr mentioned in this userguide apply only to the M3 firmware inside PSP package. For the M3 firmware from TI SDK package, please check SDK document to get right address for notifyk.vpssm3_sva and vpss.sbufaddr

    Regards,

    Pavel

  • OK. Thanks for that information. You are right: Using the M3 firmware from the psp it works with 0xA0000000, using the firmware provided with the EZSDK (in the EZSDK file system /usr/share/ti/ti-media-controller-utils) which is by the way more than twice as big, it works fine with 0xBF900000.