Rockchip · AI & Linux Hub

Hardware interfaces

When can a Rockchip zero-copy pipeline return a DMA-BUF?

A file descriptor can pass a reference to the same buffer between modules, but it does not mean that all users have completed reading and writing.

When the camera, RGA, and display work in parallel, returning the buffer to the acquisition queue early may overwrite the data that is still being displayed in the next frame.

Draw a life cycle for each buffer

Record collection delivery, import accelerator, submission, completion, downstream release, and re-enqueue. Asynchronous submission return only proves that the task has entered the processing flow. Check the completion notification, synchronization fence and ownership agreement of the current API. CPU reading and writing must also comply with the corresponding synchronization requirements.

Find the reuse opportunity with the serial number

Add a recognizable pattern to the test frame, and the log is recorded according to the buffer index and service frame number. If the next enqueue of the same buffer occurs before the downstream completion of the previous frame, priority is given to correcting the release condition. Increasing the number of buffers may reduce the frequency of occurrences, but does not eliminate race conditions.

Deciding where to copy

If a slow consumer only saves screenshots occasionally, it may be more cost-effective to copy its data alone than to occupy the main collection pool for a long time. Use peak memory, main channel dropped frames, and tail latency to evaluate changes, so that zero copy can serve stable output.

Board documentation and references

ArmSoM Sige7

Products and development resources

Check the hardware revision, carrier, image and interfaces in the product documentation. An article association is not evidence that a configuration has been tested.

Explore this topic → · Learning paths →