raspberrypi / libcamera

Other
223 stars 95 forks source link

Mmap permission issue on Android 14 #140

Closed janzwiegers closed 4 months ago

janzwiegers commented 4 months ago

Having a problem capturing an image on Android 14. Tombstone looks like this:

06-03 15:13:03.880 308 578 I DMABUFHEAPS: Using : Non-legacy ION heaps 06-03 15:13:03.880 308 578 I [minigbm:gbm_mesa_internals.cpp(233)]: Found GPU v3d 06-03 15:13:04.052 308 359 E libcamera: ERROR Buffer mapped_framebuffer.cpp:230 Failed to mmap plane: Permission denied .... lots of Permission denied! 06-03 15:13:11.282 308 359 E libcamera: ERROR Buffer mapped_framebuffer.cpp:230 Failed to mmap plane: Permission denied 06-03 15:13:12.008 308 579 E libcamera: ERROR Camera camera.cpp:675 Camera in Running state trying acquire() requiring state Available 06-03 15:13:12.008 308 579 E libcamera: ERROR HAL camera_device.cpp:390 '/base/axi/pcie@120000/rp1/i2c@88000/imx708@1a': Failed to acquire the camera 06-03 15:13:12.008 308 579 E libcamera: ERROR HAL camera3_hal.cpp:81 Failed to open camera module '0' 06-03 15:13:12.008 308 579 E libcamera: FATAL HAL generic_frame_buffer_allocator.cpp:106 gralloc_open() failed: -87

Streaming works until trying to capture and image via MLKIT

naushir commented 4 months ago

Unfortunately an issue this is out of scope for this repo, which is just a Raspberry Pi specific fork of libcamera. I would advise to re-send this issue to the libcamera dev mailing list instead.

janzwiegers commented 4 months ago

Thanks, I will try to raise it with libcamera itself. I'm pretty sure they will refer it back here, since it was not reported by other platforms. It specific to Raspberry Pi 4 & 5, I have same issue on various Android distro's and self built version. With self built version I compiled various source versions with the same effect. Tested on both CM4 and RPi5.