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.

DM355 NAND Flash and OSD conflict

Other Parts Discussed in Thread: 4428

I am running into an interesting conflict where my software runs fine on NFS but once run from the NAND flash gives a consistent failure as I attempt a Display_get() call for the OSD buffer.  The NAND flash is programmed with the exact same file system as the NFS, and in both cases the kernel is being booted from NAND flash.  

Having read through the forums a bit, I've seen that some people's OSD problems relate to the u-boot environment.  However, my environment is almost identical for both cases.  I have attached it below.  My video capture and display come up fine and I can see frames being displayed, but the OSD fails.

I tried moving my file system to mtdblock4 from mtdblock3 just in case, and it made no difference.  

One potential symptom is that I get a lot of messages that look like:

 

yaffs block 4389 gc prioritised

yaffs block 4399 gc prioritised

yaffs block 4428 needs retiring gc prioritised

As I go (in this case they were at bootup/mounting time), but it doesn't seem to have any negative impact that I can observe.
CE_DEBUG=2 gives the following detailed error:
@18,333,694us: [+7 T:0x40d77490] ti.sdo.dmai - [Display] Failed FBIO_WAITFORVSYNC (Connection timed out)
@21,196,620us: [+7 T:0x40d77490] ti.sdo.dmai - [Display] Failed FBIO_WAITFORVSYNC (Connection timed out)
@22,522,597us: [+7 T:0x40d77490] ti.sdo.dmai - [Display] Failed FBIO_WAITFORVSYNC (Connection timed out)
@24,508,047us: [+7 T:0x40d77490] ti.sdo.dmai - [Display] Failed FBIO_WAITFORVSYNC (Connection timed out)
@31,577,397us: [+7 T:0x40d77490] ti.sdo.dmai - [Display] Failed FBIO_WAITFORVSYNC (Connection timed out)
@38,072,841us: [+7 T:0x40d77490] ti.sdo.dmai - [Display] Failed FBIO_WAITFORVSYNC (Connection timed out)
@39,119,690us: [+7 T:0x40d77490] ti.sdo.dmai - [Display] Failed FBIO_WAITFORVSYNC (Connection timed out)
@45,689,686us: [+7 T:0x40d77490] ti.sdo.dmai - [Display] Failed FBIO_WAITFORVSYNC (Connection timed out)
@48,499,674us: [+7 T:0x40d77490] ti.sdo.dmai - [Display] Failed FBIO_WAITFORVSYNC (Connection timed out)

Is there any hardware conflict between using the NAND flash and using the OSD? 
I am using DVSDK v2.00.00.22 and the matching versions of everything else.  Inside my LSP folder I have linux-2.6.18_pro500.
u-boot environment follows:

 

 

 

 

bootdelay=3
baudrate=115200
nfshost=192.168.2.2
rootpath=/home/wblack/workdir/filesys
dnsip=192.168.2.1
bootfile=uImage
filesize=1ccf30
fileaddr=80700000
ipaddr=192.168.2.10
serverip=192.168.2.2
bootcmd=nboot 0x80700000 0 0x400000;bootm
stdin=serial
stdout=serial
stderr=serial
videostd=ntsc
bootargs=mem=116M console=ttyS0,115200n8 root=/dev/mtdblock4 rw rootfstype=yaffs2 ip=dhcp nfsroot=192.168.2.2:/home/wblack/workdir/filesys,nolock davinci_enc_mngr.ch0_output=COMPOSITE video=davincifb:vid0=0,2500K:vid1=0,2500K:osd0=720x576x16,2025K davinci_enc_mngr.ch0_mode=ntsc

 

 

For the NFS case, I execute:

setenv bootargs 'mem=116M console=ttyS0,115200n8 root=/dev/nfs rw noinitrd ip=dhcp nfsroot=192.168.2.2:/home/wblack/workdir/filesys,nolock davinci_enc_mngr.ch0_output=COMPOSITE video=davincifb:vid0=0,2500K:vid1=0,2500K:osd0=720x576x16,2025K'

boot

Which no longer sets the NTSC value - I was previously using the J1 method for that.  But NAND also was using J1 to select NTSC and it hasn't made any difference.

Also, my loadmodules.sh script goes as:

 

#!/bin/sh

 

# 12MB

insmod cmemk.ko phys_start=0x87400000 phys_end=0x88000000 pools=1x2258880,2x1529856,7x829440,1x524288,1x108680,1x81920,2x8192,6x4096

 

./mapdmaq

 

insmod dm350mmap.ko

rm -f /dev/dm350mmap

mknod /dev/dm350mmap c `awk "\\$2==\"dm350mmap\" {print \\$1}" /proc/devices` 0

root@192.168.2.6:/opt/dvsdk/dm355#

 

I added some sched_yield() and usleep() calls between retries to the Display_get() call for good measure, to no avail.

Any suggestions appreciated!

Thanks!

-Wiley

 

  • I discovered a bug where I am constantly writing a file out towards NAND.  This might have been eating all my RAM, leading to other random failures.  Although I am no longer running my file system from the NAND chip (I put my file system on mmcblk0 for now) so can't verify at the moment.