Mesa (main): crocus: export GEM handle with RDWR access rights
GitLab Mirror
gitlab-mirror at kemper.freedesktop.org
Thu Apr 21 05:33:48 UTC 2022
Module: Mesa
Branch: main
Commit: 5c4906dc0f0b9609760dc0a18805045e568b2d0b
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=5c4906dc0f0b9609760dc0a18805045e568b2d0b
Author: Michael Olbrich <m.olbrich at pengutronix.de>
Date: Wed Apr 20 16:26:28 2022 +0200
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 <airlied at redhat.com>`
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16057>
---
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;
More information about the mesa-commit
mailing list