|
@@ -141,11 +141,7 @@ int amdgpu_ib_schedule(struct amdgpu_device *adev, unsigned num_ibs,
|
|
|
dev_err(adev->dev, "couldn't schedule ib\n");
|
|
|
return -EINVAL;
|
|
|
}
|
|
|
- r = amdgpu_sync_wait(&ibs->sync);
|
|
|
- if (r) {
|
|
|
- dev_err(adev->dev, "IB sync failed (%d).\n", r);
|
|
|
- return r;
|
|
|
- }
|
|
|
+
|
|
|
r = amdgpu_ring_lock(ring, (256 + AMDGPU_NUM_SYNCS * 8) * num_ibs);
|
|
|
if (r) {
|
|
|
dev_err(adev->dev, "scheduling IB failed (%d).\n", r);
|
|
@@ -161,10 +157,10 @@ int amdgpu_ib_schedule(struct amdgpu_device *adev, unsigned num_ibs,
|
|
|
}
|
|
|
}
|
|
|
|
|
|
- r = amdgpu_sync_rings(&ibs->sync, ring);
|
|
|
+ r = amdgpu_sync_wait(&ibs->sync);
|
|
|
if (r) {
|
|
|
amdgpu_ring_unlock_undo(ring);
|
|
|
- dev_err(adev->dev, "failed to sync rings (%d)\n", r);
|
|
|
+ dev_err(adev->dev, "failed to sync wait (%d)\n", r);
|
|
|
return r;
|
|
|
}
|
|
|
|