From 5c4906dc0f0b9609760dc0a18805045e568b2d0b Mon Sep 17 00:00:00 2001 From: Michael Olbrich Date: Wed, 20 Apr 2022 16:26:28 +0200 Subject: [PATCH] crocus: export GEM handle with RDWR access rights Without this, it is impossible to export gem handles with write access. This was fixed the same way for i965 (https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10850) and iris (https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10851). Cc: mesa-stable Reviewed-by: Dave Airlie ` Part-of: --- src/gallium/drivers/crocus/crocus_bufmgr.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/gallium/drivers/crocus/crocus_bufmgr.c b/src/gallium/drivers/crocus/crocus_bufmgr.c index d09453ff6cb..7c4363fe632 100644 --- a/src/gallium/drivers/crocus/crocus_bufmgr.c +++ b/src/gallium/drivers/crocus/crocus_bufmgr.c @@ -1370,7 +1370,7 @@ crocus_bo_export_dmabuf(struct crocus_bo *bo, int *prime_fd) crocus_bo_make_external(bo); if (drmPrimeHandleToFD(bufmgr->fd, bo->gem_handle, - DRM_CLOEXEC, prime_fd) != 0) + DRM_CLOEXEC | DRM_RDWR, prime_fd) != 0) return -errno; return 0;