NVK: Enable RW DMA-BUF export

Venus need mmap DMA-BUF as rw to implement some things internaly.
This patch allows NVK DMA-BUF export to be mmaped as RW.

cc: mesa-stable

Signed-off-by: Igor Torrente <igor.torrente@collabora.com>
Reviewed-by: Faith Ekstrand <None>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33203>
This commit is contained in:
Igor Torrente 2025-01-17 16:58:43 -03:00 committed by Marge Bot
parent 0f5bd032eb
commit d4faef8f0b

View file

@ -309,5 +309,5 @@ nouveau_ws_bo_wait(struct nouveau_ws_bo *bo, enum nouveau_ws_bo_map_flags flags)
int
nouveau_ws_bo_dma_buf(struct nouveau_ws_bo *bo, int *fd)
{
return drmPrimeHandleToFD(bo->dev->fd, bo->handle, DRM_CLOEXEC, fd);
return drmPrimeHandleToFD(bo->dev->fd, bo->handle, DRM_CLOEXEC | O_RDWR, fd);
}