Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 11528640 authored by Emily Deng's avatar Emily Deng Committed by Alex Deucher
Browse files

drm/amdgpu: Correct the ndw of bo update mapping.



For buffer object that has shadow buffer, need twice commands.

Signed-off-by: default avatarEmily Deng <Emily.Deng@amd.com>
Reviewed-by: default avatarChristian König <christian.koenig@amd.com>
Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
parent b7e6cd57
Loading
Loading
Loading
Loading
+4 −1
Original line number Original line Diff line number Diff line
@@ -1324,6 +1324,9 @@ static int amdgpu_vm_bo_update_mapping(struct amdgpu_device *adev,
		ndw += ncmds * 10;
		ndw += ncmds * 10;


		/* extra commands for begin/end fragments */
		/* extra commands for begin/end fragments */
		if (vm->root.base.bo->shadow)
		        ndw += 2 * 10 * adev->vm_manager.fragment_size * 2;
		else
		        ndw += 2 * 10 * adev->vm_manager.fragment_size;
		        ndw += 2 * 10 * adev->vm_manager.fragment_size;


		params.func = amdgpu_vm_do_set_ptes;
		params.func = amdgpu_vm_do_set_ptes;