summaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorWenhui Sheng <Wenhui.Sheng@amd.com>2020-06-18 15:37:04 +0800
committerAlex Deucher <alexander.deucher@amd.com>2020-06-24 18:02:39 -0400
commitedfaf6fa73f15568d4337f208b2333f647c35810 (patch)
treeb4671503b48967e17a9fabd3d8149da3f27781f0 /drivers
parent35f760b44b1b9cb16a306bdcc7220fbbf78c4789 (diff)
downloadlinux-edfaf6fa73f15568d4337f208b2333f647c35810.tar.bz2
drm/amdgpu: add fw release for sdma v5_0
sdma fw isn't released when module exit Reviewed-by: Hawking Zhang <Hawking.Zhang@amd.com> Signed-off-by: Wenhui Sheng <Wenhui.Sheng@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com> Cc: stable@vger.kernel.org
Diffstat (limited to 'drivers')
-rw-r--r--drivers/gpu/drm/amd/amdgpu/sdma_v5_0.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/sdma_v5_0.c b/drivers/gpu/drm/amd/amdgpu/sdma_v5_0.c
index b544baf306f2..5d71c23e2640 100644
--- a/drivers/gpu/drm/amd/amdgpu/sdma_v5_0.c
+++ b/drivers/gpu/drm/amd/amdgpu/sdma_v5_0.c
@@ -1298,8 +1298,12 @@ static int sdma_v5_0_sw_fini(void *handle)
struct amdgpu_device *adev = (struct amdgpu_device *)handle;
int i;
- for (i = 0; i < adev->sdma.num_instances; i++)
+ for (i = 0; i < adev->sdma.num_instances; i++) {
+ if (adev->sdma.instance[i].fw != NULL)
+ release_firmware(adev->sdma.instance[i].fw);
+
amdgpu_ring_fini(&adev->sdma.instance[i].ring);
+ }
return 0;
}