diff options
author | Junwei Zhang <Jerry.Zhang@amd.com> | 2015-08-19 04:24:19 -0400 |
---|---|---|
committer | Alex Deucher <alexander.deucher@amd.com> | 2015-08-25 10:38:28 -0400 |
commit | 1aa4051b7f5474cca6009c13868c59d78d06f983 (patch) | |
tree | bad07ba0fe771f75d08d6785a3eb333acd3d2694 /drivers/gpu/drm/amd/amdgpu/amdgpu_sa.c | |
parent | 52293c67f1e7542a6dc61037d83c266e216bef27 (diff) |
drm/amdgpu: modify amdgpu_fence_wait_any() to amdgpu_fence_wait_multiple()
Rename the function and update the related code with this modified function.
Add the new parameter of bool wait_all.
If wait_all is true, it will return when all fences are signaled or timeout.
If wait_all is false, it will return when any fence is signaled or timeout.
Signed-off-by: Junwei Zhang <Jerry.Zhang@amd.com>
Reviewed-by: Monk Liu <monk.liu@amd.com>
Reviewed-by: Jammy Zhou <Jammy.Zhou@amd.com>
Reviewed-by: Christian König <christian.koenig@amd.com>
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/amdgpu_sa.c')
-rw-r--r-- | drivers/gpu/drm/amd/amdgpu/amdgpu_sa.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_sa.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_sa.c index d6398cf45f24..4597899e9758 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_sa.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_sa.c | |||
@@ -352,7 +352,8 @@ int amdgpu_sa_bo_new(struct amdgpu_device *adev, | |||
352 | } while (amdgpu_sa_bo_next_hole(sa_manager, fences, tries)); | 352 | } while (amdgpu_sa_bo_next_hole(sa_manager, fences, tries)); |
353 | 353 | ||
354 | spin_unlock(&sa_manager->wq.lock); | 354 | spin_unlock(&sa_manager->wq.lock); |
355 | t = amdgpu_fence_wait_any(adev, fences, false, MAX_SCHEDULE_TIMEOUT); | 355 | t = amdgpu_fence_wait_multiple(adev, fences, AMDGPU_MAX_RINGS, false, false, |
356 | MAX_SCHEDULE_TIMEOUT); | ||
356 | r = (t > 0) ? 0 : t; | 357 | r = (t > 0) ? 0 : t; |
357 | spin_lock(&sa_manager->wq.lock); | 358 | spin_lock(&sa_manager->wq.lock); |
358 | /* if we have nothing to wait for block */ | 359 | /* if we have nothing to wait for block */ |