From 14e0c7472c1d637deabc77d2d92438f4ca200e3f Mon Sep 17 00:00:00 2001 From: Jonathan Gray Date: Thu, 2 Jul 2020 03:33:25 +0000 Subject: drm/amdgpu: add fw release for sdma v5_0 From Wenhui Sheng cfece0241468bc49d339c3c90ead98278063ae0f in linux 5.7.y/5.7.7 edfaf6fa73f15568d4337f208b2333f647c35810 in mainline linux --- sys/dev/pci/drm/amd/amdgpu/sdma_v5_0.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'sys/dev/pci') diff --git a/sys/dev/pci/drm/amd/amdgpu/sdma_v5_0.c b/sys/dev/pci/drm/amd/amdgpu/sdma_v5_0.c index ffc8cafd9ee..74419ff6896 100644 --- a/sys/dev/pci/drm/amd/amdgpu/sdma_v5_0.c +++ b/sys/dev/pci/drm/amd/amdgpu/sdma_v5_0.c @@ -1261,8 +1261,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; } -- cgit v1.2.3