-
Notifications
You must be signed in to change notification settings - Fork 26
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
DMA_BUF_IOCTL_SYNC doesn't work #156
Comments
The invalid flags used by waypipe are something of a hack, for lack of an easier way to generically detect DMABUFs on Linux without trying to import with GBM or using driver-specific code. Also, FYI, the Linux version is https://github.com/torvalds/linux/blob/master/drivers/dma-buf/dma-buf.c#L279. Edit: The sample code tries the |
Can someone try reproducing using DMA-BUF reimplementation ? |
For future reference: Waypipe no longer relies on this behavior on FreeBSD, since v0.8.0, which was released more than a year ago. As of recent git commits, it has also stopped using the EBADF hack on Linux. |
EDIT: Description has been rewritten as the initial test case was incorrect.
Waypipe (package, workaround) relies on
DMA_BUF_IOCTL_SYNC
to check if a given file descripter is backed by DMABUF. On FreeBSD the ioctl always fails withEBADF
which is unexpected according to the implementation:kms-drm/linuxkpi/gplv2/src/linux_dmabuf.c
Lines 215 to 260 in e31e5fc
Test case: https://gitlab.freedesktop.org/snippets/621
The text was updated successfully, but these errors were encountered: