diff options
author | Yong Zhao <yong.zhao@amd.com> | 2017-09-19 12:58:15 -0400 |
---|---|---|
committer | Alex Deucher <alexander.deucher@amd.com> | 2017-09-26 15:14:22 -0400 |
commit | e6d921974a51e607515b39baa8d1c3f1a27d008b (patch) | |
tree | 4aeb7393832e368bc09c256cb15ce3ba59383ace /drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c | |
parent | 7bdc53f925af085ffa0580f10489f82b36cc2f1c (diff) |
drm/amdgpu: Add copy_pte_num_dw member in amdgpu_vm_pte_funcs
Use it to replace the hard coded value in amdgpu_vm_bo_update_mapping().
Signed-off-by: Yong Zhao <yong.zhao@amd.com>
Reviewed-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c')
-rw-r--r-- | drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c index 28d16781377f..8fcc743dfa86 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c | |||
@@ -1597,7 +1597,7 @@ static int amdgpu_vm_bo_update_mapping(struct amdgpu_device *adev, | |||
1597 | 1597 | ||
1598 | if (pages_addr) { | 1598 | if (pages_addr) { |
1599 | /* copy commands needed */ | 1599 | /* copy commands needed */ |
1600 | ndw += ncmds * 7; | 1600 | ndw += ncmds * adev->vm_manager.vm_pte_funcs->copy_pte_num_dw; |
1601 | 1601 | ||
1602 | /* and also PTEs */ | 1602 | /* and also PTEs */ |
1603 | ndw += nptes * 2; | 1603 | ndw += nptes * 2; |