drm/i915: Assume exclusive access to objects inside resume
authorChris Wilson <chris@chris-wilson.co.uk>
Mon, 19 Aug 2019 20:07:05 +0000 (21:07 +0100)
committerChris Wilson <chris@chris-wilson.co.uk>
Mon, 19 Aug 2019 21:44:00 +0000 (22:44 +0100)
commit64b95df91f44837f961321a6c555409885ca59c4
tree82ab8e8532bef2d5816cff53a95b84726082feb6
parentcc3375607d79c368ec1dbeb4c2922371fffa19ca
drm/i915: Assume exclusive access to objects inside resume

Inside gtt_restore_mappings() we currently take the obj->resv->lock, but
in the future we need to avoid taking this fs-reclaim tainted lock as we
need to extend the coverage of the vm->mutex. Take advantage of the
single-threaded nature of the early resume phase, and do a single
wbinvd() to flush all the GTT objects en masse.

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/20190819200705.3631-1-chris@chris-wilson.co.uk
drivers/gpu/drm/i915/i915_gem_gtt.c