Mesa (staging/22.1): crocus: export GEM handle with RDWR access rights
GitLab Mirror
gitlab-mirror at kemper.freedesktop.org
Thu Apr 21 18:54:05 UTC 2022
Module: Mesa
Branch: staging/22.1
Commit: 2af5c609be5844c7e01974900cee42a03a3f2f8c
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=2af5c609be5844c7e01974900cee42a03a3f2f8c
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>
(cherry picked from commit 5c4906dc0f0b9609760dc0a18805045e568b2d0b)
---
.pick_status.json | 2 +-
src/gallium/drivers/crocus/crocus_bufmgr.c | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/.pick_status.json b/.pick_status.json
index abaf7fc5bd4..1a236e309b3 100644
--- a/.pick_status.json
+++ b/.pick_status.json
@@ -310,7 +310,7 @@
"description": "crocus: export GEM handle with RDWR access rights",
"nominated": true,
"nomination_type": 0,
- "resolution": 0,
+ "resolution": 1,
"main_sha": null,
"because_sha": null
},
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