Skip to contentSkip to conversation

amdgpu: fix missing deinit on vamgr_32

PATCH In review Alex Deucher 3 participants 3 messages Aug 31, 2015 – Sep 1, 2015

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 amdgpu: fix missing deinit on vamgr_32

From: "monk.liu" <[email protected]>

---
 amdgpu/amdgpu_device.c | 2 ++
 1 file changed, 2 insertions(+)
amdgpu/amdgpu_device.c +2 -0
index 75b12e2..e5a923e 100644
@@ -132,6 +132,8 @@ static void amdgpu_device_free_internal(amdgpu_device_handle dev)
 {
 	amdgpu_vamgr_deinit(dev->vamgr);
 	free(dev->vamgr);
+	amdgpu_vamgr_deinit(dev->vamgr_32);
+	free(dev->vamgr_32);
 	util_hash_table_destroy(dev->bo_flink_names);
 	util_hash_table_destroy(dev->bo_handles);
 	pthread_mutex_destroy(&dev->bo_table_mutex);
Signature · 6 lines
1.8.3.1

_______________________________________________
dri-devel mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/dri-devel
#1 lore raw

It looks like it was missed when I rebased my original patches. Patch is Reviewed-by: Jammy Zhou <[email protected]>

Regards,
Jammy

-----Original Message-----
From: dri-devel [mailto:[email protected]] On Behalf Of Alex Deucher
Sent: Monday, August 31, 2015 10:37 PM
To: [email protected]
Cc: Deucher, Alexander; Liu, Monk
Subject: [PATCH] amdgpu: fix missing deinit on vamgr_32

From: "monk.liu" <[email protected]>

---
 amdgpu/amdgpu_device.c | 2 ++
 1 file changed, 2 insertions(+)
amdgpu/amdgpu_device.c +2 -1
@@ -132,6 +132,8 @@ static void amdgpu_device_free_internal(amdgpu_device_handle dev)  {
 	amdgpu_vamgr_deinit(dev->vamgr);
 	free(dev->vamgr);
+	amdgpu_vamgr_deinit(dev->vamgr_32);
+	free(dev->vamgr_32);
 	util_hash_table_destroy(dev->bo_flink_names);
 	util_hash_table_destroy(dev->bo_handles);
 	pthread_mutex_destroy(&dev->bo_table_mutex);
--

1.8.3.1

_______________________________________________
dri-devel mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/dri-devel
_______________________________________________
dri-devel mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/dri-devel

#2 lore raw
In reply to Alex Deucher

Hi Alex,

Still reading through/learning about amdgpu, so a couple of (not too silly) questions :-)

Quoted 13 lines · Alex Deucher

From: "monk.liu" <[email protected]>

---
 amdgpu/amdgpu_device.c | 2 ++
 1 file changed, 2 insertions(+)
amdgpu/amdgpu_device.c +0 -0
index 75b12e2..e5a923e 100644

amdgpu/amdgpu_device.c static void amdgpu_device_free_internal(amdgpu_device_handle dev) · line 132

Quoted 1 line
amdgpu/amdgpu_device.c +0 -0
@@ -132,6 +132,8 @@ static void amdgpu_device_free_internal(amdgpu_device_handle dev)
 {

Do we want to keep fd_mutex held as/just before we get here ?

amdgpu/amdgpu_device.c static void amdgpu_device_free_internal(amdgpu_device_handle dev) · line 136

Quoted 4 lines
amdgpu/amdgpu_device.c +2 -0
        amdgpu_vamgr_deinit(dev->vamgr);
        free(dev->vamgr);
+       amdgpu_vamgr_deinit(dev->vamgr_32);
+       free(dev->vamgr_32);

Based off amdgpu_device_initialize(), shouldn't one also keep track of the 'start' va and and "free" it ?

amdgpu/amdgpu_device.c static void amdgpu_device_free_internal(amdgpu_device_handle dev) · line 138

Quoted 2 lines
amdgpu/amdgpu_device.c +0 -0
        util_hash_table_destroy(dev->bo_flink_names);
        util_hash_table_destroy(dev->bo_handles);

Mildly related suggestion for a follow up patch - amdgpu_device_initialize() seems to be missing the these two.

Thanks
Emil
_______________________________________________
dri-devel mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/dri-devel