mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-05 07:28:11 +02:00
anv: Add DRM_RDWR flag in anv_gem_handle_to_fd
The DRM_RDWR flag is needed for mmap with PROT_WRITE to work. Cc: mesa-stable Signed-off-by: Robin Ole Heinemann <robin.ole.heinemann@gmail.com> Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8075>
This commit is contained in:
parent
94687ee59f
commit
df76963a5c
1 changed files with 1 additions and 1 deletions
|
|
@ -437,7 +437,7 @@ anv_gem_handle_to_fd(struct anv_device *device, uint32_t gem_handle)
|
|||
{
|
||||
struct drm_prime_handle args = {
|
||||
.handle = gem_handle,
|
||||
.flags = DRM_CLOEXEC,
|
||||
.flags = DRM_CLOEXEC | DRM_RDWR,
|
||||
};
|
||||
|
||||
int ret = gen_ioctl(device->fd, DRM_IOCTL_PRIME_HANDLE_TO_FD, &args);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue