drm/i915: Mark up vma->active as safe for use inside shrinkers
authorChris Wilson <chris@chris-wilson.co.uk>
Wed, 3 Jul 2019 09:17:19 +0000 (10:17 +0100)
committerChris Wilson <chris@chris-wilson.co.uk>
Wed, 3 Jul 2019 11:24:08 +0000 (12:24 +0100)
commit09480072e3ee471fe2735d46f454483f4c26853b
treeedd0b9dcd1835dcc240462d6211fbb8eb17e6438
parentd650d1f5cfd7ca607dbbb2023b76c2afa873246a
drm/i915: Mark up vma->active as safe for use inside shrinkers

Since a shrinker may be forced to wait on GPU activity,
i915_active_wait(&vma->active) must be safe for use inside a shrinker,
and so let's mark up the lock as being acquired by the shrinker to avoid
any nasty surprises creeping in.

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/20190703091726.11690-8-chris@chris-wilson.co.uk
drivers/gpu/drm/i915/i915_vma.c