]> git.baikalelectronics.ru Git - kernel.git/commit
drm/i915: Only bump refcnt on objects scheduled for eviction
authorChris Wilson <chris@chris-wilson.co.uk>
Fri, 24 Feb 2012 00:27:21 +0000 (00:27 +0000)
committerDaniel Vetter <daniel.vetter@ffwll.ch>
Mon, 27 Feb 2012 16:32:14 +0000 (17:32 +0100)
commit311af11bca1879d6d7151927c3033cdc10cb8b99
tree7d6c9c57dd9324378e67f53f785be3ef2e05d48a
parentcdf5dee9350851c1601a4643b3bf6d8c7ffc9bb0
drm/i915: Only bump refcnt on objects scheduled for eviction

Incrementing the reference count on all objects walked when searching
for space in the aperture is a non-neglible amount of overhead. In fact,
we only need to hold on to a reference for objects that we will evict,
so we can therefore delay the referencing until we find a suitable hole
and only add those objects that fall inside.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
drivers/gpu/drm/i915/i915_gem_evict.c