public inbox for dri-devel@lists.freedesktop.org
 help / color / mirror / Atom feed
From: Grazvydas Ignotas <notasas@gmail.com>
To: dri-devel@lists.freedesktop.org
Cc: amd-gfx@lists.freedesktop.org, Alex Xie <AlexBin.Xie@amd.com>
Subject: [PATCH libdrm 1/3] amdgpu: Free/uninit vamgr_32 in theoretically correct order
Date: Sat, 28 Jan 2017 21:49:30 +0200	[thread overview]
Message-ID: <1485632972-4790-2-git-send-email-notasas@gmail.com> (raw)
In-Reply-To: <1485632972-4790-1-git-send-email-notasas@gmail.com>

From: Alex Xie <AlexBin.Xie@amd.com>

vamgr_32 is a region inside general VAM range. It is better to free and
deinitialize it before general VAM range.

Signed-off-by: Alex Xie <AlexBin.Xie@amd.com>
Reviewed-by: Christian König <christian.koenig@amd.com>
---
 amdgpu/amdgpu_device.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/amdgpu/amdgpu_device.c b/amdgpu/amdgpu_device.c
index f4ede03..cad7133 100644
--- a/amdgpu/amdgpu_device.c
+++ b/amdgpu/amdgpu_device.c
@@ -131,10 +131,10 @@ static int amdgpu_get_auth(int fd, int *auth)
 
 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);
+	amdgpu_vamgr_deinit(dev->vamgr);
+	free(dev->vamgr);
 	util_hash_table_destroy(dev->bo_flink_names);
 	util_hash_table_destroy(dev->bo_handles);
 	pthread_mutex_destroy(&dev->bo_table_mutex);
-- 
2.7.4

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

  reply	other threads:[~2017-01-28 19:49 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-01-28 19:49 [PATCH libdrm 0/3] some -pro patches for integration Grazvydas Ignotas
2017-01-28 19:49 ` Grazvydas Ignotas [this message]
     [not found] ` <1485632972-4790-1-git-send-email-notasas-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2017-01-28 19:49   ` [PATCH libdrm 2/3] amdgpu: vamgr_32 can be a struct instead of a pointer Grazvydas Ignotas
2017-01-29 22:51   ` [PATCH libdrm 0/3] some -pro patches for integration Edward O'Callaghan
     [not found]     ` <d25c24a2-e1d1-f8a8-f4e7-e91948f81e01-dczkZgxz+BNUPWh3PAxdjQ@public.gmane.org>
2017-01-30  8:38       ` Christian König
2017-02-01 12:50   ` Emil Velikov

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1485632972-4790-2-git-send-email-notasas@gmail.com \
    --to=notasas@gmail.com \
    --cc=AlexBin.Xie@amd.com \
    --cc=amd-gfx@lists.freedesktop.org \
    --cc=dri-devel@lists.freedesktop.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox