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

drm/amdgpu: use common fence for amdgpu_vm_fence

Just cleanup the function parameters.

Signed-off-by: Christian König <christian.koenig@amd.com>
Reviewed-by: Chunming Zhou <david1.zhou@amd.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>

authored by

Christian König and committed by
Alex Deucher
16ae42fe b56c2285

+8 -8
+1 -1
drivers/gpu/drm/amd/amdgpu/amdgpu.h
··· 2332 2332 struct fence *updates); 2333 2333 void amdgpu_vm_fence(struct amdgpu_device *adev, 2334 2334 struct amdgpu_vm *vm, 2335 - struct amdgpu_fence *fence); 2335 + struct fence *fence); 2336 2336 uint64_t amdgpu_vm_map_gart(struct amdgpu_device *adev, uint64_t addr); 2337 2337 int amdgpu_vm_update_page_directory(struct amdgpu_device *adev, 2338 2338 struct amdgpu_vm *vm);
+1 -1
drivers/gpu/drm/amd/amdgpu/amdgpu_ib.c
··· 216 216 } 217 217 218 218 if (ib->vm) 219 - amdgpu_vm_fence(adev, ib->vm, ib->fence); 219 + amdgpu_vm_fence(adev, ib->vm, &ib->fence->base); 220 220 221 221 amdgpu_ring_unlock_commit(ring); 222 222 return 0;
+6 -6
drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c
··· 241 241 */ 242 242 void amdgpu_vm_fence(struct amdgpu_device *adev, 243 243 struct amdgpu_vm *vm, 244 - struct amdgpu_fence *fence) 244 + struct fence *fence) 245 245 { 246 - unsigned ridx = fence->ring->idx; 247 - unsigned vm_id = vm->ids[ridx].id; 246 + struct amdgpu_ring *ring = amdgpu_ring_from_fence(fence); 247 + unsigned vm_id = vm->ids[ring->idx].id; 248 248 249 249 fence_put(adev->vm_manager.active[vm_id]); 250 - adev->vm_manager.active[vm_id] = fence_get(&fence->base); 250 + adev->vm_manager.active[vm_id] = fence_get(fence); 251 251 252 - fence_put(vm->ids[ridx].last_id_use); 253 - vm->ids[ridx].last_id_use = fence_get(&fence->base); 252 + fence_put(vm->ids[ring->idx].last_id_use); 253 + vm->ids[ring->idx].last_id_use = fence_get(fence); 254 254 } 255 255 256 256 /**