mirror of
https://github.com/checkpoint-restore/criu.git
synced 2026-07-17 16:47:50 +00:00
plugins/amdgpu: Use original fd to export dmabuf
There is no need to use the fd libdrm duplicated from the original fd. Just use the original one. Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin@igalia.com>
This commit is contained in:
parent
b646f68b91
commit
da72ec01bb
1 changed files with 1 additions and 4 deletions
|
|
@ -307,7 +307,6 @@ int amdgpu_plugin_drm_dump_file(int fd, int id, struct stat *drm)
|
|||
union drm_amdgpu_gem_mmap mmap_args = { 0 };
|
||||
int bo_contents_fd;
|
||||
int dmabuf_fd;
|
||||
int device_fd;
|
||||
|
||||
boinfo->size = entry->size;
|
||||
boinfo->alloc_flags = entry->alloc_flags;
|
||||
|
|
@ -391,9 +390,7 @@ int amdgpu_plugin_drm_dump_file(int fd, int id, struct stat *drm)
|
|||
libdrm_initialized = true;
|
||||
}
|
||||
|
||||
device_fd = amdgpu_device_get_fd(h_dev);
|
||||
|
||||
ret = drmPrimeHandleToFD(device_fd, boinfo->handle, 0, &dmabuf_fd);
|
||||
ret = drmPrimeHandleToFD(fd, boinfo->handle, 0, &dmabuf_fd);
|
||||
if (ret) {
|
||||
pr_perror("Failed to get dmabuf fd from handle");
|
||||
goto exit;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue