From e438a614743671862f4ff635a8353d99bd2bb1c1 Mon Sep 17 00:00:00 2001 From: Ian Douglas Scott Date: Fri, 6 Dec 2024 14:29:52 -0800 Subject: [PATCH] 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. --- src/backend/renderer/pixman/mod.rs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/backend/renderer/pixman/mod.rs b/src/backend/renderer/pixman/mod.rs index 87ced41334f4..8252a0464990 100644 --- a/src/backend/renderer/pixman/mod.rs +++ b/src/backend/renderer/pixman/mod.rs @@ -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,