unicam "hangs" - no CSI line data received?
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 30/100
- Issue type
- Bug
- Clarity
- Needs clarification
- Activity status
- Stale
- Tech stack
- c, linux
- Domain
- embedded-iot, operating-systems
Research direction
Start with the unicam ISR and receiver-status logs shown in the report, then reproduce ov9281 streaming on the Raspberry Pi CM4 with v4l2-ctl. Compare the stalled run with the later status output and determine whether the missing CSI data or recovery behavior is observable. Done requires a reproducible cause and a defined timeout, error-reporting, or recovery change.
Written by the indexing model from the issue text.
Description
Describe the bug
streaming video from an ov9281 camera, but suddenly no more frames arriving.
Unicam stuck at "lines done 400" (out of 800). No more error messages.
When I simply stop the application and open another application, e.g. v4l2-ctl --stream-mmap I get images immediately.
Would there be a timeout if the camera "hang" and would unicam report it?
What can possibly derail the CSI path that would be this instantly recoverable?
Are there any "error stats" or "missed interrupts"/counter for the unicam block?
Steps to reproduce the behaviour
start streaming from ov9281 camera and wait
Device (s)
Raspberry Pi CM4 Lite
System
$ vcgencmd version
Dec 12 2022 11:56:56
Copyright (c) 2012 Broadcom
version ed6f6b8fcdc6476410b9cf75d141633461d34bdd (clean) (release) (start)
Raspberry Pi reference 2022-07-28
Linux tester 5.15.84-v8+ #1610 SMP PREEMPT Mon Dec 19 18:54:50 GMT 2022 aarch64 GNU/Linux
Logs
( line breaks only for readability. not shortened)
[12779.337926] unicam fe800000.csi: ISR: ISTA: 0x1, STA: 0x4020, sequence 433, lines done 0
[12779.337948] unicam fe800000.csi: Scheduling dummy buffer for node 0
[12779.341276] unicam fe800000.csi: ISR: ISTA: 0x4, STA: 0x4023, sequence 433, lines done 200
[12779.344308] unicam fe800000.csi: ISR: ISTA: 0x4, STA: 0x4021, sequence 433, lines done 400
[12779.347342] unicam fe800000.csi: ISR: ISTA: 0x4, STA: 0x4023, sequence 433, lines done 600
[12779.350379] unicam fe800000.csi: ISR: ISTA: 0x0, STA: 0xC020, sequence 433, lines done 800
[12779.350545] video0: VIDIOC_DQBUF: 03:32:59.116510 index=1, type=vid-cap, request_fd=0, flags=0x00002001, field=any, sequence=433, memory=mmap, bytesused=1024000, offset/userptr=0xfa000, length=1024000
[12779.350577] timecode=00:00:00 type=0, flags=0x00000000, frames=0, userbits=0x00000000
[12779.354959] video0: VIDIOC_QBUF: 00:00:00.000000 index=1, type=vid-cap, request_fd=0, flags=0x00002003, field=any, sequence=0, memory=mmap, bytesused=1024000, offset/userptr=0xfa000, length=1024000
[12779.355000] timecode=00:00:00 type=0, flags=0x00000000, frames=0, userbits=0x00000000
[12779.377921] unicam fe800000.csi: ISR: ISTA: 0x1, STA: 0x4022, sequence 434, lines done 0
[12779.377942] unicam fe800000.csi: Scheduling dummy buffer for node 0
[12779.381271] unicam fe800000.csi: ISR: ISTA: 0x4, STA: 0x4021, sequence 434, lines done 200
[12779.384301] unicam fe800000.csi: ISR: ISTA: 0x4, STA: 0x4023, sequence 434, lines done 400
[12779.387334] unicam fe800000.csi: ISR: ISTA: 0x4, STA: 0x4021, sequence 434, lines done 600
[12779.390375] unicam fe800000.csi: ISR: ISTA: 0x0, STA: 0xC022, sequence 434, lines done 800
[12779.390448] video0: VIDIOC_DQBUF: 03:32:59.156508 index=0, type=vid-cap, request_fd=0, flags=0x00002001, field=any, sequence=434, memory=mmap, bytesused=1024000, offset/userptr=0x0, length=1024000
[12779.390478] timecode=00:00:00 type=0, flags=0x00000000, frames=0, userbits=0x00000000
[12779.395240] video0: VIDIOC_QBUF: 00:00:00.000000 index=0, type=vid-cap, request_fd=0, flags=0x00002003, field=any, sequence=0, memory=mmap, bytesused=1024000, offset/userptr=0x0, length=1024000
[12779.395283] timecode=00:00:00 type=0, flags=0x00000000, frames=0, userbits=0x00000000
[12779.417916] unicam fe800000.csi: ISR: ISTA: 0x1, STA: 0x4020, sequence 435, lines done 0
[12779.417938] unicam fe800000.csi: Scheduling dummy buffer for node 0
[12779.421269] unicam fe800000.csi: ISR: ISTA: 0x4, STA: 0x4023, sequence 435, lines done 200
[12779.424299] unicam fe800000.csi: ISR: ISTA: 0x4, STA: 0x4021, sequence 435, lines done 400
( not shortened - but PC unattended )
[13152.787211] videodev: v4l2_open: video0: open (0)
[13152.787248] video0: VIDIOC_QUERYCAP: driver=unicam, card=unicam, bus=platform:fe800000.csi, version=0x00050f54, capabilities=0xa5a00001, device_caps=0x25200001
[13152.787287] video0: VIDIOC_QUERY_EXT_CTRL: error -25: id=0xc0000000, type=0, name=, min/max=0/0, step=0, default=0, flags=0x00000000, elem_size=0, elems=0, nr_of_dims=0, dims=0,0,0,0
[13152.787328] video0: VIDIOC_TRY_EXT_CTRLS: error -25: which=0x0, count=0, error_idx=0, request_fd=0
[13152.787366] video0: VIDIOC_QUERYCTRL: error -25: id=0x80000000, type=0, name=, min/max=0/0, step=0, default=0, flags=0x00000000
[13152.787401] video0: VIDIOC_G_SELECTION: error -25: type=vid-cap, target=0, flags=0x0, wxh=0x0, x,y=0,0
[13152.787435] video0: VIDIOC_QUERYCAP: driver=unicam, card=unicam, bus=platform:fe800000.csi, version=0x00050f54, capabilities=0xa5a00001, device_caps=0x25200001
[13152.787610] video0: VIDIOC_QUERY_EXT_CTRL: error -25: id=0xc0000000, type=0, name=, min/max=0/0, step=0, default=0, flags=0x00000000, elem_size=0, elems=0, nr_of_dims=0, dims=0,0,0,0
[13152.787652] video0: VIDIOC_QUERYCTRL: error -25: id=0xc0000000, type=0, name=, min/max=0/0, step=0, default=0, flags=0x00000000
[13152.787686] video0: VIDIOC_QUERYCTRL:
[13152.789122] video0: VIDIOC_QUERYCTRL: error -25: id=0x98092a, type=0, name=, min/max=0/0, step=0, default=0, flags=0x00000000
[13152.789154] video0: VIDIOC_QUERYCTRL: error -25: id=0x8000000, type=0, name=, min/max=0/0, step=0, default=0, flags=0x00000000
[13152.789198] unicam fe800000.csi: ================= START STATUS =================
[13152.789208] unicam fe800000.csi: -----Receiver status-----
[13152.789215] unicam fe800000.csi: V4L2 width/height: 1280x800
[13152.789223] unicam fe800000.csi: Mediabus format: 00002001
[13152.789230] unicam fe800000.csi: V4L2 format: 59455247
[13152.789237] unicam fe800000.csi: Unpacking/packing: 0 / 0
[13152.789244] unicam fe800000.csi: ----Live data----
[13152.789250] unicam fe800000.csi: Programmed stride: 1280
[13152.789257] unicam fe800000.csi: Detected resolution: 640x800
[13152.789263] unicam fe800000.csi: Write pointer: db87df00
[13152.789270] unicam fe800000.csi: ================== END STATUS ==================
[13152.789276] video0: VIDIOC_LOG_STATUS
[13153.547184] video0: VIDIOC_CROPCAP: error -25: type=vid-cap, bounds wxh=0x0, x,y=0,0, defrect wxh=0x0, x,y=0,0, pixelaspect 0/0
[13153.547237] video0: VIDIOC_CROPCAP: error -25: type=vid-out, bounds wxh=0x0, x,y=0,0, defrect wxh=0x0, x,y=0,0, pixelaspect 0/0
[13153.547288] videodev: v4l2_release: video0: release
Additional context
No response
- Dominant language
- C
- Stars
- 13.2k
- Forks
- 5.5k
- Avg merge
- 2d 21h
- Merged PRs (30d)
- 21
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from raspberrypi/linux
-
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
raspberrypi/linux#7415 · 2 comments · 1 reaction ·
-
rp1-cfe doesn't forward V4L2_EVENT_SOURCE_CHANGE event from csi-2 sensor driver to userspace app Open
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
raspberrypi/linux#7399 · 1 comment ·
-
Difficulty 1/5 Under an hour Newbie friendliness 82/100
raspberrypi/linux#7357 · 1 comment ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
raspberrypi/linux#7054 · 2 comments ·
-
Difficulty 4/5 3-5 days Newbie friendliness 48/100
raspberrypi/linux#7634 · 8 comments · 1 reaction ·
All issues in raspberrypi/linux
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
zephyrproject-rtos/zephyr#119726 ·
-
[Bounty proposal] fix(web): memory insights count an evening memory on the next day ($25 proposed) Open
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
BasedHardware/omi#15320 ·
-
[adam] AdamNet network read doesn't cap to MAX_ADAM_PACKET_LEN, overflows client receive buffers Open
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
FujiNetWIFI/fujinet-firmware#1649 · 2 comments ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
HarbourMasters/Shipwright#7229 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
riscv-software-src/riscv-isa-sim#2435 · 1 comment ·