tc358743 - incomplete first frame

Open
#4,058 8 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
45/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Stale
Tech stack
c

Research direction

Start with the tc358743 V4L2 capture path and reproduce the issue using the listed v4l2-ctl setup and the gst-launch-1.0 command. Compare the first and second captured frames; done means the first frame sent to the application is complete and matches the following valid frame.

Written by the indexing model from the issue text.

Description

Describe the bug
First frame received by V4L2 applications from the tc358743 HDMI-to-CSI chip is partially corrupted. It looks as if the application starts receiving the frame as soon as it requests it, but this means that the first frame will be incomplete (the top part will be missing). This causes problems when recording short video clips, as it's not possible to skip the first frame easily in some frameworks.

EDIT: for GStreamer workaround, see https://github.com/raspberrypi/linux/issues/4058#issuecomment-757572284

To reproduce

  • install components of GStreamer 1.0
  • enable dtoverlay=tc358743 in /boot/config.txt to hand the control of the CSI2 peripheral and the HDMI-to-CSI bridge to the Linux kernel
  • shutdown Pi
  • connect Auvidea B101 to Raspberry using the CSI2 interface
  • boot Pi
  • send an EDID binary to the HDMI bridge: v4l2-ctl -d /dev/video0 --set-edid file=/etc/edid.bin,format=raw
  • feed a signal to the HDMI input of the bridge
  • sync timings between HDMI and CSI: v4l2-ctl --set-dv-bt-timings query
  • run
gst-launch-1.0 v4l2src device=/dev/video0 num-buffers=2 ! jpegenc ! multifilesink location=test%d.jpg

test0.jpg will contain the first, corrupted frame, test1.jpg will contain the second, valid frame.

Expected behaviour

Only complete frame data is sent to the application. - test0.jpg should be the same as test1.jpg.

Actual behaviour

First frame (test0.jpg):
test

Second frame (test1.jpg):
test1

System
Pastebin link to raspinfo output: https://pastebin.com/fb8gHFJT

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

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from raspberrypi/linux

All issues in raspberrypi/linux

Similar issues

More C issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.