libdrm: intel: add DRM_RDWR flag in drm_intel_bo_gem_export_to_prime

This is similar to b81d44d587d1706d5c7568e539340632a748782b: the
DRM_RDWR flag is needed for mmap to work.

Signed-off-by: Nicholas Bishop <nicholasbishop@gmail.com>
Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
main
Nicholas Bishop 2020-02-04 20:27:33 -05:00 committed by Emil Velikov
parent dd562b1efd
commit 05727548a1
1 changed files with 1 additions and 1 deletions

View File

@ -2728,7 +2728,7 @@ drm_intel_bo_gem_export_to_prime(drm_intel_bo *bo, int *prime_fd)
drm_intel_bo_gem *bo_gem = (drm_intel_bo_gem *) bo;
if (drmPrimeHandleToFD(bufmgr_gem->fd, bo_gem->gem_handle,
DRM_CLOEXEC, prime_fd) != 0)
DRM_CLOEXEC | DRM_RDWR, prime_fd) != 0)
return -errno;
bo_gem->reusable = false;