summaryrefslogtreecommitdiff
path: root/tests/i915/gem_vm_create.c
AgeCommit message (Collapse)Author
2021-07-08tests/i915/gem_vm_create: Use intel_ctx_t in the execbuf testJason Ekstrand
Signed-off-by: Jason Ekstrand <jason@jlekstrand.net> Reviewed-by: Ashutosh Dixit <ashutosh.dixit@intel.com> Acked-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
2021-07-08tests/i915/gem_vm_create: Delete destroy racing testsJason Ekstrand
The races these tests attempt to exercise won't exist once we rework the context creation to make the VM immutable state. Signed-off-by: Jason Ekstrand <jason@jlekstrand.net> Reviewed-by: Ashutosh Dixit <ashutosh.dixit@intel.com> Acked-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
2021-06-10lib/dummyload: Rename igt_spin_factory::ctx to ctx_idJason Ekstrand
Signed-off-by: Jason Ekstrand <jason@jlekstrand.net> Acked-by: Daniel Vetter <daniel.vetter@ffwll.ch> Reviewed-by: Zbigniew Kempczyński <zbigniew.kempczynski@intel.com>
2021-05-27lib/i915/gem_create: Add gem_create_extAndrzej Turko
Add a wrapper for gem_create_ext ioctl (a version of gem_create that accepts extensions). In preparation for the driver change implementing it, a local definition of its id and necessary structs have been added, which are to be erased as soon as those definitions appear in the i915_drm.h file. The new ioctl wrapper is added to a separate file. For consistency the wrapper of the old ioctl, gem_create is moved from ioctl_wrappers to gem_create. Signed-off-by: Andrzej Turko <andrzej.turko@linux.intel.com> Cc: Zbigniew Kempczynski <zbigniew.kempczynski@intel.com> Cc: Dominik Grzegorzek <dominik.grzegorzek@intel.com> Cc: Petri Latvala <petri.latvala@intel.com> Cc: Chris P Wilson <chris.p.wilson@intel.com> Signed-off-by: Matthew Auld <matthew.auld@intel.com> Acked-by: Petri Latvala <petri.latvala@intel.com>
2020-12-11i915/gem_vm_create: Race vm-destroy against object freeChris Wilson
Matthew postulated that we should be able to hit a race in __i915_vm_close() between the RCU object free and vma unbind viz GEM_BUG_ON(!list_empty(&vm->bound_list)); due to the effect of leaving the vma on the list if we are unable to obtain the kref to the object. Let's try and find that race. In practice, this does not happen because to race the object free vma cleanup against vm close requires a leak of a ppGTT vma. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Cc: Matthew Auld <matthew.auld@intel.com> Acked-by: Matthew Auld <matthew.auld@intel.com>
2020-10-15tests/i915: Treat gen as unsigned for forward compatibilityChris Wilson
We want to recognise future devices (gen = -1u) and treat them as an extension of the latest known device, which is typically true. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Acked-by: Zbigniew Kempczyński <zbigniew.kempczynski@intel.com>
2020-05-07lib/i915: Split igt_require_gem() into i915/Chris Wilson
igt_require_gem() is a pecularity of i915/, move it out of the core. Similar opportunistic move of gem_reopen_driver() and gem_quiescent_gpu(). Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2020-03-24i915/gem_vm_create: Update of active VM disallowedChris Wilson
Allow the kernel the rights to reject updating an active VM with -EBUSY. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2020-02-19i915/gem_vm_create: Call set-domain manuallyChris Wilson
Since we are secretly using execbuf to write into an object's location, then read back from the object we must manually handle the domain changes. Closes: https://gitlab.freedesktop.org/drm/intel/issues/314 Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Acked-by: Mika Kuoppala <mika.kuoppala@linux.intel.com>
2019-06-04i915: Add gem_vm_createChris Wilson
Exercise basic creation and swapping between new address spaces. v2: Check isolation that the same vm_id on different fd are indeed different VM. v3: Cross-over check with CREATE_EXT_SETPARAM 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>