drm/i915: reuse i915_gem_object_put_fence_reg for fence stealing code
authorDaniel Vetter <daniel.vetter@ffwll.ch>
Fri, 19 Feb 2010 10:51:56 +0000 (11:51 +0100)
committerEric Anholt <eric@anholt.net>
Fri, 26 Feb 2010 21:23:21 +0000 (13:23 -0800)
commit798750e30d3de7932b0ac420f8fae2a970f2ac34
treef272868107b9e8193e8344dd75d4dceaefa2d924
parent1f7a6e372e9cb4d749f34c0738d832e6cadb4071
drm/i915: reuse i915_gem_object_put_fence_reg for fence stealing code

This has a few functional changes against the old code:

* a few more unnecessary loads and stores to the drm_i915_fence_reg
  objects. Also an unnecessary store to the hw fence register.

* zaps any userspace mappings before doing other flushes. Only changes
  anything when userspace does racy stuff against itself.

* also flush GTT domain. This is a noop, but still try to keep the
  bookkeeping correct.

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Signed-off-by: Eric Anholt <eric@anholt.net>
drivers/gpu/drm/i915/i915_gem.c