diff options
| author | Monk Liu <[email protected]> | 2017-11-14 08:52:14 +0000 |
|---|---|---|
| committer | Alex Deucher <[email protected]> | 2017-12-06 17:47:51 +0000 |
| commit | 84e5b5161e7159bcf24dfeed9f985bd86e354ea8 (patch) | |
| tree | 39b58d34375f10352b20ea60463eea2bdb084e08 /drivers/gpu/drm/amd/amdgpu/amdgpu_virt.c | |
| parent | drm/amdgpu:cleanup unused stack var (diff) | |
| download | kernel-84e5b5161e7159bcf24dfeed9f985bd86e354ea8.tar.gz kernel-84e5b5161e7159bcf24dfeed9f985bd86e354ea8.zip | |
drm/amdgpu:free CSA in unified place
instead of doing it in each GFX ip's sw_fini
Signed-off-by: Monk Liu <[email protected]>
Reviewed-by: Christian König <[email protected]>
Signed-off-by: Alex Deucher <[email protected]>
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/amdgpu_virt.c')
| -rw-r--r-- | drivers/gpu/drm/amd/amdgpu/amdgpu_virt.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_virt.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_virt.c index 0769cb935318..e7dfb7b44b4b 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_virt.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_virt.c @@ -47,6 +47,12 @@ int amdgpu_allocate_static_csa(struct amdgpu_device *adev) return 0; } +void amdgpu_free_static_csa(struct amdgpu_device *adev) { + amdgpu_bo_free_kernel(&adev->virt.csa_obj, + &adev->virt.csa_vmid0_addr, + NULL); +} + /* * amdgpu_map_static_csa should be called during amdgpu_vm_init * it maps virtual address "AMDGPU_VA_RESERVED_SIZE - AMDGPU_CSA_SIZE" |
