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@redhat.com>` Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16057>
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user