提交 afba8282 编写于 作者: L Likun Gao 提交者: 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: NLikun Gao <Likun.Gao@amd.com>
Reviewed-by: NHuang Rui <ray.huang@amd.com>
Reviewed-by: NKevin Wang <Kevin1.Wang@amd.com>
Acked-by: NAlex Deucher <alexander.deucher@amd.com>
Signed-off-by: NAlex Deucher <alexander.deucher@amd.com>
上级 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% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册