Skip to content

bcm2835-codec: Return empty buffers to the VPU instead of queueing to… #4961

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 1 commit into from
Mar 28, 2022

Conversation

6by9
Copy link
Contributor

@6by9 6by9 commented Mar 28, 2022

… vbuf2

The encoder can skip frames totally should rate control overshoot
the target bitrate too far. In this situation it generates an
output buffer of length 0.
V4L2 treats a buffer of length 0 as an end of stream flag, which is
not appropriate in this case, therefore we can not return that buffer
to the client.

The driver was returning the buffer to videobuf2 in the QUEUED state,
however that buffer was then not dequeued again, so the number of
buffers was reduced each time this happened. In the pathological
case of using GStreamer's videotestsrc in mode 1 for noise, this happens
sufficiently frequently to totally stall the pipeline.

If the port is still enabled then return the buffer straight back to
the VPU rather than to videobuf2.

Signed-off-by: Dave Stevenson [email protected]

… vbuf2

The encoder can skip frames totally should rate control overshoot
the target bitrate too far. In this situation it generates an
output buffer of length 0.
V4L2 treats a buffer of length 0 as an end of stream flag, which is
not appropriate in this case, therefore we can not return that buffer
to the client.

The driver was returning the buffer to videobuf2 in the QUEUED state,
however that buffer was then not dequeued again, so the number of
buffers was reduced each time this happened. In the pathological
case of using GStreamer's videotestsrc in mode 1 for noise, this happens
sufficiently frequently to totally stall the pipeline.

If the port is still enabled then return the buffer straight back to
the VPU rather than to videobuf2.

Signed-off-by: Dave Stevenson <[email protected]>
@pelwell pelwell merged commit a512180 into raspberrypi:rpi-5.15.y Mar 28, 2022
popcornmix added a commit to raspberrypi/firmware that referenced this pull request Mar 28, 2022
…ueing to vbuf2

See: raspberrypi/linux#4961

kernel: overlays/rpi-display: Add support for DRM driver
See: raspberrypi/linux#4959

kernel: backport: drm/tiny: Add MIPI DBI compatible SPI driver
See: raspberrypi/linux#4954

kernel: drivers: staging: bcm2835-isp: Clear LS table handle in the firmware
See: raspberrypi/linux#4952
popcornmix added a commit to raspberrypi/rpi-firmware that referenced this pull request Mar 28, 2022
…ueing to vbuf2

See: raspberrypi/linux#4961

kernel: overlays/rpi-display: Add support for DRM driver
See: raspberrypi/linux#4959

kernel: backport: drm/tiny: Add MIPI DBI compatible SPI driver
See: raspberrypi/linux#4954

kernel: drivers: staging: bcm2835-isp: Clear LS table handle in the firmware
See: raspberrypi/linux#4952
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.

2 participants