From: Christian König Date: Fri, 13 Jan 2023 16:32:45 +0000 (+0100) Subject: drm/amdgpu: fix cleaning up reserved VMID on release X-Git-Tag: v6.6.17~5375^2~24^2~42 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=4d3d5e6c078fe9234a814dfd643d6298542abb1b;p=platform%2Fkernel%2Flinux-rpi.git drm/amdgpu: fix cleaning up reserved VMID on release We need to reset this or otherwise run into list corruption later on. Fixes: e44a0fe630c5 ("drm/amdgpu: rework reserved VMID handling") Signed-off-by: Christian König Reviewed-by: Alex Deucher Tested-by: Candice Li Signed-off-by: Alex Deucher --- diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_ids.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_ids.c index fcb711a..3f07b1a 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_ids.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_ids.c @@ -497,6 +497,7 @@ void amdgpu_vmid_free_reserved(struct amdgpu_device *adev, !--id_mgr->reserved_use_count) { /* give the reserved ID back to normal round robin */ list_add(&id_mgr->reserved->list, &id_mgr->ids_lru); + id_mgr->reserved = NULL; } vm->reserved_vmid[vmhub] = false; mutex_unlock(&id_mgr->lock);