App v4l2_video_display and v4l2_video_capture crash in trunk when testing adv7511/adv7343/adv7511
root:/> v4l2_video_capture -I 4 -F /video_decoder_adv7842.yuv
enum inputs
input[0]: Composite
input[1]: S-Video
input[2]: Component
input[3]: VGA
input[4]: HDMI
adv7842 0-0020: select_input: HDMI todo
set input to 4: support dv_timings
dv_timings: progressive,width=1280,height=720
hfrontporch=110,hsync=40,hbackporch=220,vfrontporch=5,vsync=5,vbackporch=20
enum formats
format[0]: YCbCr 4:2:2 Interleaved UYVY
format[1]: YCbCr 4:2:2 Interleaved UYVY
negotiated formats: 1280x720
field order: progressive
size = 1843200
bytesperline = 2560
pixelformat: UYVY
frame rate setting is not supported
request 3 buffers
bufffer[0]: offset = 0, lengeth = 1843200
bufffer[1]: offset = 1843200, lengeth = 1843200
bufffer[2]: offset = 3686400, lengeth = 1843200
stream on success
open image file '/video_decoder_adv7842.yuv' success
1 frames captured, 0 error frames
------------[ cut here ]------------
WARNING: at /home/test/workspace/src/kernel/label/BF609-EZKIT-FLAT/linux/linux-kernel/drivers/media/v4l2-core/videobuf2-core.c:2011
Modules linked in:
CPU: 0 PID: 367 Comm: v4l2_video_capt Not tainted 3.15.0-ADI-2014R1-pre-00363-gd490e50 #2
task: 04109ac0 ti: 04112000 task.ti: 04112000
Compiled for cpu family 0x27fe (Rev 0), but running on:0x0000 (Rev 0)
ADSP-BF609-0.0 500(MHz CCLK) 125(MHz SCLK) (mpu off)
Linux version 3.15.0-ADI-2014R1-pre-00363-gd490e50 (test@linux88-bf609-flat) (gcc version 4.3.5 (ADI-master/git-a2bfd7b) ) #2 Sat Jul 5 17:56:13 CST 2014
SEQUENCER STATUS: Not tainted
SEQSTAT: 00000021 IPEND: 8008 IMASK: ffff SYSCFG: 2806
EXCAUSE : 0x21
physical IVG3 asserted : <0xffa00744> { _trap + 0x0 }
physical IVG15 asserted : <0xffa00d68> { _evt_system_call + 0x0 }
logical irq 6 mapped : <0xffa003bc> { _bfin_coretmr_interrupt + 0x0 }
logical irq 7 mapped : <0x00008828> { _bfin_fault_routine + 0x0 }
logical irq 8 mapped : <0x00008f10> { _dpm0_isr + 0x0 }
logical irq 11 mapped : <0x00007724> { _l2_ecc_err + 0x0 }
logical irq 13 mapped : <0x00008828> { _bfin_fault_routine + 0x0 }
logical irq 34 mapped : <0x0015a368> { _bfin_rotary_isr + 0x0 }
logical irq 39 mapped : <0x0015cdcc> { _bfin_twi_interrupt_entry + 0x0 }
logical irq 40 mapped : <0x0015cdcc> { _bfin_twi_interrupt_entry + 0x0 }
logical irq 75 mapped : <0x00131bfc> { _stmmac_interrupt + 0x0 }
logical irq 87 mapped : <0x000f6cf8> { _bfin_serial_dma_tx_int + 0x0 }
logical irq 88 mapped : <0x000f6ef8> { _bfin_serial_dma_rx_int + 0x0 }
logical irq 138 mapped : <0x00008f10> { _dpm0_isr + 0x0 }
logical irq 223 mapped : <0x00008f54> { _test_isr + 0x0 }
RETE: <0x00000000> / Maybe null pointer? /
RETN: <0x04113c88> / kernel dynamic memory /
RETX: <0x00000480> / Maybe fixed code section /
RETS: <0x0017051c> { vb2queue_cancel + 0x1c }
PC : <0x00170626> { _vb2_queue_cancel + 0x126 }
DCPLB_FAULT_ADDR: <0x0578e220> / kernel dynamic memory /
ICPLB_FAULT_ADDR: <0x00170626> { ___vb2_queue_cancel + 0x126 }
PROCESSOR STATE:
R0 : 00000001 R1 : 00000003 R2 : 00000000 R3 : 00000001
R4 : 04110100 R5 : 0578e16c R6 : 40045613 R7 : 00000001
P0 : 0401f590 P1 : 0578e16c P2 : 000000c4 P3 : 003015f4
P4 : 0022fbf8 P5 : 0578e230 FP : 04113c98 SP : 04113bac
LB0: 000cf5f6 LT0: 000cf5ee LC0: 00000000
LB1: 04aa5aff LT1: 04aa5abc LC1: 00000003
B0 : 00000000 L0 : 00000000 M0 : 00000000 I0 : 000001a1
B1 : 00000000 L1 : 00000000 M1 : 00000000 I1 : 057aa040
B2 : 00000000 L2 : 00000000 M2 : 00000000 I2 : 04140000
B3 : 00000000 L3 : 00000000 M3 : 00000000 I3 : 04140000
A0.w: 00000000 A0.x: 00000000 A1.w: 00000000 A1.x: 00000000
USP : 04d5f8bc ASTAT: 02003004
---[ end trace 4944b64d6b328bb5 ]---
Hardware Trace:
0 Target : <0x00003fb8> { _trap_c + 0x0 }
Source : <0xffa006d8> { _exception_to_level5 + 0xa0 } JUMP.L
1 Target : <0xffa00638> { _exception_to_level5 + 0x0 }
Source : <0xffa004f2> { _bfin_return_from_exception + 0x6 } RTX
2 Target : <0xffa004ec> { _bfin_return_from_exception + 0x0 }
Source : <0xffa00590> { _ex_trap_c + 0x70 } JUMP.S
3 Target : <0xffa00520> { _ex_trap_c + 0x0 }
Source : <0xffa0076e> { _trap + 0x2a } JUMP (P4)
4 Target : <0xffa00744> { _trap + 0x0 }
FAULT : <0x00170626> { vb2queue_cancel + 0x126 } BUG
Source : <0x0017053e> { _vb2_queue_cancel + 0x3e } IF !CC JUMP pcrel
5 Target : <0x0017051c> { ___vb2_queue_cancel + 0x1c }
Source : <0x0017393e> { _bcap_stop_streaming + 0x1e } RTS
6 Target : <0x00173936> { _bcap_stop_streaming + 0x16 }
Source : <0x00173996> { _bcap_stop_streaming + 0x76 } IF CC JUMP pcrel
7 Target : <0x0017398a> { _bcap_stop_streaming + 0x6a }
Source : <0x0017397c> { _bcap_stop_streaming + 0x5c } IF CC JUMP pcrel
8 Target : <0x00173962> { _bcap_stop_streaming + 0x42 }
Source : <0x00174f98> { _ppi_detach_irq + 0x28 } RTS
9 Target : <0x00174f92> { _ppi_detach_irq + 0x22 }
Source : <0x00004e5a> { _free_dma + 0x6a } RTS
10 Target : <0x00004e48> { _free_dma + 0x58 }
Source : <0x00032142> { _free_irq + 0x4a } RTS
11 Target : <0x0003213c> { _free_irq + 0x44 }
Source : <0x00032136> { _free_irq + 0x3e } IF CC JUMP pcrel
12 Target : <0x00032130> { _free_irq + 0x38 }
Source : <0x00055752> { _kfree + 0xf6 } RTS
13 Target : <0x00055740> { _kfree + 0xe4 }
Source : <0x00055736> { _kfree + 0xda } IF !CC JUMP pcrel (BP)
14 Target : <0x0005572a> { _kfree + 0xce }
Source : <0x000556f8> { _kfree + 0x9c } IF CC JUMP pcrel
15 Target : <0x000556ec> { _kfree + 0x90 }
Source : <0x00055698> { _kfree + 0x3c } IF CC JUMP pcrel (BP)
--
v4l2_video_display is already passed on master head, while v4l2_video_captur still fails as reported in bug 237.
bfin> bootm 0x2000000
Booting kernel from Legacy Image at 02000000 ...
Image Name: bf609-0.0-3.16.0-rc4-ADI-2014R1-
Image Type: Blackfin Linux Kernel Image (gzip compressed)
Data Size: 4846669 Bytes = 4.6 MiB
Load Address: 00001000
Entry Point: 002fda7c
Verifying Checksum ... OK
Uncompressing Kernel Image ... OK
Starting Kernel at = 002fda7c
Linux version 3.16.0-rc4-ADI-2014R1-pre-00394-g6adcbfa-dirty (test@linux88-bf609-flat) (gcc version 4.3.5 (ADI-master/git-46c6a72) ) #4 Thu Jul 31 06:29:35 CST 2014
register early platform devices
bootconsole [early_shadow0] enabled
ERROR: Not running on ADSP-BF609: unknown CPUID 0x0000 Rev 0.0
bootconsole [early_BFuart0] enabled
early printk enabled on early_BFuart0
Board Memory: 128MB
Kernel Managed Memory: 128MB
Memory map:
fixedcode = 0x00000400-0x00000490
text = 0x00001000-0x00201f78
rodata = 0x00201f78-0x002b4dd0
bss = 0x002b5000-0x002ce018
data = 0x002ce020-0x002fa000
stack = 0x002f8000-0x002fa000
init = 0x002fa000-0x0061c000
available = 0x0061c000-0x06000000
DMA Zone = 0x06000000-0x08000000
Hardware Trace active and enabled
Blackfin support (C) 2004-2010 Analog Devices, Inc.
Compiled for ADSP-BF609 Rev 0.0
Blackfin Linux support by http://blackfin.uclinux.org/
Processor Speed: 500 MHz core clock, 250 MHz SCLk, 125 MHz SCLK0, 125 MHz SCLK1 and 250 MHz DCLK
NOMPU: setting up cplb tables
Instruction Cache Enabled for CPU0
External memory: cacheable in instruction cache
L2 SRAM : uncacheable in instruction cache
Data Cache Enabled for CPU0
External memory: cacheable (write-back) in data cache
L2 SRAM : uncacheable in data cache
Built 1 zonelists in Zone order, mobility grouping off. Total pages: 24384
Kernel command line: root=/dev/mtdblock0 rw ip=10.100.4.50 earlyprintk=serial,uart0,57600 console=ttyBF0,57600 ip=10.100.4.50:10.100.4.174:192.168.0.1:255.255.255.0:"bf609-ezkit":eth0:off
PID hash table entries: 512 (order: -1, 2048 bytes)
Dentry cache hash table entries: 16384 (order: 4, 65536 bytes)
Inode-cache hash table entries: 8192 (order: 3, 32768 bytes)
Memory: 91136K/98304K available (2051K kernel code, 175K rwdata, 715K rodata, 3208K init, 100K bss, 7168K reserved, 32768K DMA)
NR_IRQS:291
Configuring Blackfin Priority Driven Interrupts
Console: colour dummy device 80x25
Calibrating delay loop... 995.32 BogoMIPS (lpj=1990656)
pid_max: default: 32768 minimum: 301
Mount-cache hash table entries: 1024 (order: 0, 4096 bytes)
Mountpoint-cache hash table entries: 1024 (order: 0, 4096 bytes)
devtmpfs: initialized
Blackfin Scratchpad data SRAM: 4 KB
Blackfin L1 Data A SRAM: 16 KB (9 KB free)
Blackfin L1 Data B SRAM: 16 KB (16 KB free)
Blackfin L1 Instruction SRAM: 64 KB (48 KB free)
Blackfin L2 SRAM: 256 KB (256 KB free)
pinctrl core: initialized pinctrl subsystem
NET: Registered protocol family 16
Blackfin DMA Controller
ezkit_init(): registering device resources
SCSI subsystem initialized
usbcore: registered new interface driver usbfs
usbcore: registered new interface driver hub
usbcore: registered new device driver usb
i2c-bfin-twi i2c-bfin-twi.0: Blackfin on-chip I2C TWI Contoller, regs_base@ffc01e00
i2c-bfin-twi i2c-bfin-twi.1: Blackfin on-chip I2C TWI Contoller, regs_base@ffc01f00
media: Linux media interface: v0.10
Linux video capture interface: v2.00
pps_core: LinuxPPS API ver. 1 registered
pps_core: Software ver. 5.3.6 - Copyright 2005-2007 Rodolfo Giometti giometti@linux.it
PTP clock support registered
NET: Registered protocol family 23
Switched to clocksource bfin_cs_cycles
NET: Registered protocol family 2
TCP established hash table entries: 1024 (order: 0, 4096 bytes)
TCP bind hash table entries: 1024 (order: 0, 4096 bytes)
TCP: Hash tables configured (established 1024 bind 1024)
TCP: reno registered
UDP hash table entries: 256 (order: 0, 4096 bytes)
UDP-Lite hash table entries: 256 (order: 0, 4096 bytes)
NET: Registered protocol family 1
msgmni has been set to 178
io scheduler noop registered (default)
bfin-uart: Blackfin serial driver
bfin-uart.0: ttyBF0 at MMIO 0xffc02000 (irq = 88, base_baud = 7812500) is a BFIN-UART
console [ttyBF0] enabled
console [ttyBF0] enabled
bootconsole [early_BFuart0] disabled
bootconsole [early_BFuart0] disabled
bootconsole [early_shadow0] disabled
CAN device driver interface
bfin_can bfin_can.0: bfin_can device registered(®_base=ffc00a00, rx_irq=47, tx_irq=48, err_irq=49, sclk=125000000)
stmmaceth stmmaceth.0: no reset control found
stmmac - user ID: 0x10, Synopsys ID: 0x36
Ring mode enabled
DMA HW capability register supported
Enhanced/Alternate descriptors
Enabled extended descriptors
RX Checksum Offload Engine supported (type 2)
Wake-Up On Lan supported
Enable RX Mitigation via HW Watchdog Timer
libphy: stmmac: probed
eth0: PHY ID 20005c90 at 1 IRQ POLL (stmmac-0:01) active
usbcore: registered new interface driver usb-storage
input: bfin-rotary as /devices/platform/bfin-rotary/input/input0
i2c /dev entries driver
ppi probe success
adv7343 0-002b: chip found @ 0x56 (i2c-bfin-twi)
bfin_display bfin_display.0: video device registered as: video0
bfin_wdt: initialized: timeout=20 sec (nowayout=0)
usbcore: registered new interface driver usbhid
usbhid: USB HID core driver
TCP: cubic registered
NET: Registered protocol family 17
can: controller area network core (rev 20120528 abi 9)
NET: Registered protocol family 29
can: raw protocol (rev 20120528)
can: broadcast manager protocol (rev 20120528 t)
can: netlink gateway (rev 20130117) max_hops=1
eth0: device MAC address 02:80:ad:20:31:e8
dma_alloc_init: dma_page @ 0x0485e000 - 8192 pages at 0x06000000
IP-Config: Gateway not on directly connected network
Freeing unused kernel memory: 3208K (002fa000 - 0061c000)
BusyBox v1.22.1 (2014-07-30 16:21:14 CST) hush - the humble shell
root:/>successful boot attempt ifconfigstmmaceth stmmaceth.0 eth0: Link is Up - 100Mbps/Full - flow control rx/tx
eth0 10.100.4.50
root:/> Ethernet may has been activated already!
random: nonblocking pool is initialized
version
kernel: Linux release 3.16.0-rc4-ADI-2014R1-pre-00394-g6adcbfa-dirty, build #4 Thu Jul 31 06:29:35 CST 2014
toolchain: /home/test/workspace/src/kernel/label/BF609-EZKIT-FLAT/output/host/usr/bin/bfin-uclinux-gcc release gcc version 4.3.5 (ADI-master/git-46c6a72)
user-dist: release git-919fac9, build #2 Thu Jul 31 06:25:58 CST 2014
root:/>
Linux version: 3.16.0-rc4-ADI-2014R1-pre-00394-g6adcbfa-dirty
GCC version: 4.3.5 (ADI-master/git-46c6a72)
user-dist version: git-919fac9
root:/>
** STEP 3: Start testing
PASS: rcp test file to target
PASS: rcp test file to target
v4l2_video_display -h
v4l2_video_display: option requires an argument -- h
Usage: v4l2_video_display [-DOFsdwh]
-D --device device to use (default /dev/video0)
-O --output select output (default 0)
-F --file file name (default /1.yuv)
-s --std video standard pal/ntsc (default pal)
-d --dv dv timings 720p60/720p50 (default 720p60)
-w --width image width (default 640)
-h --height image height (default 480)
root:/> v4l2_video_display -O 2 -F /ntsc_for_adv7343.yuv -s ntsc
enum outputs
output[0]: Composite
output[1]: S-Video
output[2]: Component
set output to 2: support std
set video standard to NTSC
enum formats
format[0]: UYVY 4:2:2 8bits
negotiated formats: 720x487
field order: sequential TB
size = 701280
bytesperline = 1440
pixelformat: UYVY
request 3 buffers
open image file '/ntsc_for_adv7343.yuv' success
stream on success
Case 1 ...PASS
Case 1 ...PASS
^C
root:/>
Case 2 ...PASS
Case 2 ...PASS
VIDEO ENCODER TEST (adv7343) ............[PASS]
So close this bug and track video capture failure in bug 237.