aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPauli Nieminen2009-08-29 04:08:57 -0500
committerPauli Nieminen2010-03-17 05:42:21 -0500
commit966c9907c040b4fe4b288b4a9d82598797aee743 (patch)
tree59a9f29ede30ab039a3a4151d2a9b1a9d30796cc /radeon/radeon_cs.h
parent21105bc186d188f0bfc2f41c52b4b0ceb6742cf5 (diff)
downloadexternal-libgbm-966c9907c040b4fe4b288b4a9d82598797aee743.tar.gz
external-libgbm-966c9907c040b4fe4b288b4a9d82598797aee743.tar.xz
external-libgbm-966c9907c040b4fe4b288b4a9d82598797aee743.zip
libdrm_radeon: Optimize cs_gem_reloc to do less looping.
bo->referenced_in_cs is checked if bo is already in cs. Adding and removing reference in bo is done with atomic operations to allow parallel access to a bo from multiple contexts. cs->id generation code quarentees there is not duplicated ids which limits number of cs->ids to 32. If there is more cs objects rest will get id 0. V2: - Fix configure to check for atomics operations if libdrm_radeon is only selected. - Make atomic operations private to libdrm. This optimization decreases cs_write_reloc share of torcs profiling from 4.3% to 2.6%. Tested-by: Michel Dänzer <michel@daenzer.net> Signed-off-by: Pauli Nieminen <suokkos@gmail.com>
Diffstat (limited to 'radeon/radeon_cs.h')
-rw-r--r--radeon/radeon_cs.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/radeon/radeon_cs.h b/radeon/radeon_cs.h
index 49d5d9a6..7f6ee68b 100644
--- a/radeon/radeon_cs.h
+++ b/radeon/radeon_cs.h
@@ -85,7 +85,7 @@ extern int radeon_cs_write_reloc(struct radeon_cs *cs,
85 uint32_t read_domain, 85 uint32_t read_domain,
86 uint32_t write_domain, 86 uint32_t write_domain,
87 uint32_t flags); 87 uint32_t flags);
88 88extern uint32_t radeon_cs_get_id(struct radeon_cs *cs);
89/* 89/*
90 * add a persistent BO to the list 90 * add a persistent BO to the list
91 * a persistent BO is one that will be referenced across flushes, 91 * a persistent BO is one that will be referenced across flushes,