diff options
| author | 2017-09-19 16:09:53 +0800 | |
|---|---|---|
| committer | 2017-09-26 15:14:25 -0400 | |
| commit | c833d8aa4d829e858f1be8f4bd82a1503b611013 (patch) | |
| tree | 4656356fc8fa44eb7eeddf23fccceb25998b476e /drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c | |
| parent | drm/amdgpu:fix uvd ring fini routine(v2) (diff) | |
| download | wireguard-linux-c833d8aa4d829e858f1be8f4bd82a1503b611013.tar.xz wireguard-linux-c833d8aa4d829e858f1be8f4bd82a1503b611013.zip | |
drm/amdgpu:fix firmware memoryleak(v2)
this fix memory leak due to request_firmware after driver
unloaded
v2:
release gmc firmware for gmc6/7/8 as well
Signed-off-by: Monk Liu <Monk.Liu@amd.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c')
| -rw-r--r-- | drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c index e02828665b14..447d446b5015 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c @@ -92,6 +92,12 @@ static int psp_sw_init(void *handle) static int psp_sw_fini(void *handle) { + struct amdgpu_device *adev = (struct amdgpu_device *)handle; + + release_firmware(adev->psp.sos_fw); + adev->psp.sos_fw = NULL; + release_firmware(adev->psp.asd_fw); + adev->psp.asd_fw = NULL; return 0; } |
