Untitled
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; }
Leave a Comment