mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-06-24 07:31:41 +00:00
drm/amdgpu: merge vm_grab_id and vm_fence v2
No need for an extra function any more. v2: comment cleanups Signed-off-by: Christian König <christian.koenig@amd.com> Reviewed-by: Chunming Zhou <david1.zhou@amd.com> Acked-by: Alex Deucher <alexander.deucher@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
This commit is contained in:
parent
8d0a7cea82
commit
94dd0a4ae0
3 changed files with 30 additions and 45 deletions
|
@ -38,19 +38,14 @@ static struct fence *amdgpu_sched_dependency(struct amd_sched_job *sched_job)
|
|||
|
||||
if (fence == NULL && vm && !job->ibs->grabbed_vmid) {
|
||||
struct amdgpu_ring *ring = job->ibs->ring;
|
||||
struct amdgpu_device *adev = ring->adev;
|
||||
int r;
|
||||
|
||||
mutex_lock(&adev->vm_manager.lock);
|
||||
r = amdgpu_vm_grab_id(vm, ring, sync);
|
||||
if (r) {
|
||||
r = amdgpu_vm_grab_id(vm, ring, sync,
|
||||
&job->base.s_fence->base);
|
||||
if (r)
|
||||
DRM_ERROR("Error getting VM ID (%d)\n", r);
|
||||
} else {
|
||||
fence = &job->base.s_fence->base;
|
||||
amdgpu_vm_fence(ring->adev, vm, fence);
|
||||
else
|
||||
job->ibs->grabbed_vmid = true;
|
||||
}
|
||||
mutex_unlock(&adev->vm_manager.lock);
|
||||
|
||||
fence = amdgpu_sync_get_fence(sync);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue