[allocator_dma_heap]: Add error log

Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
Change-Id: I06af727713e1c096eada8a40795f42668fdaff6d
This commit is contained in:
Herman Chen
2023-06-06 15:45:49 +08:00
parent a76ad475db
commit feab136f1a

View File

@@ -103,11 +103,12 @@ static int dma_heap_alloc(int fd, size_t len, RK_S32 *dmabuf_fd, RK_U32 flags)
data.heap_flags = 0; // heap_flags should be set to 0
ret = ioctl(fd, DMA_HEAP_IOCTL_ALLOC, &data);
dma_heap_dbg(DMA_HEAP_IOCTL, "ioctl alloc ret %d %s\n", ret, strerror(errno));
if (ret < 0)
if (ret < 0) {
mpp_err("ioctl alloc failed for %s\n", strerror(errno));
return ret;
}
dma_heap_dbg(DMA_HEAP_IOCTL, "ioctl alloc get fd %d\n", data.fd);
*dmabuf_fd = data.fd;