Skip to content

Commit edfaf6f

Browse files
wenshengsheng2020alexdeucher
authored andcommitted
drm/amdgpu: add fw release for sdma v5_0
sdma fw isn't released when module exit Reviewed-by: Hawking Zhang <[email protected]> Signed-off-by: Wenhui Sheng <[email protected]> Signed-off-by: Alex Deucher <[email protected]> Cc: [email protected]
1 parent 35f760b commit edfaf6f

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

drivers/gpu/drm/amd/amdgpu/sdma_v5_0.c

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1298,8 +1298,12 @@ static int sdma_v5_0_sw_fini(void *handle)
12981298
struct amdgpu_device *adev = (struct amdgpu_device *)handle;
12991299
int i;
13001300

1301-
for (i = 0; i < adev->sdma.num_instances; i++)
1301+
for (i = 0; i < adev->sdma.num_instances; i++) {
1302+
if (adev->sdma.instance[i].fw != NULL)
1303+
release_firmware(adev->sdma.instance[i].fw);
1304+
13021305
amdgpu_ring_fini(&adev->sdma.instance[i].ring);
1306+
}
13031307

13041308
return 0;
13051309
}

0 commit comments

Comments
 (0)