diff options
author | Chris Wilson <chris@chris-wilson.co.uk> | 2010-12-08 13:38:14 +0300 |
---|---|---|
committer | Chris Wilson <chris@chris-wilson.co.uk> | 2010-12-09 22:46:21 +0300 |
commit | 67731b87e9572801c41f8fe779750babdd362416 (patch) | |
tree | 5773669e611ba29ef8f97a6b5f87158fa262549c /drivers/gpu/drm/i915/i915_drv.h | |
parent | ff7ea4c04012e01a9a50c5e42dabdaf0794734ce (diff) | |
download | linux-67731b87e9572801c41f8fe779750babdd362416.tar.xz |
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.h | 6 |
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 d9b54a27ccf8..b8a55008a1b5 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 |