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:
14d83e7
)
drm/amdgpu: fix sdma24 ucode mem leak
author
Monk Liu
<
[email protected]
>
Mon, 30 May 2016 08:05:58 +0000
(16:05 +0800)
committer
Alex Deucher
<
[email protected]
>
Thu, 9 Jun 2016 14:49:10 +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_v2_4.c
patch
|
blob
|
history
diff --git
a/drivers/gpu/drm/amd/amdgpu/sdma_v2_4.c
b/drivers/gpu/drm/amd/amdgpu/sdma_v2_4.c
index f6014b024f2ad6e74e65999ce2e8e5b2ee790f10..b556bd0a8797edce702d3c26ce78ff331ea82945 100644
(file)
--- a/
drivers/gpu/drm/amd/amdgpu/sdma_v2_4.c
+++ b/
drivers/gpu/drm/amd/amdgpu/sdma_v2_4.c
@@
-105,6
+105,15
@@
static void sdma_v2_4_init_golden_registers(struct amdgpu_device *adev)
}
}
+static void sdma_v2_4_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_v2_4_init_microcode - load ucode images from disk
*
@@
-1018,6
+1027,7
@@
static int sdma_v2_4_sw_fini(void *handle)
for (i = 0; i < adev->sdma.num_instances; i++)
amdgpu_ring_fini(&adev->sdma.instance[i].ring);
+ sdma_v2_4_free_microcode(adev);
return 0;
}