Skip to content

Commit

Permalink
pixman: Call sync_plane when importing dmabuf
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
ids1024 committed Dec 6, 2024
1 parent 4e66ba0 commit e438a61
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/backend/renderer/pixman/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -743,6 +743,9 @@ impl PixmanRenderer {
});
}

dmabuf.sync_plane(0, DmabufSyncFlags::START | DmabufSyncFlags::READ)?;
dmabuf.sync_plane(0, DmabufSyncFlags::END | DmabufSyncFlags::READ)?;

let image: Image<'_, '_> = unsafe {
pixman::Image::from_raw_mut(
format,
Expand Down

0 comments on commit e438a61

Please sign in to comment.