Conversation
vrilutza
force-pushed
the
buffer-count
branch
from
September 7, 2026 08:25
95af520 to
ca2b4f3
Compare
vrilutza
force-pushed
the
buffer-count
branch
from
September 14, 2026 03:43
ca2b4f3 to
50a561d
Compare
Each queued buffer uses descriptor zero of its own list, but the debug message indexes that list with the capture-context slot. For nonzero slots it reports another descriptor, and slots four and above exceed the four-element descriptor array when debug logging is enabled. Read descriptor zero, matching the descriptor populated for this buffer. This fixes the diagnostic and makes logging safe before increasing the capture-context limit beyond four. The firmware buffer submission is unchanged. Based-on: patjak#345
The four-context limit prevents clients from allocating a deeper capture queue even when the 16 MiB budget has room. A consumer holding all four buffers leaves none available for another frame. Raise the limit to eight so clients can retain more frames while leaving buffers available to the camera. The allocation budget still constrains the actual count; eight 1296x736 YUYV buffers fit within it. This increases the permitted queue depth, not the negotiated count of every userspace pipeline. Holding all eight buffers still stalls capture. Keep the descriptor-index correction before this change so debug logging remains within the per-buffer descriptor array. Based-on: patjak#345
vrilutza
force-pushed
the
buffer-count
branch
from
September 17, 2026 08:53
50a561d to
b1a9b40
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The four-context limit prevents clients from allocating a deeper capture queue even when the 16 MiB budget can hold more frames. If a consumer retains all four buffers, the camera has none available for another frame.
This revision has two commits:
FTHD_BUFFERSfrom four to eight. The allocation budget still limits the actual count; eight 1296x736 YUYV buffers fit within it.The descriptor correction is new relative to the previous one-line PR. An extracted UBSan check reproduces the old out-of-bounds access at index four and passes with descriptor zero. The corrected combined series also captured using all eight buffer indices, with no V4L2 buffer error flags in the recorded tests.
This raises the permitted queue depth. It does not guarantee that every PipeWire client negotiates eight buffers, and retaining all eight still stalls capture. The cumulative CREATE_BUFS accounting correction is in #342; the eight-buffer tests quoted here used that correction as part of the combined series.
Validation scope: this individual rebased branch builds against Linux 7.1.13+deb14-amd64 with
W=1; the two existing compiler warnings remain. The complete nine-topic series previously passed 57/57 streaming-inclusive v4l2-compliance checks on MacBookPro14,1. Its final source tree is unchanged by the commit-message rewrite. The combined hardware tests are not nine separate hardware certifications, and no new module reload or hardware test was performed for this publication.Revision:
b1a9b40bb3d4130808a15f39cb189d81a4ba69c5.