[Intel-gfx] [PATCH 04/13] drm/i915: Introduce i915_gem_object_finish_gtt()

Daniel Vetter daniel at ffwll.ch
Thu Apr 14 18:12:13 CEST 2011


On Thu, Apr 14, 2011 at 10:03:38AM +0100, Chris Wilson wrote:
> 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.

Our maze of cache handling functions, all alike is starting to get
annoying. Especially these finish functions which are essentially two-way
barriers and hence contain all the code that already exists in the from of
flush_foo_write_domain.

But every time I bang my head against this particular wall, the only thing
I can come up with is some abomination from hell. And I've been tossing
around ideas for the better part of a year already with no luck.

Reviewed-by: Daniel Vetter <daniel.vetter at ffwll.ch>
-- 
Daniel Vetter
Mail: daniel at ffwll.ch
Mobile: +41 (0)79 365 57 48



More information about the Intel-gfx mailing list