I've cloned the canny example from "C64x+ iUniversal Codec Creation - from memcpy to Canny Edge Detector" over to the DM6467T EVM and made a few modifications so that it will actually run with capture and display video. The canny app was obviously derived from the encodedecode demo, so I used the currently working encodedecode demo as my guide in making those modifications.
When I run the canny app on my DM6467T EVM, it dies with "vpif_capture vpif_capture: dma_alloc_coherent size 4149248 failed". I'm not sure why. I'm including a complete terminal session log further below.
Here's what I know.
- I previously got these warnings while building the codec, I don't if they're germane:
Warning: ti.sdo.codecs.universal_canny_ires.ce.UNIVERSAL_CANNY_IRES did not supply a max DARAM scratch size; assuming 0 bytes is sufficient.
Warning: ti.sdo.codecs.universal_canny_ires.ce.UNIVERSAL_CANNY_IRES did not supply a max SARAM scratch size; assuming 0 bytes is sufficient.
- It appears that the failure is coming out of a call to Rendezvous_meet(). When I bypass one not originally in canny (that I add to create from encodedecode), and thus ran into a Rendezvous_meet() that originally WAS coded in canny, I got the same error. So I don't think it's due to my mod. Note that the Rendezvous_meet() causes a long [stderr?] output of "reg=*, val=*", exactly like happens when I run encodedecode. So since encodedecode works doing it, I would think canny should as well. It must be the amount of dma is wrong or a setup to get the needed dma is wrong.
Please advise.
Thanks very much,
Helmut
=============== loadmodules.sh content, just in case needed =============
rmmod cmemk.ko
rmmod dsplinkk.ko
# insert cmemk, tell it to occupy physical 120MB-128MB and create enough
# contiguous buffers for the worst case requirements of the demos.
insmod cmemk.ko phys_start=0x87000000 phys_end=0x8ba00000 pools=2x921600,1x46080
0,1x1048576,1x345600,2x86400,16x564528,11x3237936,3x4147200,11x1451520
# insert dsplinkk, tell it that DSP's DDR is at physical 250MB-254MB
insmod dsplinkk.ko
# alter dma queue mapping for better visual performance
if [ -f mapdmaq-hd ]
then
./mapdmaq-hd
fi
# make /dev/dsplink
rm -f /dev/dsplink
mknod /dev/dsplink c `awk "\\$2==\"dsplink\" {print \\$1}" /proc/devices` 0
=============== TERMINAL SESSION (my comment printf in green, error in red) ============
root@dm6467t-evm:/opt/dvsdk/6467_canny# ./loadmodules.sh
root@dm6467t-evm:/opt/dvsdk/6467_canny# ./canny -p -y 3 -O composite -k (((FORUM EDIT: Run canny with passthrough)))
cmemk unregistered
CMEMK module: built on Jan 13 2010 at 18:59:45
Reference Linux version 2.6.32
File /sim/scratch_a0850430/arago-install/dvsdk_3_10_00_11/linuxutils_2_25_01_0
6/packages/ti/sdo/linuxutils/cmem/src/module/cmemk.c
allocated heap buffer 0xcb000000 of size 0x8f000
cmemk initialized
DSPLINK Module (1.64) created on Date: Jan 13 2010 Time: 18:51:20
Canny demo started.
Before threads
uiSetup() begin
UI_create()
UI_create returns 397376
Initialize values
UI_updateValue()...
UI_updateValue() passthrough
No sound support
UI_init()
UI_init returns 397376
uiSetup() end
create sync objects
Setup display thread
Create display thread
Setup capture thread
Create capture thread
Rendezvous_meet(hRendezvousCapStd) FORUM EDIT: This wasn't called because bypassed temporarily to test original form of canny
Setup video thread
Setup video thread (midway)
Setup video thread (further)
V1 unicanny_dm6467
bufSize first set to 1382400
Opened engine
Setup main thread
ctrlThrFxn(&ctrlEnv)
ctrlThrFxn() begin
Created canny
hBufTabCapture
hBufTabDisplay
V Prime Capt 0
V Prime Capt 1
V Prime Capt 2
V Prime Capt 3
before Rendezvous_meet(envp->hRendezvousInit)
reg 0, val = 2
reg 1, val = 67
reg 2, val = 20
reg 3, val = a0
reg 4, val = 80
reg 5, val = 32
reg 6, val = 20
reg 7, val = 60
reg 8, val = 0
reg 9, val = 0
reg a, val = 0
reg b, val = 80
reg c, val = 80
reg d, val = 80
reg e, val = 20
reg f, val = 2e
reg 10, val = 5d
reg 11, val = 47
reg 12, val = 0
reg 13, val = 0
reg 14, val = 6f
reg 15, val = 47
reg 16, val = 1
reg 17, val = 0
reg 18, val = 1
reg 19, val = 0
reg 1a, val = 67
reg 1b, val = 77
reg 1c, val = 7
reg 1d, val = 0
reg 1e, val = 10
reg 1f, val = 10
reg 20, val = 10
reg 21, val = 8
reg 22, val = 0
reg 23, val = 43
reg 24, val = 22
reg 25, val = 3e
reg 26, val = 80
reg 27, val = 8
reg 28, val = 53
reg 29, val = 8
reg 2a, val = 7
reg 2b, val = 0
reg 2c, val = 50
reg 2d, val = 0
reg 2e, val = 80
reg 2f, val = 8c
reg 30, val = 4
reg 31, val = 5a
reg 32, val = 18
reg 33, val = 60
reg 34, val = 3
reg 35, val = 10
reg 36, val = 0
reg 37, val = ee
reg 38, val = 22
reg 39, val = 8e
reg 3a, val = 0
reg 3b, val = 4
reg 3c, val = 5
reg 3d, val = 3
reg 3e, val = 4
reg 3f, val = 1
reg 40, val = 47
reg 41, val = 1
reg 42, val = 4b
reg 43, val = 6
reg 44, val = 5
reg 45, val = 0
reg 46, val = 2d
reg 47, val = 0
reg 48, val = 0
reg 49, val = 0
reg 4a, val = e3
reg 4b, val = 16
reg 4c, val = 4f
reg 4d, val = 2
reg 4e, val = ce
reg 4f, val = 6
reg 50, val = ab
reg 51, val = f3
reg 52, val = 0
reg 53, val = 10
reg 54, val = 55
reg 55, val = fc
reg 56, val = 78
reg 57, val = f1
reg 58, val = 88
reg 59, val = fe
reg 5a, val = 0
reg 5b, val = 10
vpif_capture vpif_capture: dma_alloc_coherent size 4149248 failed
Error: Failed to create capture device, input connected?
Capt thread cleanup
V after meet
Capt FIFO has 0 entries
V buf from capt
after Rendezvous_meet(envp->hRendezvousInit)
Command [ 'help' for usage ] > ctrlThrFxn() end
ctrlThrFxn(&ctrlEnv) complete
before cleanup: label
cleanup
root@dm6467t-evm:/opt/dvsdk/6467_canny#