summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/i915/i915_drv.h
diff options
context:
space:
mode:
authorChris Wilson <chris@chris-wilson.co.uk>2010-12-08 10:38:14 +0000
committerChris Wilson <chris@chris-wilson.co.uk>2010-12-09 19:46:21 +0000
commit67731b87e9572801c41f8fe779750babdd362416 (patch)
tree5773669e611ba29ef8f97a6b5f87158fa262549c /drivers/gpu/drm/i915/i915_drv.h
parentff7ea4c04012e01a9a50c5e42dabdaf0794734ce (diff)
drm/i915: Eliminate drm_gem_object_lookup during relocation
As we provide a list of all objects that will be accessed from the batchbuffer, we can build a lut of the handles associated with those objects for this invocation and use that to avoid the overhead of looking up those objects again for every relocation. The cost of building and searching a small hash table is much less than that of acquiring a spinlock, searching a radix tree and manipulating an atomic refcnt per relocation. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Diffstat (limited to 'drivers/gpu/drm/i915/i915_drv.h')
-rw-r--r--drivers/gpu/drm/i915/i915_drv.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/gpu/drm/i915/i915_drv.h b/drivers/gpu/drm/i915/i915_drv.h
index d9b54a27ccf..b8a55008a1b 100644
--- a/drivers/gpu/drm/i915/i915_drv.h
+++ b/drivers/gpu/drm/i915/i915_drv.h
@@ -789,6 +789,12 @@ struct drm_i915_gem_object {
int num_sg;
/**
+ * Used for performing relocations during execbuffer insertion.
+ */
+ struct hlist_node exec_node;
+ unsigned long exec_handle;
+
+ /**
* Current offset of the object in GTT space.
*
* This is the same as gtt_space->start