Commit 114fbc31 authored by Christian König's avatar Christian König Committed by Alex Deucher
Browse files

drm/amdgpu: use the VM as job owner



For HMM we need to rework how VM synchronization works, so instead of the filp use VM as job owner.

Signed-off-by: default avatarChristian König <christian.koenig@amd.com>
Reviewed-by: default avatarFelix Kuehling <Felix.Kuehling@amd.com>
Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
parent 81417bea
Loading
Loading
Loading
Loading
+3 −2
Original line number Diff line number Diff line
@@ -651,6 +651,7 @@ out:

static int amdgpu_cs_sync_rings(struct amdgpu_cs_parser *p)
{
	struct amdgpu_fpriv *fpriv = p->filp->driver_priv;
	struct amdgpu_bo_list_entry *e;
	int r;

@@ -658,7 +659,7 @@ static int amdgpu_cs_sync_rings(struct amdgpu_cs_parser *p)
		struct amdgpu_bo *bo = ttm_to_amdgpu_bo(e->tv.bo);
		struct dma_resv *resv = bo->tbo.base.resv;

		r = amdgpu_sync_resv(p->adev, &p->job->sync, resv, p->filp,
		r = amdgpu_sync_resv(p->adev, &p->job->sync, resv, &fpriv->vm,
				     amdgpu_bo_explicit_sync(bo));

		if (r)
@@ -1211,7 +1212,7 @@ static int amdgpu_cs_submit(struct amdgpu_cs_parser *p,
	job = p->job;
	p->job = NULL;

	r = drm_sched_job_init(&job->base, entity, p->filp);
	r = drm_sched_job_init(&job->base, entity, &fpriv->vm);
	if (r)
		goto error_unlock;