Skip to content

V4L2 tweaks, and GPIO expander driver #1852

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Mar 1, 2017

Conversation

6by9
Copy link
Contributor

@6by9 6by9 commented Feb 22, 2017

1st patch is a slightly bizarre one.
The timestamp on any inline header bytes of an H264 stream comes back as 0. This patch now gives them the same timestamp as the previous frame to the header bytes.
On the VPU the header bytes are detached from any "job", and only the job has a timestamp. It might be possible to work around that and provide timestamps from the VPU, but it's an interesting question as to what the appropriate timestamp should be.

2nd is tagging keyframes correctly at the V4L2 level. The MMAL buffers already had the flags set.

3rd is as reviewed by Phil already to add a new driver to control the FXL6408 GPIO expander via the mailbox service. Supports state and direction control, and has plumbed through the power LED via DT.

6by9 added 3 commits February 21, 2017 13:25
H264 header come off VC with 0 timestamps, which means they get a
strange timestamp when processed with VC/kernel start times,
particularly if used with the inline header option.
Remember the last frame timestamp and use that if set, or otherwise
use the kernel start time.

raspberrypi#1836

Signed-off-by: Dave Stevenson <[email protected]>
Forward MMAL key frame flags to the V4L2 buffers.

Signed-off-by: Dave Stevenson <[email protected]>
Pi3 and Compute Module 3 have a GPIO expander that the
VPU communicates with.
There is a mailbox service that now allows control of this
expander, so add a kernel driver that can make use of it.

Pwr_led node added to device-tree for Pi3.

Signed-off-by: Dave Stevenson <[email protected]>
@6by9
Copy link
Contributor Author

6by9 commented Feb 23, 2017

@popcornmix Happy to merge?
Phil had reviewed the gpio-exp driver and was happy. The other two are relatively trivial V4L2 fixes.

@Electron752
Copy link
Contributor

Electron752 commented Feb 26, 2017

@6by9: Any plans to send the expander driver upstream? I know video on the RPI 3 is quite broken at the moment since HDMI connection detection isn't possible. For upstream testing, I've had to rely on the trick that simplefb gets loaded first and keep vc4 out of the config. Either that, or hack the vc4 driver to fake an always connected connection.

@6by9
Copy link
Contributor Author

6by9 commented Feb 27, 2017

Any plans to send the expander driver upstream? I know video on the RPI 3 is quite broken at the moment since HDMI connection detection isn't possible.

I had no real intentions of submitting upstream, but I'd hope it was in a state that can be accepted without too much change. I was going to send a message to the rpi-linux list once this was merged just to say it was available and let them make the call over it.

@6by9
Copy link
Contributor Author

6by9 commented Feb 27, 2017

@pelwell Anything else you want to see in here? You've already reviewed the GPIO driver.
Or are you waiting on popcornmix?

@pelwell
Copy link
Contributor

pelwell commented Feb 27, 2017

I couldn't really comment on the v4l2 changes, but with @JamesH65 behind it how could I say no?

@6by9
Copy link
Contributor Author

6by9 commented Feb 27, 2017

OK, I'm happy to wait on popcornmix to have a quick look at the V4L2 changes.

@JamesH65
Copy link
Contributor

JamesH65 commented Feb 27, 2017 via email

@pelwell
Copy link
Contributor

pelwell commented Mar 1, 2017

Ping @popcornmix.

@popcornmix popcornmix merged commit 5d1da10 into raspberrypi:rpi-4.9.y Mar 1, 2017
popcornmix added a commit to raspberrypi/firmware that referenced this pull request Mar 1, 2017
kernel:  BCM2835-V4L2: Correctly denote key frames in encoded data
kernel:  bcm2835-gpio-exp: Driver for GPIO expander via mailbox service
See: raspberrypi/linux#1852

kernel: Add overlay for ads1115 ADCs
See: raspberrypi/linux#1864

kernel: Add support for Fe-Pi audio sound card
See: raspberrypi/linux#1867

kernel: amba_pl011: Round input clock up
kernel: clk-bcm2835: Correct the prediv logic

firmware: Redo CEC code cleanup 3: Removed CEC topology computation
firmware: Redo CEC code cleanup 4: Removed unused functions
firmware: Redo CEC code cleanup 5: Removed Rx processing
firmware: Redo CEC code cleanup 6: Logging changed to VCOS
firmware: Redo CEC code cleanup 7: Removed hdmi_state_machine_clock_changed
firmware: Redo CEC code cleanup 8: fixed hdmi state machine clk
firmware: Redo CEC code cleanup 10: misc cosmetic changes
firmware: Fixup CEC code cleanup 8: fixed hdmi state machine clk
firmware: hdmi: Add way of forcing logging for hdmi and cec from boot
firmware: Redo CEC code cleanup 11: cec_release_logical_addr

firmware: arm_loader: Respect smsc95xx.macaddr parameter
See: raspberrypi/linux#1865

firmware: vec: Fix progressive scan composite mode
See: #683

firmware: vec: PAL_M mode is 525/60
See: #756

firmware: IL ISP: Support Bayer
firmware: IL ISP: Fix error in stride calcs for YUYV formats
firmware: video_render: buffer size fixup for ARGB888

firmware: video_render: Support per-pixel alpha on RGBA input
See: waveform80/picamera#199
popcornmix added a commit to Hexxeh/rpi-firmware that referenced this pull request Mar 1, 2017
kernel:  BCM2835-V4L2: Correctly denote key frames in encoded data
kernel:  bcm2835-gpio-exp: Driver for GPIO expander via mailbox service
See: raspberrypi/linux#1852

kernel: Add overlay for ads1115 ADCs
See: raspberrypi/linux#1864

kernel: Add support for Fe-Pi audio sound card
See: raspberrypi/linux#1867

kernel: amba_pl011: Round input clock up
kernel: clk-bcm2835: Correct the prediv logic

firmware: Redo CEC code cleanup 3: Removed CEC topology computation
firmware: Redo CEC code cleanup 4: Removed unused functions
firmware: Redo CEC code cleanup 5: Removed Rx processing
firmware: Redo CEC code cleanup 6: Logging changed to VCOS
firmware: Redo CEC code cleanup 7: Removed hdmi_state_machine_clock_changed
firmware: Redo CEC code cleanup 8: fixed hdmi state machine clk
firmware: Redo CEC code cleanup 10: misc cosmetic changes
firmware: Fixup CEC code cleanup 8: fixed hdmi state machine clk
firmware: hdmi: Add way of forcing logging for hdmi and cec from boot
firmware: Redo CEC code cleanup 11: cec_release_logical_addr

firmware: arm_loader: Respect smsc95xx.macaddr parameter
See: raspberrypi/linux#1865

firmware: vec: Fix progressive scan composite mode
See: raspberrypi/firmware#683

firmware: vec: PAL_M mode is 525/60
See: raspberrypi/firmware#756

firmware: IL ISP: Support Bayer
firmware: IL ISP: Fix error in stride calcs for YUYV formats
firmware: video_render: buffer size fixup for ARGB888

firmware: video_render: Support per-pixel alpha on RGBA input
See: waveform80/picamera#199
popcornmix added a commit to raspberrypi/firmware that referenced this pull request Mar 1, 2017
kernel:  BCM2835-V4L2: Correctly denote key frames in encoded data
kernel:  bcm2835-gpio-exp: Driver for GPIO expander via mailbox service
See: raspberrypi/linux#1852

kernel: Add overlay for ads1115 ADCs
See: raspberrypi/linux#1864

kernel: Add support for Fe-Pi audio sound card
See: raspberrypi/linux#1867

kernel: amba_pl011: Round input clock up
kernel: clk-bcm2835: Correct the prediv logic

firmware: Redo CEC code cleanup 3: Removed CEC topology computation
firmware: Redo CEC code cleanup 4: Removed unused functions
firmware: Redo CEC code cleanup 5: Removed Rx processing
firmware: Redo CEC code cleanup 6: Logging changed to VCOS
firmware: Redo CEC code cleanup 7: Removed hdmi_state_machine_clock_changed
firmware: Redo CEC code cleanup 8: fixed hdmi state machine clk
firmware: Redo CEC code cleanup 10: misc cosmetic changes
firmware: Fixup CEC code cleanup 8: fixed hdmi state machine clk
firmware: hdmi: Add way of forcing logging for hdmi and cec from boot
firmware: Redo CEC code cleanup 11: cec_release_logical_addr

firmware: arm_loader: Respect smsc95xx.macaddr parameter
See: raspberrypi/linux#1865

firmware: vec: Fix progressive scan composite mode
See: #683

firmware: vec: PAL_M mode is 525/60
See: #756

firmware: IL ISP: Support Bayer
firmware: IL ISP: Fix error in stride calcs for YUYV formats
firmware: video_render: buffer size fixup for ARGB888

firmware: video_render: Support per-pixel alpha on RGBA input
See: waveform80/picamera#199
popcornmix added a commit to Hexxeh/rpi-firmware that referenced this pull request Mar 1, 2017
kernel:  BCM2835-V4L2: Correctly denote key frames in encoded data
kernel:  bcm2835-gpio-exp: Driver for GPIO expander via mailbox service
See: raspberrypi/linux#1852

kernel: Add overlay for ads1115 ADCs
See: raspberrypi/linux#1864

kernel: Add support for Fe-Pi audio sound card
See: raspberrypi/linux#1867

kernel: amba_pl011: Round input clock up
kernel: clk-bcm2835: Correct the prediv logic

firmware: Redo CEC code cleanup 3: Removed CEC topology computation
firmware: Redo CEC code cleanup 4: Removed unused functions
firmware: Redo CEC code cleanup 5: Removed Rx processing
firmware: Redo CEC code cleanup 6: Logging changed to VCOS
firmware: Redo CEC code cleanup 7: Removed hdmi_state_machine_clock_changed
firmware: Redo CEC code cleanup 8: fixed hdmi state machine clk
firmware: Redo CEC code cleanup 10: misc cosmetic changes
firmware: Fixup CEC code cleanup 8: fixed hdmi state machine clk
firmware: hdmi: Add way of forcing logging for hdmi and cec from boot
firmware: Redo CEC code cleanup 11: cec_release_logical_addr

firmware: arm_loader: Respect smsc95xx.macaddr parameter
See: raspberrypi/linux#1865

firmware: vec: Fix progressive scan composite mode
See: raspberrypi/firmware#683

firmware: vec: PAL_M mode is 525/60
See: raspberrypi/firmware#756

firmware: IL ISP: Support Bayer
firmware: IL ISP: Fix error in stride calcs for YUYV formats
firmware: video_render: buffer size fixup for ARGB888

firmware: video_render: Support per-pixel alpha on RGBA input
See: waveform80/picamera#199
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants