mirror of
https://github.com/torvalds/linux.git
synced 2026-09-23 13:14:02 +02:00
drm/amdgpu: restart the CS if some parts of the VM are still invalidated
Make sure that we only submit work with full up to date VM page tables. Signed-off-by: Christian König <christian.koenig@amd.com> Reviewed-by: Vitaly Prosyak <vitaly.prosyak@amd.com> Tested-by: Vitaly Prosyak <vitaly.prosyak@amd.com> Reviewed-by: Alex Deucher <alexander.deucher@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
This commit is contained in:
parent
1e815068fb
commit
59720bfd8c
|
|
@ -1274,6 +1274,7 @@ static int amdgpu_cs_submit(struct amdgpu_cs_parser *p,
|
||||||
{
|
{
|
||||||
struct amdgpu_fpriv *fpriv = p->filp->driver_priv;
|
struct amdgpu_fpriv *fpriv = p->filp->driver_priv;
|
||||||
struct amdgpu_job *leader = p->gang_leader;
|
struct amdgpu_job *leader = p->gang_leader;
|
||||||
|
struct amdgpu_vm *vm = &fpriv->vm;
|
||||||
struct amdgpu_bo_list_entry *e;
|
struct amdgpu_bo_list_entry *e;
|
||||||
struct drm_gem_object *gobj;
|
struct drm_gem_object *gobj;
|
||||||
unsigned long index;
|
unsigned long index;
|
||||||
|
|
@ -1319,7 +1320,8 @@ static int amdgpu_cs_submit(struct amdgpu_cs_parser *p,
|
||||||
amdgpu_hmm_range_free(e->range);
|
amdgpu_hmm_range_free(e->range);
|
||||||
e->range = NULL;
|
e->range = NULL;
|
||||||
}
|
}
|
||||||
if (r) {
|
|
||||||
|
if (r || !list_empty(&vm->individual.moved)) {
|
||||||
r = -EAGAIN;
|
r = -EAGAIN;
|
||||||
mutex_unlock(&p->adev->notifier_lock);
|
mutex_unlock(&p->adev->notifier_lock);
|
||||||
return r;
|
return r;
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user