diff options
author | 2020-07-02 03:33:24 +0000 | |
---|---|---|
committer | 2020-07-02 03:33:24 +0000 | |
commit | 556c65ceed2cae2292b4c0317004ad9109752fee (patch) | |
tree | 47c2b98c22e2d41ee30eefd34b3d7b7cf30effad | |
parent | drm/fb-helper: Fix vt restore (diff) | |
download | wireguard-openbsd-556c65ceed2cae2292b4c0317004ad9109752fee.tar.xz wireguard-openbsd-556c65ceed2cae2292b4c0317004ad9109752fee.zip |
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
-rw-r--r-- | sys/dev/pci/drm/amd/amdgpu/sdma_v5_0.c | 6 |
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; } |