Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

drm/amdgpu: Fix uvd ib test timeout when use pre-allocated BO

Now we use same BO for create/destroy msg. So destroy will wait for the
fence returned from create to be signaled. The default timeout value in
destroy is 10ms which is too short.

Lets wait both fences with the specific timeout.

Signed-off-by: xinhui pan <xinhui.pan@amd.com>
Reviewed-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>

authored by

xinhui pan and committed by
Alex Deucher
0a226780 b2fe31cf

+8 -1
+8 -1
drivers/gpu/drm/amd/amdgpu/amdgpu_uvd.c
··· 1336 1336 struct dma_fence *fence; 1337 1337 long r; 1338 1338 1339 - r = amdgpu_uvd_get_create_msg(ring, 1, NULL); 1339 + r = amdgpu_uvd_get_create_msg(ring, 1, &fence); 1340 1340 if (r) 1341 + goto error; 1342 + 1343 + r = dma_fence_wait_timeout(fence, false, timeout); 1344 + dma_fence_put(fence); 1345 + if (r == 0) 1346 + r = -ETIMEDOUT; 1347 + if (r < 0) 1341 1348 goto error; 1342 1349 1343 1350 r = amdgpu_uvd_get_destroy_msg(ring, 1, true, &fence);