- RK_DMA_HEAP_ALLOC_BUFFER failed cma_heap_fd:4 width:640 height:640 format:512 error:12 errorMsg:Cannot allocate memory
复制代码
使用 dmesg -T查看具体原因:- cma: cma_alloc: cma: alloc failed, req-size: 2700 pages, ret: -12
复制代码
大概知道就是预留的内存不够导致,请问该如何将其预留内存增大呢?jefferyzhang 发表于 2023-10-23 09:31
这得看你自己代码怎么写,librga里头不会分配内存,内存都是外部分配完送进去的.
如果你是toybrick板子就不 ...
- buf_data.len = width * height * get_bpp_from_format(format);
- buf_data.fd_flags = O_CLOEXEC | O_RDWR;
- ret = ioctl(cma_heap_fd, DMA_HEAP_IOCTL_ALLOC, &buf_data);
- if (ret < 0) {
- printf("RK_DMA_HEAP_ALLOC_BUFFER failed cma_heap_fd:%d width:%d height:%d format:%d error:%d errorMsg:%s\n", cma_heap_fd, width, height, format, errno, strerror(errno));
- return ret;
- }
复制代码
欢迎光临 Toybrick (https://t.rock-chips.com/) | Powered by Discuz! X3.3 |