Skip to content

Commit a616344

Browse files
yisdingclaude
andauthored
rockchip: udev: grant video group access to MPP codec devices and DMA-heaps (#10085)
The current Rockchip BSP exposes its hardware video codec stack (VEPU/VDPU via the MPP framework) through /dev/mpp_service, and the MPP userspace (rkmpp / ffmpeg-rockchip, Jellyfin, ...) allocates all of its frame and stream buffers from the kernel DMA-heaps under /dev/dma_heap/*. 60-media.rules already covers media* and rga, but neither mpp_service nor the dma_heap nodes, so hardware encode/decode only works as root: both are root-only by default. Granting just mpp_service is not enough on its own -- the encoder still fails at init ("MppBufferService get_group failed ... type 1") because rkmpp cannot open /dev/dma_heap/system (root root 0600) to allocate its buffers. Add rules for both, mirroring the existing media/rga entries (GROUP="video", MODE="0660"), so members of the video group can use hardware video encode/decode without elevated privileges. dma_heap is matched by subsystem because the heap node's kernel name is just "system". Verified on a ROCK 5B (RK3588): with both rules a non-root video-group user runs h264_rkmpp / hevc_rkmpp encode/transcode successfully, where before it failed at MPP init. Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
1 parent 269b9a2 commit a616344

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,4 @@
11
KERNEL=="media*", MODE="0660", GROUP="video"
22
KERNEL=="rga", MODE="0660", GROUP="video"
3+
KERNEL=="mpp_service", MODE="0660", GROUP="video"
4+
SUBSYSTEM=="dma_heap", MODE="0660", GROUP="video"

0 commit comments

Comments
 (0)