Commit afba8282 authored by Likun Gao's avatar Likun Gao Committed by Alex Deucher

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: default avatarLikun Gao <Likun.Gao@amd.com>
Reviewed-by: default avatarHuang Rui <ray.huang@amd.com>
Reviewed-by: default avatarKevin Wang <Kevin1.Wang@amd.com>
Acked-by: default avatarAlex Deucher <alexander.deucher@amd.com>
Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
parent c6eef2d0
......@@ -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;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment