drm/amd/powerplay: update hw fini function to relase some memory

Release memory of table_context->driver_pptable and
table_context->ppt_information when smu hw fini.

Signed-off-by: Likun Gao <Likun.Gao@amd.com>
Reviewed-by: Huang Rui <ray.huang@amd.com>
Reviewed-by: Kevin Wang <Kevin1.Wang@amd.com>
Acked-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
This commit is contained in:
Likun Gao 2018-12-17 20:59:42 +08:00 committed by Alex Deucher
parent c6eef2d01d
commit afba828229
1 changed files with 5 additions and 0 deletions

View File

@ -434,11 +434,16 @@ static int smu_hw_fini(void *handle)
{
struct amdgpu_device *adev = (struct amdgpu_device *)handle;
struct smu_context *smu = &adev->smu;
struct smu_table_context *table_context = &smu->smu_table;
int ret = 0;
if (adev->asic_type < CHIP_VEGA20)
return -EINVAL;
if (!table_context->driver_pptable)
return -EINVAL;
kfree(table_context->driver_pptable);
ret = smu_fini_fb_allocations(smu);
if (ret)
return ret;