dri-devel Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: "Christian König" <deathsimple@vodafone.de>
To: alexdeucher@gmail.com
Cc: dri-devel@lists.freedesktop.org
Subject: [PATCH 2/7] drm/radeon: drop the handle from radeon_cs_reloc
Date: Thu, 27 Nov 2014 14:48:41 +0100	[thread overview]
Message-ID: <1417096126-14859-2-git-send-email-deathsimple@vodafone.de> (raw)
In-Reply-To: <1417096126-14859-1-git-send-email-deathsimple@vodafone.de>

From: Christian König <christian.koenig@amd.com>

It's only used for duplicate check and that
can be done on the original as well.

Signed-off-by: Christian König <christian.koenig@amd.com>
---
 drivers/gpu/drm/radeon/radeon.h    | 1 -
 drivers/gpu/drm/radeon/radeon_cs.c | 6 +++---
 drivers/gpu/drm/radeon/radeon_vm.c | 2 --
 3 files changed, 3 insertions(+), 6 deletions(-)

diff --git a/drivers/gpu/drm/radeon/radeon.h b/drivers/gpu/drm/radeon/radeon.h
index 4a09ffd..17db846 100644
--- a/drivers/gpu/drm/radeon/radeon.h
+++ b/drivers/gpu/drm/radeon/radeon.h
@@ -1051,7 +1051,6 @@ struct radeon_cs_reloc {
 	unsigned			prefered_domains;
 	unsigned			allowed_domains;
 	uint32_t			tiling_flags;
-	uint32_t			handle;
 };
 
 struct radeon_cs_chunk {
diff --git a/drivers/gpu/drm/radeon/radeon_cs.c b/drivers/gpu/drm/radeon/radeon_cs.c
index 7846c3e..f1f584a 100644
--- a/drivers/gpu/drm/radeon/radeon_cs.c
+++ b/drivers/gpu/drm/radeon/radeon_cs.c
@@ -107,14 +107,15 @@ static int radeon_cs_parser_relocs(struct radeon_cs_parser *p)
 		duplicate = false;
 		r = (struct drm_radeon_cs_reloc *)&chunk->kdata[i*4];
 		for (j = 0; j < i; j++) {
-			if (r->handle == p->relocs[j].handle) {
+			struct drm_radeon_cs_reloc *other;
+			other = (void *)&chunk->kdata[j*4];
+			if (r->handle == other->handle) {
 				p->relocs_ptr[i] = &p->relocs[j];
 				duplicate = true;
 				break;
 			}
 		}
 		if (duplicate) {
-			p->relocs[i].handle = 0;
 			continue;
 		}
 
@@ -184,7 +185,6 @@ static int radeon_cs_parser_relocs(struct radeon_cs_parser *p)
 
 		p->relocs[i].tv.bo = &p->relocs[i].robj->tbo;
 		p->relocs[i].tv.shared = !r->write_domain;
-		p->relocs[i].handle = r->handle;
 
 		radeon_cs_buckets_add(&buckets, &p->relocs[i].tv.head,
 				      priority);
diff --git a/drivers/gpu/drm/radeon/radeon_vm.c b/drivers/gpu/drm/radeon/radeon_vm.c
index 2b2eb1c..c4ffe02 100644
--- a/drivers/gpu/drm/radeon/radeon_vm.c
+++ b/drivers/gpu/drm/radeon/radeon_vm.c
@@ -144,7 +144,6 @@ struct radeon_cs_reloc *radeon_vm_get_bos(struct radeon_device *rdev,
 	list[0].tv.bo = &vm->page_directory->tbo;
 	list[0].tv.shared = true;
 	list[0].tiling_flags = 0;
-	list[0].handle = 0;
 	list_add(&list[0].tv.head, head);
 
 	for (i = 0, idx = 1; i <= vm->max_pde_used; i++) {
@@ -157,7 +156,6 @@ struct radeon_cs_reloc *radeon_vm_get_bos(struct radeon_device *rdev,
 		list[idx].tv.bo = &list[idx].robj->tbo;
 		list[idx].tv.shared = true;
 		list[idx].tiling_flags = 0;
-		list[idx].handle = 0;
 		list_add(&list[idx++].tv.head, head);
 	}
 
-- 
1.9.1

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

  reply	other threads:[~2014-11-27 13:48 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-11-27 13:48 [PATCH 1/7] drm/radeon drop gobj from radeon_cs_reloc Christian König
2014-11-27 13:48 ` Christian König [this message]
2014-11-27 13:48 ` [PATCH 3/7] drm/radeon: rename radeon_cs_reloc to radeon_bo_list Christian König
2014-11-27 13:48 ` [PATCH 4/7] drm/radeon: fence PT updates as shared Christian König
2014-11-27 13:48 ` [PATCH 5/7] drm/radeon: add spinlock for BO_VA status protection Christian König
2014-11-28  2:52   ` Dieter Nützel
2014-11-27 13:48 ` [PATCH 6/7] drm/radeon: take VM lock before BO locks Christian König
2014-11-27 14:06   ` Christian König
2014-12-01  3:30     ` Alex Deucher
2014-11-27 13:48 ` [PATCH 7/7] drm/radeon: don't allocate PD/PT BO list any more Christian König

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=1417096126-14859-2-git-send-email-deathsimple@vodafone.de \
    --to=deathsimple@vodafone.de \
    --cc=alexdeucher@gmail.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