projects
/
openwrt
/
staging
/
blogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
05f19eb
)
drm/amdgpu: fix sdma3 ucode mem leak
author
Monk Liu
<
[email protected]
>
Mon, 30 May 2016 07:15:32 +0000
(15:15 +0800)
committer
Alex Deucher
<
[email protected]
>
Thu, 9 Jun 2016 14:49:09 +0000
(10:49 -0400)
Signed-off-by: Monk Liu <
[email protected]
>
Reviewed-by: Christian König <
[email protected]
>
Signed-off-by: Alex Deucher <
[email protected]
>
drivers/gpu/drm/amd/amdgpu/sdma_v3_0.c
patch
|
blob
|
history
diff --git
a/drivers/gpu/drm/amd/amdgpu/sdma_v3_0.c
b/drivers/gpu/drm/amd/amdgpu/sdma_v3_0.c
index 33605d4ac2d984c6de8c6875929e8e92d2735296..532ea88da66abdff73e21d86debf28867d2d75fb 100644
(file)
--- a/
drivers/gpu/drm/amd/amdgpu/sdma_v3_0.c
+++ b/
drivers/gpu/drm/amd/amdgpu/sdma_v3_0.c
@@
-236,6
+236,15
@@
static void sdma_v3_0_init_golden_registers(struct amdgpu_device *adev)
}
}
+static void sdma_v3_0_free_microcode(struct amdgpu_device *adev)
+{
+ int i;
+ for (i = 0; i < adev->sdma.num_instances; i++) {
+ release_firmware(adev->sdma.instance[i].fw);
+ adev->sdma.instance[i].fw = NULL;
+ }
+}
+
/**
* sdma_v3_0_init_microcode - load ucode images from disk
*
@@
-1256,6
+1265,7
@@
static int sdma_v3_0_sw_fini(void *handle)
for (i = 0; i < adev->sdma.num_instances; i++)
amdgpu_ring_fini(&adev->sdma.instance[i].ring);
+ sdma_v3_0_free_microcode(adev);
return 0;
}