From: Emily Deng Date: Fri, 5 Mar 2021 09:03:52 +0000 (+0800) Subject: drm/amdgpu: Fix some unload driver issues X-Git-Tag: v5.15~1144^2~19^2~300 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=a00aacdf00b14b5afbb87f63bcc24a15ecd57452;p=platform%2Fkernel%2Flinux-starfive.git drm/amdgpu: Fix some unload driver issues If have memory leak, maybe it will have issue in ttm_bo_force_list_clean-> ttm_mem_evict_first. Set adev->gart.ptr to null to avoid to call amdgpu_gmc_set_pte_pde to cause ptr issue pointer when calling amdgpu_gart_unbind in amdgpu_bo_fini which is after gart_fini. Signed-off-by: Emily Deng Reviewed-by: Christian König Signed-off-by: Alex Deucher --- diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_gart.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_gart.c index 23823a5..f1ede4b 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_gart.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_gart.c @@ -202,6 +202,7 @@ void amdgpu_gart_table_vram_free(struct amdgpu_device *adev) return; } amdgpu_bo_unref(&adev->gart.bo); + adev->gart.ptr = NULL; } /*