Untitled
unknown
plain_text
10 months ago
604 B
4
Indexable
You're right - the code uses a more complex setup with memfd and dmabuf file descriptors. Let's modify just the UDMABUF_CREATE part while keeping the existing memory handling:
cCopy// Replace this section
struct udmabuf_create udmabuf_create = {
.memfd = memfd,
.flags = UDMABUF_FLAGS_CLOEXEC,
.offset = 0,
.size = size,
};
int dmabuf_fd = ioctl(allocator->fd, UDMABUF_CREATE, &udmabuf_create);
// With direct udmabuf open
int dmabuf_fd = open("/dev/udmabuf0", O_RDWR | O_CLOEXEC);
if (dmabuf_fd < 0) {
wlr_log_errno(WLR_ERROR, "Failed to open udmabuf device");
goto err_memfd;
}Editor is loading...
Leave a Comment