mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2025-01-13 14:00:09 +00:00
dmabuf: Seek back to the start
https://docs.kernel.org/driver-api/dma-buf.html recommends doing that, so we do that.
This commit is contained in:
parent
e688be1cff
commit
323300e92a
@ -459,6 +459,8 @@ gdk_dmabuf_direct_downloader_do_download (GdkTexture *texture,
|
||||
g_warning ("Failed to seek dmabuf: %s", g_strerror (errno));
|
||||
goto out;
|
||||
}
|
||||
/* be a good citizen and seek back to the start, as the dos recommend */
|
||||
lseek (dmabuf->planes[i].fd, 0, SEEK_SET);
|
||||
|
||||
if (ioctl (dmabuf->planes[i].fd, DMA_BUF_IOCTL_SYNC, &(struct dma_buf_sync) { DMA_BUF_SYNC_START|DMA_BUF_SYNC_READ }) < 0)
|
||||
g_warning ("Failed to sync dmabuf: %s", g_strerror (errno));
|
||||
|
Loading…
Reference in New Issue
Block a user