Using the TI-DVSDK 4_02_00_06 SDK and a leopardboard 365 (v1.5) I successfully wrote a C application (modeled after encodedecode dmai example) that would capture and encode composite video from the LI-VI365 video capture board.   The software built, and was installed onto a 1GB SD card.  I took that SD out of one leopard board, inserted it into a second leopard (v1.4).  On the second leopard my software always hangs waiting for the first video frame ( ioctl VIDIOC_DQBUF ).  I added some printks into the kernel source code, and it looks like  VDINT0 and VDINT1 are not firing on the second board.

I noticed the working leopard is stamped v1.5.  The non working leopard is stamped v1.4.   I can't find a data sheet for v1.4 to see what's changed.  Is there any reason why the LI-DV365 wouldn't work on v1.4?  

Attached is the output of the board that does not work.  I added the bootarg  vpfe_capture.debug=1 and vpfe_capture.interface=0.  i also added some additional printks to the davinci/vpfe_capture.c and videobuf-core.c files.  My output is usually encapsulated in ***'s.

Any help would be appreciated,

Joe

---- BOOT ARGS

console=ttyS0,115200n8 root=/dev/mmcblk0p2 rw ip=off mem=54M video=davincifb:vid0=OFF:vid1=OFF:osd0=720x576x16,4050K dm365_imp.oper_mode=0 davinci_capture.device_type=1 vpfe_capture.cont_bufsize=6291456 davinci_enc_mngr.ch0_output=COMPONENT davinci_enc_mngr.ch0_mode=480P-60 vpfe_capture.interface=0 vpfe_capture.debug=1 rootwait

------- BOOT LOG

U-Boot 2010.12-rc2 (May 31 2012 - 10:26:20)

Cores: ARM 297 MHz
DDR: 243 MHz
I2C: ready
DRAM: 128 MiB
NAND: 256 MiB
MMC: davinci: 0, davinci: 1
Bad block table found at page 131008, version 0x01
Bad block table found at page 130944, version 0x01
nand_bbt: ECC error while reading bad block table
NAND read from offset 3c0000 failed -74
*** Warning - readenv() failed, using default environment

Net: Ethernet PHY: GENERIC @ 0x00
DaVinci-EMAC
Hit any key to stop autoboot: 0
reading boot.scr

478 bytes read
## Executing script at 80600000
reading uImage

2146856 bytes read
## Booting kernel from Legacy Image at 80700000 ...
Image Name: Linux-2.6.32.17-davinci1
Created: 2012-05-31 15:31:04 UTC
Image Type: ARM Linux Kernel Image (uncompressed)
Data Size: 2146792 Bytes = 2 MiB
Load Address: 80008000
Entry Point: 80008000
Verifying Checksum ... OK
Loading Kernel Image ... OK
OK

Starting kernel ...

Uncompressing Linux.............................................................
...............................................................................
done, booting the kernel.
Linux version 2.6.32.17-davinci1 (jpulver@haunty) (gcc version 4.3.3 (Sourcery G
++ Lite 2009q1-203) ) #15 PREEMPT Thu May 31 11:30:53 EDT 2012
CPU: ARM926EJ-S [41069265] revision 5 (ARMv5TEJ), cr=00053177
CPU: VIVT data cache, VIVT instruction cache
Machine: DM365 Leopard
Memory policy: ECC disabled, Data cache writeback
DaVinci dm36x_rev1.2 variant 0x8
Built 1 zonelists in Zone order, mobility grouping off. Total pages: 13716
Kernel command line: console=ttyS0,115200n8 root=/dev/mmcblk0p2 rw ip=off mem=54
M video=davincifb:vid0=OFF:vid1=OFF:osd0=720x576x16,4050K dm365_imp.oper_mode=0
davinci_capture.device_type=1 vpfe_capture.cont_bufsize=6291456 davinci_enc_mngr
.ch0_output=COMPONENT davinci_enc_mngr.ch0_mode=480P-60 vpfe_capture.interface=0
vpfe_capture.debug=1 rootwait
PID hash table entries: 256 (order: -2, 1024 bytes)
Dentry cache hash table entries: 8192 (order: 3, 32768 bytes)
Inode-cache hash table entries: 4096 (order: 2, 16384 bytes)
Memory: 54MB = 54MB total
Memory: 50076KB available (4024K code, 392K data, 144K init, 0K highmem)
SLUB: Genslabs=11, HWalign=32, Order=0-3, MinObjects=0, CPUs=1, Nodes=1
Hierarchical RCU implementation.
NR_IRQS:245
Console: colour dummy device 80x30
Calibrating delay loop... 147.86 BogoMIPS (lpj=739328)
Mount-cache hash table entries: 512
CPU: Testing write buffer coherency: ok
DaVinci: 8 gpio irqs
NET: Registered protocol family 16
davinci_serial_init:97: failed to get UART2 clock
bio: create slab <bio-0> at 0
DM365 IPIPE initialized in Continuous mode
SCSI subsystem initialized
usbcore: registered new interface driver usbfs
usbcore: registered new interface driver hub
usbcore: registered new device driver usb
vpss vpss: dm365_vpss vpss probed
vpss vpss: dm365_vpss vpss probe success
dm365_afew_hw_init
ch0 default output "COMPONENT", mode "480P-60"
VPBE Encoder Initialized
cfg80211: Using static regulatory domain info
cfg80211: Regulatory domain: US
(start_freq - end_freq @ bandwidth), (max_antenna_gain, max_eirp)
(2402000 KHz - 2472000 KHz @ 40000 KHz), (600 mBi, 2700 mBm)
(5170000 KHz - 5190000 KHz @ 40000 KHz), (600 mBi, 2300 mBm)
(5190000 KHz - 5210000 KHz @ 40000 KHz), (600 mBi, 2300 mBm)
(5210000 KHz - 5230000 KHz @ 40000 KHz), (600 mBi, 2300 mBm)
(5230000 KHz - 5330000 KHz @ 40000 KHz), (600 mBi, 2300 mBm)
(5735000 KHz - 5835000 KHz @ 40000 KHz), (600 mBi, 3000 mBm)
cfg80211: Calling CRDA for country: US
LogicPD encoder initialized
Switching to clocksource timer0_1
musb_hdrc: version 6.0, cppi-dma, host, debug=0
musb_hdrc: USB Host mode controller at fec64000 using DMA, IRQ 12
musb_hdrc musb_hdrc: MUSB HDRC host driver
musb_hdrc musb_hdrc: new USB bus registered, assigned bus number 1
usb usb1: configuration #1 chosen from 1 choice
hub 1-0:1.0: USB hub found
hub 1-0:1.0: 1 port detected
NET: Registered protocol family 2
IP route cache hash table entries: 1024 (order: 0, 4096 bytes)
TCP established hash table entries: 2048 (order: 2, 16384 bytes)
TCP bind hash table entries: 2048 (order: 1, 8192 bytes)
TCP: Hash tables configured (established 2048 bind 2048)
TCP reno registered
NET: Registered protocol family 1
RPC: Registered udp transport module.
RPC: Registered tcp transport module.
RPC: Registered tcp NFSv4.1 backchannel transport module.
JFFS2 version 2.2. (NAND) © 2001-2006 Red Hat, Inc.
msgmni has been set to 97
alg: No test for stdrng (krng)
io scheduler noop registered
io scheduler anticipatory registered (default)
davincifb davincifb.0: dm_osd0_fb: Initial window configuration is invalid.
Console: switching to colour frame buffer device 90x36
davincifb davincifb.0: dm_osd0_fb: 720x576x16@0,0 with framebuffer size 4050KB
davincifb davincifb.0: dm_vid0_fb: 0x0x16@0,0 with framebuffer size 1020KB
davincifb davincifb.0: dm_osd1_fb: 720x480x4@0,0 with framebuffer size 675KB
davincifb davincifb.0: dm_vid1_fb: 0x0x16@0,0 with framebuffer size 1020KB
DM365 IPIPEIF probed
imp serializer initialized
davinci_previewer initialized
davinci_resizer initialized
Serial: 8250/16550 driver, 2 ports, IRQ sharing disabled
serial8250.0: ttyS0 at MMIO 0x1c20000 (irq = 40) is a 16550A
console [ttyS0] enabled
serial8250.0: ttyS1 at MMIO 0x1d06000 (irq = 41) is a 16550A
brd: module loaded
console [netcon0] enabled
netconsole: network logging started
Initializing USB Mass Storage driver...
usbcore: registered new interface driver usb-storage
USB Mass Storage support registered.
usbcore: registered new interface driver usbtest
mice: PS/2 mouse device common for all mice
i2c /dev entries driver
Linux video capture interface: v2.00
ths7303 1-002c: chip found @ 0x58 (DaVinci I2C adapter)
vpfe_init
vpfe-capture: vpss clock vpss_master enabled
vpfe-capture vpfe-capture: v4l2 device registered
vpfe-capture vpfe-capture: video device registered
Leopard: switch to tvp5146 SD video input
tvp514x 1-005d: tvp514x 1-005d decoder driver registered !!
vpfe-capture vpfe-capture: v4l2 sub device tvp5146 registered
vpfe_register_ccdc_device: DM365 ISIF
DM365 ISIF is registered with vpfe.
af major#: 252, minor# 0
AF Driver initialized
aew major#: 251, minor# 0
AEW Driver initialized
Trying to register davinci display video device.
layer=c20ad400,layer->video_dev=c20ad570
Trying to register davinci display video device.
layer=c20ad800,layer->video_dev=c20ad970
davinci_init:DaVinci V4L2 Display Driver V1.0 loaded
watchdog watchdog: heartbeat 60 sec
davinci_mmc davinci_mmc.0: Using DMA, 4-bit mode
usbcore: registered new interface driver usbhid
usbhid: v2.6:USB HID core driver
Advanced Linux Sound Architecture Driver Version 1.0.21.
No device for DAI tlv320aic3x
No device for DAI davinci-i2s
asoc: tlv320aic3x <-> davinci-i2s mapping ok
ALSA device list:
#0: DaVinci EVM (tlv320aic3x)
TCP cubic registered
NET: Registered protocol family 17
lib80211: common routines for IEEE802.11 drivers
davinci_emac_probe: using random MAC addr: be:e0:29:41:af:2e
emac-mii: probed
Waiting for root device /dev/mmcblk0p2...
mmc0: host does not support reading read-only switch. assuming write-enable.
mmc0: new high speed SDHC card at address 1234
mmcblk0: mmc0:1234 SA04G 3.68 GiB
mmcblk0: p1 p2
kjournald starting. Commit interval 5 seconds
EXT3 FS on mmcblk0p2, internal journal
EXT3-fs: mounted filesystem with writeback data mode.
VFS: Mounted root (ext3 filesystem) on device 179:2.
Freeing init memory: 144K
INIT: version 2.86 booting
Please wait: booting...
Starting udev
Remounting root file system...
NET: Registered protocol family 10
ALSA: Restoring mixer settings...
Configuring network interfaces... done.
Setting up IP spoofing protection: rp_filter.
Thu Mar 24 20:06:00 UTC 2011
INIT: Entering runlevel: 5
Starting system message bus: dbus.
Starting Dropbear SSH server: dropbear.
Starting syslogd/klogd: done
CMEMK module: built on Mar 27 2012 at 11:14:12
Reference Linux version 2.6.32
File /home/jpulver/ti-dvsdk_dm365-evm_4_02_00_06/linuxutils_2_26_01_02/package
s/ti/sdo/linuxutils/cmem/src/module/cmemk.c
allocated heap buffer 0xc5000000 of size 0x4400000
heap fallback enabled - will try heap if pool buffer is not available
CMEM Range Overlaps Kernel Physical - allowing overlap
CMEM phys_start (0x1000) overlaps kernel (0x80000000 -> 0x83600000)
cmemk initialized
IRQK module: built on Mar 27 2012 at 11:14:20
Reference Linux version 2.6.32
File /home/jpulver/ti-dvsdk_dm365-evm_4_02_00_06/linuxutils_2_26_01_02/package
s/ti/sdo/linuxutils/irq/src/module/irqk.c
irqk initialized
EDMAK module: built on Mar 27 2012 at 11:14:24
Reference Linux version 2.6.32
File /home/jpulver/ti-dvsdk_dm365-evm_4_02_00_06/linuxutils_2_26_01_02/package
s/ti/sdo/linuxutils/edma/src/module/edmak.c
/etc/init.d/rc: line 172: /etc/rc5.d/S99rtpavserver: Permission denied

_____ _____ _ _
| _ |___ ___ ___ ___ | _ |___ ___ |_|___ ___| |_
| | _| .'| . | . | | __| _| . | | | -_| _| _|
|__|__|_| |__,|_ |___| |__| |_| |___|_| |___|___|_|
|___| |___|

Arago Project http://arago-project.org dm365-leopard ttyS0

Arago 2011.02 dm365-leopard ttyS0

dm365-leopard login: root
Password: EXT3 FS on mmcblk0p2, internal journal
Login timed out after 60 seconds

_____ _____ _ _
| _ |___ ___ ___ ___ | _ |___ ___ |_|___ ___| |_
| | _| .'| . | . | | __| _| . | | | -_| _| _|
|__|__|_| |__,|_ |___| |__| |_| |___|_| |___|___|_|
|___| |___|

Arago Project http://arago-project.org dm365-leopard ttyS0

Arago 2011.02 dm365-leopard ttyS0

dm365-leopard login: davinci_resizer davinci_resizer.2: RSZ_G_CONFIG:0:1:124
vpfe-capture vpfe-capture:
***vpfe_open***

***ccdc_set_image_window[0 (0)]( t0, l0, w640,h480)******
vpfe-capture vpfe-capture: IPIPE Chained
vpfe-capture vpfe-capture: Resizer present
vpfe-capture vpfe-capture: second output present
vpfe-capture vpfe-capture:
***vpfe_s_inpupt***
Leopard: switch to tvp5146 SD video input
tvp514x 1-005d: tvp5146 (Version - 0x03) found at 0xba (DaVinci I2C adapter)
tvp514x 1-005d: Reg(0x00): 0x05
tvp514x 1-005d: Reg(0x01): 0x0F
tvp514x 1-005d: Reg(0x02): 0x00
tvp514x 1-005d: Reg(0x03): 0x00
tvp514x 1-005d: Reg(0x05): 0x10
tvp514x 1-005d: Reg(0x06): 0x00
tvp514x 1-005d: Reg(0x07): 0x00
tvp514x 1-005d: Reg(0x08): 0x02
tvp514x 1-005d: Reg(0x09): 0x80
tvp514x 1-005d: Reg(0x0A): 0x80
tvp514x 1-005d: Reg(0x0B): 0x80
tvp514x 1-005d: Reg(0x0C): 0x00
tvp514x 1-005d: Reg(0x0D): 0x00
tvp514x 1-005d: Reg(0x0E): 0x0E
tvp514x 1-005d: Reg(0x10): 0x80
tvp514x 1-005d: Reg(0x11): 0x80
tvp514x 1-005d: Reg(0x12): 0x80
tvp514x 1-005d: Reg(0x14): 0x80
tvp514x 1-005d: Reg(0x16): 0x55
tvp514x 1-005d: Reg(0x17): 0x00
tvp514x 1-005d: Reg(0x18): 0x25
tvp514x 1-005d: Reg(0x19): 0x03
tvp514x 1-005d: Reg(0x1A): 0x00
tvp514x 1-005d: Reg(0x1B): 0x00
tvp514x 1-005d: Reg(0x1C): 0x40
tvp514x 1-005d: Reg(0x1D): 0x00
tvp514x 1-005d: Reg(0x1E): 0x04
tvp514x 1-005d: Reg(0x1F): 0x00
tvp514x 1-005d: Reg(0x20): 0x07
tvp514x 1-005d: Reg(0x21): 0x00
tvp514x 1-005d: Reg(0x22): 0x01
tvp514x 1-005d: Reg(0x23): 0x00
tvp514x 1-005d: Reg(0x24): 0x15
tvp514x 1-005d: Reg(0x25): 0x00
tvp514x 1-005d: Reg(0x32): 0x0C
tvp514x 1-005d: Reg(0x33): 0x00
tvp514x 1-005d: Reg(0x34): 0x11
tvp514x 1-005d: Reg(0x35): 0xEE
tvp514x 1-005d: Reg(0x36): 0xAF
tvp514x 1-005d: Reg(0x37): 0xFF
tvp514x 1-005d: Reg(0x38): 0xFF
tvp514x 1-005d: Reg(0x39): 0x01

***ccdc_set_image_window[0 (0)]( t0, l0, w640,h480)******
vpfe-capture vpfe-capture:
***vpfe_g_inpupt***
vpfe-capture vpfe-capture:
***vpfe_s_std***

***ccdc_set_image_window[0 (0)]( t0, l0, w640,h480)******
vpfe-capture vpfe-capture: width = 736, height = 480, bpp = 1
vpfe-capture vpfe-capture: adjusted width = 736, height = 480, bpp = 1, bytesper
line = 736, sizeimage = 529920
vpfe-capture vpfe-capture: width = 736, height = 480, bpp = 1
vpfe-capture vpfe-capture: adjusted width = 736, height = 480, bpp = 1, bytesper
line = 736, sizeimage = 529920
vpfe-capture vpfe-capture:
***vpfe_videobuf_setup***
vpfe-capture vpfe-capture:
***vpfe_videobuf_prepare***
vpfe-capture vpfe-capture:
***vpfe_videobuf_prepare***
vpfe-capture vpfe-capture:
***vpfe_videobuf_prepare***
vpfe-capture vpfe-capture:
***vpfe_videobuf_prepare***
vpfe-capture vpfe-capture:
***vpfe_streamon***
vpfe-capture vpfe-capture:
***vpfe_videobuf_queue***
vpfe-capture vpfe-capture:
***vpfe_videobuf_queue***
vpfe-capture vpfe-capture:
***vpfe_videobuf_queue***
vpfe-capture vpfe-capture:
***vpfe_videobuf_queue***
vpfe-capture vpfe-capture:
***streamon - attach irq***
vpfe-capture vpfe-capture:
***attach_irq vpfe_capture0 vpfe_isr***
vpfe-capture vpfe-capture:
***streamon - outi***
vpfe-capture vpfe-capture:
***vpfe_dqbuf***
vpfe-capture vpfe-capture:
***calling videobuf_dqbuf***

***videobuf_dqbuf: blocking 0

***videobuf_dqbuf: lock

***videobuf_dqbuf: stream_next_buffer

----