mirror of
https://github.com/nyanmisaka/mpp.git
synced 2025-10-16 06:00:37 +08:00

There is a bug when using single drm allocator device for all buffers: Sample: 1. external fd a is import to mpp_buffer and get handle B / fd b. 2. external fd a is import to mpp_buffer again and get handle B / fd c. NOTE: The handle is the same in mpp for drm allocator is the same and the handle ref_count is not increased. 4. release fd b and handle B. (NOTE: The handle B is released in kernel) 5. mmap fd c by handle B. (Crash on getting handle B in kernel) So we should reacquire handle for fd c when it need mmap or free. Change-Id: Ide0591f97be5e00ca71f6a16e0ff676c4ed206a5 Signed-off-by: aaron.sun <aaron.sun@rockchips-com>