-
Notifications
You must be signed in to change notification settings - Fork 5k
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
V4L2 Improvements - videobuf2_contig allocator #1807
Comments
Overlays can add items to the kernel command line - see the vc4-kms-v3d overlay for an example. Note, however, that multiple cma= values may not have the desired effect. |
With the vc4-kms-v3d driver we do run with |
Thanks both. It's one to have a discussion about come the end of the month - I'm unlikely to get any time to do much before then. |
Waiting for the discussion... Doing some cleanup in this area sounds interesting and useful. I've also noticed a few posts and from using it myself that CMA is a bit broken in 4.10 at least as far as vc4-kms-v3d is concerned. Making it work with both the standard VC driver and VC4 sounds useful as well. |
@6by9 well, switching to CMA instead of gpu_mem=128 like raspi-config does currently for camera means at least Linux gets to use those pages when the camera isn't active. |
@anholt Yes, but for the case where the app uses MMAL directly (ie most Pi camera apps) we don't have the option of using CMA so have to have gpu_mem allocated. FYI I start work at Pi Towers on Monday, hence my comment earlier about discussions likely to occur at the end of the month. (1) Hmm, VCSM could be rejigged to use CMA by default as the allocator and map it into VC, as a new implementation of vc_sm_alloc(). I hadn't thought of that one, and it would allow gpu_mem to be set lower without any loss of functionality and a lower overhead on the client. Another one to discuss with the others. |
ping @6by9 |
The firmware camera stack is deprecated, therefore limited point in pursuing this. We do now have the frameworks to handle dmabufs and import them into the VPU memory space (they're used by the codec and ISP V4L2 drivers), but it has limited gain to switch bcm2835-v4l2. |
Whoops, should have been a "not planned" |
(This is more a placeholder for a task that needs doing than a bug)
Currently the bcm2835-v4l2 driver uses the videobuf2-vmalloc buffer allocator, and relies on VCHI doing a copy of every frame from VC memory into ARM memory. This obviously has a hit on memory bandwidth.
The videobuf2-contig allocator should allow CMA allocated memory to be used by both VC and ARM, and would also work with the vc4 DRM/KMS driver. (Already demoed in anholt#12 although still with VCHI copying from VC to CMA memory)
Tasks:
The awkard bits are:
The text was updated successfully, but these errors were encountered: