mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-08 11:18:08 +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>
(cherry picked from commit df76963a5c)
This commit is contained in:
parent
786273a03b
commit
d741a0714a
2 changed files with 2 additions and 2 deletions
|
|
@ -121,7 +121,7 @@
|
|||
"description": "anv: Add DRM_RDWR flag in anv_gem_handle_to_fd",
|
||||
"nominated": true,
|
||||
"nomination_type": 0,
|
||||
"resolution": 0,
|
||||
"resolution": 1,
|
||||
"master_sha": null,
|
||||
"because_sha": null
|
||||
},
|
||||
|
|
|
|||
|
|
@ -426,7 +426,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