Commit 51ba6912 authored by Qingqing Zhuo's avatar Qingqing Zhuo Committed by Alex Deucher

drm/amd/display: Fix potential memory leak

[Why]
vblank_workqueue is never released.

[How]
Free it upon dm finish.
Tested-by: default avatarDaniel Wheeler <daniel.wheeler@amd.com>
Signed-off-by: default avatarQingqing Zhuo <qingqing.zhuo@amd.com>
Reviewed-by: default avatarNicholas Kazlauskas <Nicholas.Kazlauskas@amd.com>
Acked-by: default avatarSolomon Chiu <solomon.chiu@amd.com>
Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
parent 1c5ea40c
......@@ -1226,6 +1226,15 @@ static void amdgpu_dm_fini(struct amdgpu_device *adev)
if (adev->dm.dc)
dc_deinit_callbacks(adev->dm.dc);
#endif
#if defined(CONFIG_DRM_AMD_DC_DCN)
if (adev->dm.vblank_workqueue) {
adev->dm.vblank_workqueue->dm = NULL;
kfree(adev->dm.vblank_workqueue);
adev->dm.vblank_workqueue = NULL;
}
#endif
if (adev->dm.dc->ctx->dmub_srv) {
dc_dmub_srv_destroy(&adev->dm.dc->ctx->dmub_srv);
adev->dm.dc->ctx->dmub_srv = NULL;
......
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