summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorChunming Zhou <david1.zhou@amd.com>2018-04-18 18:35:09 +0800
committerAlex Deucher <alexander.deucher@amd.com>2018-05-15 13:43:32 -0500
commit7fd645f258711a4ea4d777188949494f9e68b787 (patch)
treeb2a8577cc9b7e25dfbb12dc04aaa2eb0299b0e1d /drivers
parentd240cd9eddd943dbe0267d081697195ff1e90b65 (diff)
drm/amdgpu: fix list not initialized
Otherwise, cpu stuck for 22s with kernel panic. Signed-off-by: Chunming Zhou <david1.zhou@amd.com> Reviewed-by: Christian König <christian.koenig@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c
index 9c2195a2896d..8c34060e130f 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c
@@ -1568,10 +1568,9 @@ int amdgpu_vm_bo_update(struct amdgpu_device *adev,
* the evicted list so that it gets validated again on the
* next command submission.
*/
+ list_del_init(&bo_va->base.vm_status);
if (!(bo->preferred_domains & amdgpu_mem_type_to_domain(mem_type)))
list_add_tail(&bo_va->base.vm_status, &vm->evicted);
- else
- list_del_init(&bo_va->base.vm_status);
} else {
list_del_init(&bo_va->base.vm_status);
}