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 <robert.mader@collabora.com>
This commit is contained in:
Robert Mader 2025-09-26 11:57:43 +02:00
parent 203dbd3393
commit e6b67d2c72

View file

@ -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)