aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorHawking Zhang <Hawking.Zhang@amd.com>2017-06-06 16:19:34 +0800
committerAlex Deucher <alexander.deucher@amd.com>2017-06-06 17:01:05 -0400
commit95ef1f53c5fac7f32225a17a08e4aed320ac649a (patch)
treeab7b15bdd72045d260df880e50c8224518308787
parentdrm/amd/powerplay: add sclk and mclk overdrive for vega10 (diff)
downloadwireguard-linux-95ef1f53c5fac7f32225a17a08e4aed320ac649a.tar.xz
wireguard-linux-95ef1f53c5fac7f32225a17a08e4aed320ac649a.zip
drm/amd/powerplay: fix memory leak in rv_hwmgr backend
vddc_dep_on_dal_pwrl and vq_budgeting_table are allocated and initialized in rv_hwmgr_backend_init. Thus free the memory in rv_hwmgr_backend_fini Signed-off-by: Hawking Zhang <Hawking.Zhang@amd.com> Reviewed-by: Alex Deucher <alexander.deucher@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
-rw-r--r--drivers/gpu/drm/amd/powerplay/hwmgr/rv_hwmgr.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/drivers/gpu/drm/amd/powerplay/hwmgr/rv_hwmgr.c b/drivers/gpu/drm/amd/powerplay/hwmgr/rv_hwmgr.c
index 9b431511d274..4c7f430b36eb 100644
--- a/drivers/gpu/drm/amd/powerplay/hwmgr/rv_hwmgr.c
+++ b/drivers/gpu/drm/amd/powerplay/hwmgr/rv_hwmgr.c
@@ -656,6 +656,16 @@ static int rv_hwmgr_backend_fini(struct pp_hwmgr *hwmgr)
pinfo->vdd_dep_on_phyclk = NULL;
}
+ if (NULL != hwmgr->dyn_state.vddc_dep_on_dal_pwrl) {
+ kfree(hwmgr->dyn_state.vddc_dep_on_dal_pwrl);
+ hwmgr->dyn_state.vddc_dep_on_dal_pwrl = NULL;
+ }
+
+ if (NULL != hwmgr->dyn_state.vq_budgeting_table) {
+ kfree(hwmgr->dyn_state.vq_budgeting_table);
+ hwmgr->dyn_state.vq_budgeting_table = NULL;
+ }
+
kfree(hwmgr->backend);
hwmgr->backend = NULL;