summaryrefslogtreecommitdiff
path: root/sys/dev/pci/drm/amd
diff options
context:
space:
mode:
authorJonathan Gray <jsg@cvs.openbsd.org>2020-07-02 03:33:25 +0000
committerJonathan Gray <jsg@cvs.openbsd.org>2020-07-02 03:33:25 +0000
commit14e0c7472c1d637deabc77d2d92438f4ca200e3f (patch)
tree45a8df35cd8c3bf94c8d77bd245b9cc68c3b7bdc /sys/dev/pci/drm/amd
parent489416f0738905ad084c83ee8ce5f372eeb87ade (diff)
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
Diffstat (limited to 'sys/dev/pci/drm/amd')
-rw-r--r--sys/dev/pci/drm/amd/amdgpu/sdma_v5_0.c6
1 files changed, 5 insertions, 1 deletions
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;
}