Skip to content

fix(osal): validate all dma_heap nodes before enabling dma_heap alloc…#943

Open
axcda wants to merge 1 commit intorockchip-linux:developfrom
axcda:fix/dma-heap-allocator-validation
Open

fix(osal): validate all dma_heap nodes before enabling dma_heap alloc…#943
axcda wants to merge 1 commit intorockchip-linux:developfrom
axcda:fix/dma-heap-allocator-validation

Conversation

@axcda
Copy link

@axcda axcda commented Mar 19, 2026

On systems that only expose /dev/dma_heap/system without system-uncached, MPP incorrectly selects the dma_heap allocator. This causes cache coherency issues (visible as stripe/grid artifacts) when encoding video frames, because the allocated buffers lack proper cache management.

Fix by requiring all four dma_heap nodes (system, system-dma32, system-uncached, system-uncached-dma32) to be present before marking the dma_heap allocator as valid. When any node is missing, MPP falls back to the DRM allocator which handles cache correctly.

test_rkmpp_synth.mp4

…ator

On systems that only expose /dev/dma_heap/system without
system-uncached, MPP incorrectly selects the dma_heap allocator.
This causes cache coherency issues (visible as stripe/grid artifacts)
when encoding video frames, because the allocated buffers lack
proper cache management.

Fix by requiring all four dma_heap nodes (system, system-dma32,
system-uncached, system-uncached-dma32) to be present before
marking the dma_heap allocator as valid. When any node is missing,
MPP falls back to the DRM allocator which handles cache correctly.

Fixes: nyanmisaka/ffmpeg-rockchip#251
Made-with: Cursor
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.

1 participant