Skip to content

Commit e438a61

Browse files
committed
pixman: Call sync_plane when importing dmabuf
Previously, `PixmanRenderer::import_dmabuf` didn't error for an fd that isn't a dmabuf. Which caused an error later when trying to use this ioctl. I'm not aware of a better way to test this, so we can just add a `sync_plane` here.
1 parent 4e66ba0 commit e438a61

File tree

1 file changed

+3
-0
lines changed
  • src/backend/renderer/pixman

1 file changed

+3
-0
lines changed

src/backend/renderer/pixman/mod.rs

+3
Original file line numberDiff line numberDiff line change
@@ -743,6 +743,9 @@ impl PixmanRenderer {
743743
});
744744
}
745745

746+
dmabuf.sync_plane(0, DmabufSyncFlags::START | DmabufSyncFlags::READ)?;
747+
dmabuf.sync_plane(0, DmabufSyncFlags::END | DmabufSyncFlags::READ)?;
748+
746749
let image: Image<'_, '_> = unsafe {
747750
pixman::Image::from_raw_mut(
748751
format,

0 commit comments

Comments
 (0)