diff options
author | Emily Deng <Emily.Deng@amd.com> | 2018-06-08 04:36:22 -0400 |
---|---|---|
committer | Alex Deucher <alexander.deucher@amd.com> | 2018-06-15 13:20:40 -0400 |
commit | 11528640c77891363bc7dea749ced64607aa1b22 (patch) | |
tree | d0f0ab655f48494a31d0598e639bd0d01ecef102 | |
parent | b7e6cd57027f5151d4f330dfabb0182f78d26e83 (diff) |
drm/amdgpu: Correct the ndw of bo update mapping.
For buffer object that has shadow buffer, need twice commands.
Signed-off-by: Emily Deng <Emily.Deng@amd.com>
Reviewed-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
-rw-r--r-- | drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c index b0eb2f537392..d88687b617e2 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c | |||
@@ -1324,7 +1324,10 @@ static int amdgpu_vm_bo_update_mapping(struct amdgpu_device *adev, | |||
1324 | ndw += ncmds * 10; | 1324 | ndw += ncmds * 10; |
1325 | 1325 | ||
1326 | /* extra commands for begin/end fragments */ | 1326 | /* extra commands for begin/end fragments */ |
1327 | ndw += 2 * 10 * adev->vm_manager.fragment_size; | 1327 | if (vm->root.base.bo->shadow) |
1328 | ndw += 2 * 10 * adev->vm_manager.fragment_size * 2; | ||
1329 | else | ||
1330 | ndw += 2 * 10 * adev->vm_manager.fragment_size; | ||
1328 | 1331 | ||
1329 | params.func = amdgpu_vm_do_set_ptes; | 1332 | params.func = amdgpu_vm_do_set_ptes; |
1330 | } | 1333 | } |