H.264 encoder with VAAPI+AMD WX5100, Frame rate instability
The procedure is as follows: vaapi: vaSyncSurface --> mesa: vlVaSyncSurface --> rvce_get_feedback --> amdgpu_bo_map --> amdgpu_bo_wait --> amdgpu_fence_wait --> amdgpu_cs_query_fence_status --> libdrm: amdgpu_ioctl_wait_cs --> r = drmIoctl(dev->fd, DRM_IOCTL_AMDGPU_WAIT_CS, &args);(Sometimes it takes more than 100-200 ms, other times it only takes about 4ms)
What ioctl(DRM_IOCTL_AMDGPU_WAIT_CS) dose ? How can I ensure that each frame delay is around 4ms ?