drm/i915: Add object locking to i915_gem_evict_for_node and i915_gem_evict_something...
authorMaarten Lankhorst <maarten.lankhorst@linux.intel.com>
Fri, 14 Jan 2022 13:23:17 +0000 (14:23 +0100)
committerMaarten Lankhorst <maarten.lankhorst@linux.intel.com>
Tue, 18 Jan 2022 11:18:03 +0000 (12:18 +0100)
commit7e00897be8bf13ef9c68c95a8e386b714c29ad95
tree12b16032311cf817c6fc874bbb221f77e4f9f236
parent6945c53bc712cf4a28a46fe46c2bd8526ea261d1
drm/i915: Add object locking to i915_gem_evict_for_node and i915_gem_evict_something, v2.

Because we will start to require the obj->resv lock for unbinding,
ensure these vma eviction utility functions also take the lock.

This requires some function signature changes, to ensure that the
ww context is passed around, but is mostly straightforward.

Previously this was split up into several patches, but reworking
should allow for easier bisection.

Changes since v1:
- Handle evicting dead objects better.

Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
Reviewed-by: Thomas Hellström <thomas.hellstrom@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20220114132320.109030-4-maarten.lankhorst@linux.intel.com
drivers/gpu/drm/i915/gt/intel_ggtt.c
drivers/gpu/drm/i915/gt/selftest_hangcheck.c
drivers/gpu/drm/i915/gvt/aperture_gm.c
drivers/gpu/drm/i915/i915_drv.h
drivers/gpu/drm/i915/i915_gem_evict.c
drivers/gpu/drm/i915/i915_gem_gtt.c
drivers/gpu/drm/i915/i915_gem_gtt.h
drivers/gpu/drm/i915/i915_vgpu.c
drivers/gpu/drm/i915/i915_vma.c
drivers/gpu/drm/i915/selftests/i915_gem_evict.c
drivers/gpu/drm/i915/selftests/i915_gem_gtt.c