Skip to content

Commit b32b895

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 f18932c commit b32b895

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
@@ -740,6 +740,9 @@ impl PixmanRenderer {
740740
});
741741
}
742742

743+
dmabuf.sync_plane(0, DmabufSyncFlags::START | DmabufSyncFlags::READ)?;
744+
dmabuf.sync_plane(0, DmabufSyncFlags::END | DmabufSyncFlags::READ)?;
745+
743746
let image: Image<'_, '_> = unsafe {
744747
pixman::Image::from_raw_mut(
745748
format,

0 commit comments

Comments
 (0)