]> git.baikalelectronics.ru Git - kernel.git/commit
drm/i915: Flush to GTT domain all GGTT bound objects after hibernation
authorChris Wilson <chris@chris-wilson.co.uk>
Fri, 9 Sep 2016 20:19:57 +0000 (21:19 +0100)
committerChris Wilson <chris@chris-wilson.co.uk>
Fri, 9 Sep 2016 20:31:43 +0000 (21:31 +0100)
commit76d51841a90f47722a5d63a78ee9d0f95310e5ab
tree163127dd199b46cce3ff35ac8adb2615c1be1bb3
parent232a9efca57904d08b0611d7a124a7e9cc32e18a
drm/i915: Flush to GTT domain all GGTT bound objects after hibernation

Recently I have been applying an optimisation to avoid stalling and
clflushing GGTT objects based on their current binding. That is we only
set-to-gtt-domain upon first bind. However, on hibernation the objects
remain bound, but they are in the CPU domain. Currently (since commit
b3db0d632a04 ("drm/i915: Lazily migrate the objects after hibernation"))
we only flush scanout objects as all other objects are expected to be
flushed prior to use. That breaks down in the face of the runtime
optimisation above - and we need to flush all GGTT pinned objects
(essentially ringbuffers).

To reduce the burden of extra clflushes, we only flush those objects we
cannot discard from the GGTT. Everything pinned to the scanout, or
current contexts or ringbuffers will be flushed and rebound. Other
objects, such as inactive contexts, will be left unbound and in the CPU
domain until first use after resuming.

Fixes: c2da8bbd82a6 ("drm/i915: Only change the context object's domain...")
Fixes: 28bd803e5a37 ("drm/i915: Use VMA for ringbuffer tracking")
References: https://bugs.freedesktop.org/show_bug.cgi?id=94722
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
Cc: Mika Kuoppala <mika.kuoppala@intel.com>
Cc: David Weinehall <david.weinehall@intel.com>
Reviewed-by: Matthew Auld <matthew.auld@intel.com>
Link: http://patchwork.freedesktop.org/patch/msgid/20160909201957.2499-1-chris@chris-wilson.co.uk
drivers/gpu/drm/i915/i915_gem_gtt.c