mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-24 13:10:10 +01:00
pan/kmod: set DRM_RDWR for exported dma-bufs
This allows the exported fds to be mapped for writing. This is needed for virtgpu native ctx support where the fds are mapped rw when the mappings are added to the guest by kvm. This aligns with other mesa drivers, and unblocks the extended testing with venus on top. Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34017>
This commit is contained in:
parent
cac4287aab
commit
06369caa40
1 changed files with 2 additions and 1 deletions
|
|
@ -565,7 +565,8 @@ pan_kmod_bo_export(struct pan_kmod_bo *bo)
|
|||
{
|
||||
int fd;
|
||||
|
||||
if (drmPrimeHandleToFD(bo->dev->fd, bo->handle, DRM_CLOEXEC, &fd)) {
|
||||
if (drmPrimeHandleToFD(bo->dev->fd, bo->handle, DRM_CLOEXEC | DRM_RDWR,
|
||||
&fd)) {
|
||||
mesa_loge("drmPrimeHandleToFD() failed (err=%d)", errno);
|
||||
return -1;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue