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

Commit 9a79588c authored by Christian König's avatar Christian König Committed by Alex Deucher
Browse files

drm/amdgpu: don't update page tables for VM emulation



It's just overhead to do so and allocating a VMID
when we don't need one is actually a bit dangerous.

Signed-off-by: default avatarChristian König <christian.koenig@amd.com>
Reviewed-by: default avatarAlex Deucher <alexander.deucher@amd.com>
Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
parent d5b4e25d
Loading
Loading
Loading
Loading
+8 −7
Original line number Diff line number Diff line
@@ -656,22 +656,23 @@ static int amdgpu_cs_ib_vm_chunk(struct amdgpu_device *adev,

	/* Only for UVD/VCE VM emulation */
	if (ring->funcs->parse_cs) {
		p->job->vm = NULL;
		for (i = 0; i < p->job->num_ibs; i++) {
			r = amdgpu_ring_parse_cs(ring, p, i);
			if (r)
				return r;
		}
	}

	} else {
		p->job->vm_pd_addr = amdgpu_bo_gpu_offset(vm->page_directory);

		r = amdgpu_bo_vm_update_pte(p, vm);
	if (!r)
		amdgpu_cs_sync_rings(p);

		if (r)
			return r;
	}

	return amdgpu_cs_sync_rings(p);
}

static int amdgpu_cs_handle_lockup(struct amdgpu_device *adev, int r)
{
	if (r == -EDEADLK) {