diff options
author | Christian König <christian.koenig@amd.com> | 2014-11-27 14:48:41 +0100 |
---|---|---|
committer | Alex Deucher <alexander.deucher@amd.com> | 2014-12-03 14:26:47 -0500 |
commit | fc003bd4de12a8935481b2097e4120796ef6efad (patch) | |
tree | ed697d02ca866cc2e3ae06dca9943f2b67051704 | |
parent | d33a8fc719e8d3cba537ae2bfa1152f35537e019 (diff) |
drm/radeon: drop the handle from radeon_cs_reloc
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>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
-rw-r--r-- | drivers/gpu/drm/radeon/radeon.h | 1 | ||||
-rw-r--r-- | drivers/gpu/drm/radeon/radeon_cs.c | 6 | ||||
-rw-r--r-- | 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 4a09ffdda00..17db846808a 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 7846c3e5faf..f1f584ae6c7 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 2b2eb1ce819..c4ffe026d24 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); } |