mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/herbert/cryptodev-2.6.git
synced 2026-04-23 05:56:14 -04:00
drm/i915: Use the async worker to avoid reclaim tainting the ggtt->mutex
On Braswell and Broxton (also known as Valleyview and Apollolake), we need to serialise updates of the GGTT using the big stop_machine() hammer. This has the side effect of appearing to lockdep as a possible reclaim (since it uses the cpuhp mutex and that is tainted by per-cpu allocations). However, we want to use vm->mutex (including ggtt->mutex) from within the shrinker and so must avoid such possible taints. For this purpose, we introduced the asynchronous vma binding and we can apply it to the PIN_GLOBAL so long as take care to add the necessary waits for the worker afterwards. Closes: https://gitlab.freedesktop.org/drm/intel/issues/211 Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Reviewed-by: Matthew Auld <matthew.auld@intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20200130181710.2030251-3-chris@chris-wilson.co.uk
This commit is contained in:
@@ -390,13 +390,19 @@ out:
|
||||
return err;
|
||||
}
|
||||
|
||||
void i915_active_set_exclusive(struct i915_active *ref, struct dma_fence *f)
|
||||
struct dma_fence *
|
||||
i915_active_set_exclusive(struct i915_active *ref, struct dma_fence *f)
|
||||
{
|
||||
struct dma_fence *prev;
|
||||
|
||||
/* We expect the caller to manage the exclusive timeline ordering */
|
||||
GEM_BUG_ON(i915_active_is_idle(ref));
|
||||
|
||||
if (!__i915_active_fence_set(&ref->excl, f))
|
||||
prev = __i915_active_fence_set(&ref->excl, f);
|
||||
if (!prev)
|
||||
atomic_inc(&ref->count);
|
||||
|
||||
return prev;
|
||||
}
|
||||
|
||||
bool i915_active_acquire_if_busy(struct i915_active *ref)
|
||||
|
||||
Reference in New Issue
Block a user