drm/i915: Introduce i915_gem_object_finish_gtt()
authorChris Wilson <chris@chris-wilson.co.uk>
Wed, 13 Apr 2011 21:06:03 +0000 (22:06 +0100)
committerKeith Packard <keithp@keithp.com>
Fri, 10 Jun 2011 04:51:14 +0000 (21:51 -0700)
commitb5ffc9bc38a4766d586c3aca6830ed2bd6952e5b
tree3aa6b8457262dba26505c18fcefc5d93ac5174f7
parenta8198eea156df47e0e843ac5c7d4c8774e121c42
drm/i915: Introduce i915_gem_object_finish_gtt()

Like its siblings finish_gpu(), this function clears the object from the
GTT domain forcing it to be trigger a domain invalidation should we ever
need to use via the GTT again.

Note that the most important side-effect of finishing the GTT domain
(aside from clearing the tracking read/write domains) is that it imposes
an memory barrier so that all accesses are complete before it returns,
which is important if you intend to be modifying translation tables
shortly afterwards. The second most important side-effect is that it
tears down the GTT mappings forcing a page-fault and invalidation on
next user access to the object.

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