mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-18 13:48:06 +02:00
Use fd after dup instead of the one before dup to avoid drm_syncobj_find failed in guest kernel when dev is found in dev_list. When dev is not found in dev_list, it uses device fd which is duplicated, to init sync provider. And when it's found, the same device fd should be used. Otherwise, it would caused inconsistency and failures like in the Android domU CTS test where the guest kernel attempts to locate a syncobj. This occurs because vdrm_device_connect and VIRTGPU_EXECBUFFER ioctl use fd after dup while util_sync_provider_drm uses the one before dup. The fix has been validated with the CtsSdkSandboxWebkitTestCases in Android domU, and the previously failing test cases no longer occur. Signed-off-by: Ruitang.Wang@amd.com Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39520> |
||
|---|---|---|
| .. | ||
| amdgpu_virtio.c | ||
| amdgpu_virtio.h | ||
| amdgpu_virtio_bo.c | ||
| amdgpu_virtio_device.c | ||
| amdgpu_virtio_private.h | ||
| amdgpu_virtio_proto.h | ||