]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/commit - drivers/gpu/drm/i915/i915_gem_gtt.c
drm/i915: Segregate memory domains in the GTT using coloring
authorChris Wilson <chris@chris-wilson.co.uk>
Thu, 26 Jul 2012 10:49:32 +0000 (11:49 +0100)
committerDaniel Vetter <daniel.vetter@ffwll.ch>
Thu, 26 Jul 2012 10:56:25 +0000 (12:56 +0200)
commit42d6ab4839799b2f246748ce663d6b023f02bb73
tree33c8f55e3a4dfd9f62df68894685af6c11921767
parentf27b92651d72e863c308ea5dca5615fc98e38ca6
drm/i915: Segregate memory domains in the GTT using coloring

Several functions of the GPU have the restriction that differing memory
domains cannot be placed next to each other (as the GPU may prefetch
beyond the end of one domain and hang as it crosses into the other
domain). We use the facility of the drm_mm to mark ranges with a
particular color that corresponds to the cache attributes of those pages
in order to prevent allocating adjacent blocks of differing memory
types.

v2: Rebase ontop of drm_mm coloring v2.
v3: Fix rebinding existing gtt_space and add a verification routine.

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