dri-devel Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Alex Deucher <alexdeucher@gmail.com>
To: dri-devel@lists.freedesktop.org
Cc: Alex Deucher <alexander.deucher@amd.com>
Subject: [PATCH 03/14] drm/amdgpu: make vmid owner be client_id
Date: Wed,  4 May 2016 14:26:44 -0400	[thread overview]
Message-ID: <1462386415-25600-3-git-send-email-alexander.deucher@amd.com> (raw)
In-Reply-To: <1462386415-25600-1-git-send-email-alexander.deucher@amd.com>

From: Chunming Zhou <David1.Zhou@amd.com>

Using the pointer is not adequate.

Signed-off-by: Chunming Zhou <David1.Zhou@amd.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Reviewed-by: Monk Liu <monk.liu@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
---
 drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c
index 275378c..2c3d955 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c
@@ -185,7 +185,7 @@ int amdgpu_vm_grab_id(struct amdgpu_vm *vm, struct amdgpu_ring *ring,
 		if (!id)
 			continue;
 
-		if (atomic_long_read(&id->owner) != (long)vm)
+		if (atomic_long_read(&id->owner) != vm->client_id)
 			continue;
 
 		if (pd_addr != id->pd_gpu_addr)
@@ -261,7 +261,7 @@ int amdgpu_vm_grab_id(struct amdgpu_vm *vm, struct amdgpu_ring *ring,
 
 	list_move_tail(&id->list, &adev->vm_manager.ids_lru);
 	id->last_user = ring;
-	atomic_long_set(&id->owner, (long)vm);
+	atomic_long_set(&id->owner, vm->client_id);
 	vm->ids[ring->idx] = id;
 
 	*vm_id = id - adev->vm_manager.ids;
@@ -1485,7 +1485,7 @@ void amdgpu_vm_fini(struct amdgpu_device *adev, struct amdgpu_vm *vm)
 				 list) {
 		if (!id)
 			continue;
-		if (atomic_long_read(&id->owner) == (long)vm) {
+		if (atomic_long_read(&id->owner) == vm->client_id) {
 			atomic_long_set(&id->owner, 0);
 			id->pd_gpu_addr = 0;
 		}
-- 
2.5.5

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

  parent reply	other threads:[~2016-05-04 18:27 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-05-04 18:26 [PATCH 01/14] drm/amdgpu: fix wrong release of vmid owner Alex Deucher
2016-05-04 18:26 ` [PATCH 02/14] drm/amdgpu: add client id for every vm Alex Deucher
2016-05-04 18:26 ` Alex Deucher [this message]
2016-05-04 18:26 ` [PATCH 04/14] drm/amdgpu: keep vm in job instead of ib (v2) Alex Deucher
2016-05-04 18:26 ` [PATCH 05/14] drm/amdgpu: use fence_context to judge ctx switch Alex Deucher
2016-05-04 18:26 ` [PATCH 06/14] drm/amdgpu: add pipeline sync for compute job Alex Deucher
2016-05-04 18:26 ` [PATCH 07/14] drm/amd/amdgpu: Enable CG for UVD6 on Carrizo Alex Deucher
2016-05-04 18:26 ` [PATCH 08/14] drm/amdgpu: hdp flush&inval should always do Alex Deucher
2016-05-04 18:26 ` [PATCH 09/14] drm/amdgpu: two minor 80 char fixes Alex Deucher
2016-05-04 18:26 ` [PATCH 10/14] drm/amdgpu: make the VMID owner always 64bit Alex Deucher
2016-05-04 18:26 ` [PATCH 11/14] drm/amdgpu: remove owner cleanup v2 Alex Deucher
2016-05-04 18:26 ` [PATCH 12/14] drm/amdgpu: remove define for reserved client ID Alex Deucher
2016-05-04 18:26 ` [PATCH 13/14] drm/amd: cleanup remaining spaces and tabs v2 Alex Deucher
2016-05-04 18:26 ` [PATCH 14/14] drm/amdgpu: fetch cu_info once at init Alex Deucher
2016-05-09  8:17 ` [PATCH 01/14] drm/amdgpu: fix wrong release of vmid owner Daniel Vetter
2016-05-10  5:05   ` Dave Airlie
2016-05-10  8:21     ` Christian König
2016-05-11  7:46       ` Daniel Vetter
2016-05-11  7:48         ` Dave Airlie

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=1462386415-25600-3-git-send-email-alexander.deucher@amd.com \
    --to=alexdeucher@gmail.com \
    --cc=alexander.deucher@amd.com \
    --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