提交 4c283acf 编写于 作者: R Rex Zhu 提交者: Alex Deucher

drm/amd/powerplay: not free hwmgr/smumgr in asic private functions.

struct smumgr/hwmgr will be freed on amd_powerplay_destory

and if we free them in one of asic private functions, other private
date may not be freed. for example: power state and power table
in hwmgr.
Signed-off-by: NRex Zhu <Rex.Zhu@amd.com>
Reviewed-by: NAlex Deucher <alexander.deucher@amd.com>
Signed-off-by: NAlex Deucher <alexander.deucher@amd.com>
上级 6f4dc24a
...@@ -1217,10 +1217,9 @@ static int cz_hwmgr_backend_init(struct pp_hwmgr *hwmgr) ...@@ -1217,10 +1217,9 @@ static int cz_hwmgr_backend_init(struct pp_hwmgr *hwmgr)
static int cz_hwmgr_backend_fini(struct pp_hwmgr *hwmgr) static int cz_hwmgr_backend_fini(struct pp_hwmgr *hwmgr)
{ {
if (hwmgr != NULL && hwmgr->backend != NULL) { if (hwmgr != NULL && hwmgr->backend != NULL)
kfree(hwmgr->backend); kfree(hwmgr->backend);
kfree(hwmgr);
}
return 0; return 0;
} }
......
...@@ -831,7 +831,6 @@ static int cz_smu_fini(struct pp_smumgr *smumgr) ...@@ -831,7 +831,6 @@ static int cz_smu_fini(struct pp_smumgr *smumgr)
cgs_free_gpu_mem(smumgr->device, cgs_free_gpu_mem(smumgr->device,
cz_smu->smu_buffer.handle); cz_smu->smu_buffer.handle);
kfree(cz_smu); kfree(cz_smu);
kfree(smumgr);
} }
return 0; return 0;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册