Am 08.06.2018 um 07:34 schrieb Emily Deng: > For buffer object that has shadow buffer, need twice commands. > > Signed-off-by: Emily Deng <Emily.Deng at amd.com> Good catch, Reviewed-by: Christian König <christian.koenig at amd.com>. > --- > drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c | 5 ++++- > 1 file changed, 4 insertions(+), 1 deletion(-) > > diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c > index b0eb2f5..d88687b 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, > ndw += ncmds * 10; > > /* extra commands for begin/end fragments */ > - ndw += 2 * 10 * adev->vm_manager.fragment_size; > + if (vm->root.base.bo->shadow) > + ndw += 2 * 10 * adev->vm_manager.fragment_size * 2; > + else > + ndw += 2 * 10 * adev->vm_manager.fragment_size; > > params.func = amdgpu_vm_do_set_ptes; > }