From e6b67d2c72a91a11a32036712d948376ef1d697d Mon Sep 17 00:00:00 2001 From: Robert Mader Date: Fri, 26 Sep 2025 11:57:43 +0200 Subject: [PATCH] shared/client-buffer-util: Sync for read as well In the next commit we will need syncing for reading. Thus adapt the sync helper accordingly. We are not using the helper for performance-critical tasks yet, thus there's currently no strong reason to allow users to differentiate between the cases. Signed-off-by: Robert Mader --- shared/client-buffer-util.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/shared/client-buffer-util.c b/shared/client-buffer-util.c index 149b11a84..067cf9f9a 100644 --- a/shared/client-buffer-util.c +++ b/shared/client-buffer-util.c @@ -427,7 +427,7 @@ error: void client_buffer_util_maybe_sync_dmabuf_start(struct client_buffer *buf) { - struct dma_buf_sync sync = { DMA_BUF_SYNC_START | DMA_BUF_SYNC_WRITE }; + struct dma_buf_sync sync = { DMA_BUF_SYNC_START | DMA_BUF_SYNC_READ | DMA_BUF_SYNC_WRITE }; int ret; if (buf->dmabuf_fd == -1) @@ -441,7 +441,7 @@ client_buffer_util_maybe_sync_dmabuf_start(struct client_buffer *buf) void client_buffer_util_maybe_sync_dmabuf_end(struct client_buffer *buf) { - struct dma_buf_sync sync = { DMA_BUF_SYNC_END | DMA_BUF_SYNC_WRITE }; + struct dma_buf_sync sync = { DMA_BUF_SYNC_END | DMA_BUF_SYNC_READ | DMA_BUF_SYNC_WRITE }; int ret; if (buf->dmabuf_fd == -1)