drm/i915: Ensure gem_contexts selftests work with unbind changes, v2.
authorMaarten Lankhorst <maarten.lankhorst@linux.intel.com>
Thu, 16 Dec 2021 14:27:38 +0000 (15:27 +0100)
committerMaarten Lankhorst <maarten.lankhorst@linux.intel.com>
Mon, 20 Dec 2021 15:33:30 +0000 (16:33 +0100)
commitfd06ccf15987dd94dfb902f328ef06c010bc7972
tree8210535d94489f806e3f923db5a73f046f7f45b4
parent576c4ef510d7ad7f43730ba799441b0f24a29b1d
drm/i915: Ensure gem_contexts selftests work with unbind changes, v2.

In the next commits, we may not evict when refcount = 0.

igt_vm_isolation() continuously tries to pin/unpin at same address,
but also calls put() on the object, which means the object may not
be unpinned in time.

Instead of this, re-use the same object over and over, so they can
be unbound as required.

Changes since v1:
- Fix cleaning up obj_b on failure. (Matt)

Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
Reviewed-by: Matthew Auld <matthew.auld@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20211216142749.1966107-7-maarten.lankhorst@linux.intel.com
drivers/gpu/drm/i915/gem/selftests/i915_gem_context.c