diff options
author | Emily Deng <Emily.Deng@amd.com> | 2021-03-05 12:03:52 +0300 |
---|---|---|
committer | Alex Deucher <alexander.deucher@amd.com> | 2021-03-05 23:12:41 +0300 |
commit | a00aacdf00b14b5afbb87f63bcc24a15ecd57452 (patch) | |
tree | 02f1e570b0a847bd20d3fa7bbf0df8269eac7aa5 /drivers/gpu/drm/amd/amdgpu/amdgpu_gart.c | |
parent | bb0cd09be45ea457f25fdcbcb3d6cf2230f26c46 (diff) | |
download | linux-a00aacdf00b14b5afbb87f63bcc24a15ecd57452.tar.xz |
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 <Emily.Deng@amd.com>
Reviewed-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/amdgpu_gart.c')
-rw-r--r-- | drivers/gpu/drm/amd/amdgpu/amdgpu_gart.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_gart.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_gart.c index 23823a57374f..f1ede4b43d07 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; } /* |