From: Alex Deucher <alexdeucher@gmail.com>
To: dri-devel@lists.freedesktop.org
Cc: Alex Deucher <alexander.deucher@amd.com>, Monk Liu <Monk.Liu@amd.com>
Subject: [PATCH 07/13] drm/amdgpu: fix gfx 7 ucode mem leak
Date: Thu, 2 Jun 2016 10:39:07 -0400 [thread overview]
Message-ID: <1464878353-16836-8-git-send-email-alexander.deucher@amd.com> (raw)
In-Reply-To: <1464878353-16836-1-git-send-email-alexander.deucher@amd.com>
From: Monk Liu <Monk.Liu@amd.com>
Signed-off-by: Monk Liu <Monk.Liu@amd.com>
Reviewed-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
---
drivers/gpu/drm/amd/amdgpu/gfx_v7_0.c | 17 +++++++++++++++++
1 file changed, 17 insertions(+)
diff --git a/drivers/gpu/drm/amd/amdgpu/gfx_v7_0.c b/drivers/gpu/drm/amd/amdgpu/gfx_v7_0.c
index 7f18a53..8c6ad1e 100644
--- a/drivers/gpu/drm/amd/amdgpu/gfx_v7_0.c
+++ b/drivers/gpu/drm/amd/amdgpu/gfx_v7_0.c
@@ -991,6 +991,22 @@ out:
return err;
}
+static void gfx_v7_0_free_microcode(struct amdgpu_device *adev)
+{
+ release_firmware(adev->gfx.pfp_fw);
+ adev->gfx.pfp_fw = NULL;
+ release_firmware(adev->gfx.me_fw);
+ adev->gfx.me_fw = NULL;
+ release_firmware(adev->gfx.ce_fw);
+ adev->gfx.ce_fw = NULL;
+ release_firmware(adev->gfx.mec_fw);
+ adev->gfx.mec_fw = NULL;
+ release_firmware(adev->gfx.mec2_fw);
+ adev->gfx.mec2_fw = NULL;
+ release_firmware(adev->gfx.rlc_fw);
+ adev->gfx.rlc_fw = NULL;
+}
+
/**
* gfx_v7_0_tiling_mode_table_init - init the hw tiling table
*
@@ -4489,6 +4505,7 @@ static int gfx_v7_0_sw_fini(void *handle)
gfx_v7_0_cp_compute_fini(adev);
gfx_v7_0_rlc_fini(adev);
gfx_v7_0_mec_fini(adev);
+ gfx_v7_0_free_microcode(adev);
return 0;
}
--
2.5.5
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel
next prev parent reply other threads:[~2016-06-02 14:39 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-06-02 14:39 [PATCH 00/13] Fix memory and firmware leaks Alex Deucher
2016-06-02 14:39 ` [PATCH 01/13] drm/amdgpu: fix mem leak in smumgr Alex Deucher
2016-06-02 14:39 ` [PATCH 02/13] drm/amdgpu: fix mem leak in pplib/hwmgr Alex Deucher
2016-06-02 14:39 ` [PATCH 03/13] drm/amdgpu: fix mem leak in atombios Alex Deucher
2016-06-02 14:39 ` [PATCH 04/13] drm/amdgpu: fix memleak in pptable_init Alex Deucher
2016-06-02 14:39 ` [PATCH 05/13] drm/amdgpu: fix missing free wb for cond_exec Alex Deucher
2016-06-02 14:39 ` [PATCH 06/13] drm/amdgpu: fix gfx8 ucode mem leak Alex Deucher
2016-06-02 14:39 ` Alex Deucher [this message]
2016-06-02 14:39 ` [PATCH 08/13] drm/amdgpu: fix uvd fini " Alex Deucher
2016-06-02 14:39 ` [PATCH 09/13] drm/amdgpu: fix sdma3 ucode " Alex Deucher
2016-06-02 14:39 ` [PATCH 10/13] drm/amdgpu: fix sdma24 " Alex Deucher
2016-06-02 14:39 ` [PATCH 11/13] drm/amdgpu: fix cik sdma ucode memleak Alex Deucher
2016-06-02 14:39 ` [PATCH 12/13] drm/amdgpu: fix fiji smu fini mem leak Alex Deucher
2016-06-02 14:39 ` [PATCH 13/13] drm/amdgpu: fix tonga smu_fini " Alex Deucher
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1464878353-16836-8-git-send-email-alexander.deucher@amd.com \
--to=alexdeucher@gmail.com \
--cc=Monk.Liu@amd.com \
--cc=alexander.deucher@amd.com \
--cc=dri-devel@lists.freedesktop.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox