Chris Wilson 63fd659fb1 drm/i915/gtt: Pull global wc page stash under its own locking
Currently, the wc-stash used for providing flushed WC pages ready for
constructing the page directories is assumed to be protected by the
struct_mutex. However, we want to remove this global lock and so must
install a replacement global lock for accessing the global wc-stash (the
per-vm stash continues to be guarded by the vm).

We need to push ahead on this patch due to an oversight in hastily
removing the struct_mutex guard around the igt_ppgtt_alloc selftest. No
matter, it will prove very useful (i.e. will be required) in the near
future.

v2: Restore the onstack stash so that we can drop the vm->mutex in
future across the allocation.
v3: Restore the lost pagevec_init of the onstack allocation, and repaint
function names.
v4: Reorder init so that we don't try and use i915_address_space before
it is ininitialised.

Fixes: 1f6f00238abf ("drm/i915/selftests: Drop struct_mutex around lowlevel pggtt allocation")
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
Reviewed-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20180704185518.4193-1-chris@chris-wilson.co.uk
2018-07-04 21:23:11 +01:00
..
2018-01-30 18:05:25 +01:00
2018-04-25 09:09:22 +02:00
2018-04-30 09:32:43 +10:00
2018-03-28 14:30:41 +10:00
2018-04-30 09:32:43 +10:00
2018-03-28 14:30:41 +10:00
2018-03-28 14:30:41 +10:00
2018-04-30 09:32:43 +10:00
2018-04-30 09:32:43 +10:00
2017-12-27 19:00:09 -05:00
2018-04-30 09:32:43 +10:00
2018-04-30 09:32:43 +10:00
2018-04-25 09:09:22 +02:00
2018-04-30 09:32:43 +10:00
2018-04-30 09:32:43 +10:00
2018-03-29 19:14:21 +03:00
2018-04-30 09:32:43 +10:00
2018-03-28 14:30:41 +10:00
2017-12-19 21:37:24 +10:00
2018-03-28 14:30:41 +10:00