]> git.proxmox.com Git - mirror_ubuntu-kernels.git/commitdiff
drm/amdgpu: sdma v5_2 ring bo mem leak
authorWenhui Sheng <Wenhui.Sheng@amd.com>
Thu, 18 Jun 2020 05:33:09 +0000 (13:33 +0800)
committerAlex Deucher <alexander.deucher@amd.com>
Wed, 1 Jul 2020 05:59:24 +0000 (01:59 -0400)
invoke amdgpu_ring_fini for each sdma instance

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>
drivers/gpu/drm/amd/amdgpu/sdma_v5_2.c

index f072cef28b6036eb49ea4d5cfb4efd7c1990eabc..95751e7bdfe813fddf21a7c21e6d7267111a3bac 100644 (file)
@@ -1244,6 +1244,10 @@ static int sdma_v5_2_sw_init(void *handle)
 static int sdma_v5_2_sw_fini(void *handle)
 {
        struct amdgpu_device *adev = (struct amdgpu_device *)handle;
+       int i;
+
+       for (i = 0; i < adev->sdma.num_instances; i++)
+               amdgpu_ring_fini(&adev->sdma.instance[i].ring);
 
        sdma_v5_2_destroy_inst_ctx(adev);