summaryrefslogtreecommitdiff
path: root/tests/i915/gem_ctx_exec.c
AgeCommit message (Collapse)Author
2022-05-31igt: Promote/rename OS helpersRob Clark
Promote intel_os.c helpers to igt_os.c, so that I can re-use them for some additional msm tests. Just big churny rename, no functional change. Signed-off-by: Rob Clark <robdclark@chromium.org> Reviewed-by: Petri Latvala <petri.latvala@intel.com>
2022-03-14i915/gem_ctx_exec: Added test description for testcasePriyanka Dandamudi
Added test description to all the available subtests. v2: Added description for newly added test case. v3: Modified test descriptions. Cc: Melkaveri Arjun <arjun.melkaveri@intel.com> Cc: Kamil Konieczny <kamil.konieczny@linux.intel.com> Signed-off-by: Priyanka Dandamudi <priyanka.dandamudi@intel.com> Reviewed-by: Kamil Konieczny <kamil.konieczny@linux.intel.com>
2021-08-10tests/gem_ctx_exec: Adopt to use allocatorZbigniew Kempczyński
For newer gens we're not able to rely on relocations. Adopt to use offsets acquired from the allocator. Signed-off-by: Zbigniew Kempczyński <zbigniew.kempczynski@intel.com> Cc: Petri Latvala <petri.latvala@intel.com> Cc: Ashutosh Dixit <ashutosh.dixit@intel.com> Reviewed-by: Ashutosh Dixit <ashutosh.dixit@intel.com>
2021-07-08tests/i915/gem_ctx_exec: Convert to intel_ctx_tJason Ekstrand
v2 (Jason Ekstrand): - Also use an intel_ctx_t for basic-norecovery Signed-off-by: Jason Ekstrand <jason@jlekstrand.net> Reviewed-by: Zbigniew Kempczyński <zbigniew.kempczynski@intel.com> Acked-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
2021-07-08tests/i915/gem_ctx_exec: Stop cloning contexts in close_raceJason Ekstrand
Nothing in this subtest sets the set of engines on ctx0 so there's no point in cloning them. Signed-off-by: Jason Ekstrand <jason@jlekstrand.net> Reviewed-by: Zbigniew Kempczyński <zbigniew.kempczynski@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-06i915/gem_ctx_exec: Check spinner requirements before forkChris Wilson
Do a check to see if we support a pollable spinner before forking to avoid upsetting libigt. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Acked-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
2020-12-04i915/gem_ctx_exec: Exercise execution along context while closing itChris Wilson
Race the execution and interrupt handlers along a context, while closing it at a random time. v2: Some comments to handwave away the knowledge of internal implementation details. 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>
2020-07-13i915/gem_ctx_exec: Set a fast preempt timeout for nohangcheckChris Wilson
We want the test to run in a reasonable time, and verify that if the hangcheck modparam is disabled we can still recover from a dead context. The issue is that we've disabled preempt_timeout on tgl/rcs0 by default, and so since we want this test to be fast, we need to re-enable it for the test. Otherwise, we would have to wait several seconds for the heartbeat to notice the hung engine, exceeding the limits imposed on the test. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Acked-by: Mika Kuoppala <mika.kuoppala@linux.intel.com>
2020-06-07i915/gem_ctx_exec: Bump timeout for preempt-resetChris Wilson
Since preempt-reset is 640ms we have to wait at least that long to recover from a hostile client. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Acked-by: Mika Kuoppala <mika.kuoppala@linux.intel.com>
2020-05-08lib/params: start renaming functions igt_params_*Juha-Pekka Heikkila
Signed-off-by: Jani Nikula <jani.nikula@intel.com> Signed-off-by: Juha-Pekka Heikkila <juhapekka.heikkila@gmail.com> Reviewed-by: Petri Latvala <petri.latvala@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-02-08i915/gem_ctx_exec: Flood the nohangcheck with spinnersChris Wilson
One hostile request is easily to defeat, but we tripped over dealing with a couple! Maximise the evil! References: https://gitlab.freedesktop.org/drm/intel/issues/1166 Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Acked-by: Andi Shyti <andi.shyti@intel.com>
2020-02-05i915/gem_ctx_exec: Update the list of engines on the actual contextChris Wilson
We want to iterate the set of physical engines on this context, so update the iterators to act on a particular context. This tunnel keeps on getting longer. 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>
2020-02-04i915/gem_ctx_exec: Cover all engines for nohangcheckChris Wilson
No engine can be missed when verifying that a rogue user cannot cause a denial-of-service with nohangcheck. 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>
2019-12-03tests/i915/gem: remove igt_skip_on_simulation()Swati Sharma
Removing igt_skip_on_simulation() from all the gem tests since this feature is not supported anymore. v2: Rebase v3: Corrected build failure, because of deletion of gem_exec_blt.c Signed-off-by: Swati Sharma <swati2.sharma@intel.com> Signed-off-by: Karthik B S <karthik.b.s@intel.com> Reviewed-by: Martin Peres <martin.peres@linux.intel.com>
2019-11-22test/i915: gem_ctx_exec: Drop engine in invalid context subtestVenkata Sandeep Dhanalakota
Make invalid context subtest independent of engines, as the intent of the subtest is to verify if using an invalid context returns an error. Cc: Andi Shyti <andi.shyti@intel.com> Cc: Chris Wilson <chris@chris-wilson.co.uk> Cc: Tvrtko Ursulin <tvrtko.ursulin@linux.intel.com> Signed-off-by: Venkata Sandeep Dhanalakota <venkata.s.dhanalakota@intel.com> Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
2019-10-27i915/gem_ctx_exec: Enable resets for basic-nohangcheckChris Wilson
Wrap the test inside igt_allow_hang as we depend upon a fast reset to cancel the hostile context. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Acked-by: Andi Shyti <andi.shyti@intel.com>
2019-10-26i915/gem_ctx_exec: Initialise errChris Wilson
Set the err to 0 for success! Fixes: fb817cd37bcd ("i915/gem_ctx_exec: Restore i915.enable_hangcheck before failing") Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Reviewed-by: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
2019-10-25i915/gem_ctx_exec: Restore i915.enable_hangcheck before failingChris Wilson
If the test fails, don't abort leaving the global i915.enable_hangcheck still disabled as that may affect later tests. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=112118 Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Reviewed-by: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
2019-10-23i915: Exercise hostile context executionChris Wilson
Verify that contexts are automatically shotdown on close if hangchecking is disabled. Basic environmental robustness test stolen from gem_ctx_persistence. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Cc: Jon Bloomfield <jon.bloomfield@intel.com> Cc: Tvrtko Ursulin <tvrtko.ursulin@intel.com> Acked-by: Andi Shyti <andi.shyti@intel.com>
2019-05-22test/i915: gem_ctx_exec: use the gem_engine_topology libraryAndi Shyti
Replace the legacy for_each_engine* defines with the ones implemented in the gem_engine_topology library. Signed-off-by: Andi Shyti <andi.shyti@intel.com> Cc: Chris Wilson <chris@chris-wilson.co.uk> Cc: Tvrtko Ursulin <tvrtko.ursulin@linux.intel.com> Cc: Daniel Vetter <daniel.vetter@ffwll.ch> Reviewed-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
2019-04-18lib/igt_dummyload: Get rid of 'batch' on spinner accessorsMika Kuoppala
There is no guarantee that spinners are and will be implemented using batches. As we have igt_spin_t, manipulate it through igt_spin_* functions consistently and hide the batch nature. Cc: Chris Wilson <chris@chris-wilson.co.uk> Signed-off-by: Mika Kuoppala <mika.kuoppala@linux.intel.com> Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
2019-04-18lib/igt_dummyload: libify checks for spin batch activationMika Kuoppala
Instead of opencoding the poll into the spinner, use a helper to check if spinner has started. v2: use zero as presumed offset (Chris) v3: cleanup the relocs (Chris) v4: leave the domains to zero, avoid relocation (Chris) Cc: Chris Wilson <chris@chris-wilson.co.uk> Signed-off-by: Mika Kuoppala <mika.kuoppala@linux.intel.com> Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
2019-02-20i915/gem_ctx_exec: Remember to ask for permission to reset the GPUChris Wilson
norecovery intentionally issues a GPU reset, but we should only do so after confirming with the kernel that this can work. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=109691 Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Reviewed-by: Mika Kuoppala <mika.kuoppala@linux.intel.com>
2019-02-18igt/gem_ctx_exec: Exercise I915_CONTEXT_PARAM_RECOVERABLEChris Wilson
When RECOVERABLE is set, the kernel will attempt to automatically recover a context after a hang. But if it is unset, the kernel will ban the guilty context on a hang, preventing subsequent execution. v2: Create a has_recoverable_param() Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Cc: Mika Kuoppala <mika.kuoppala@intel.com> Reviewed-by: Mika Kuoppala <mika.kuoppala@linux.intel.com>
2018-10-23tests: Introduce i915 directoryArkadiusz Hiler
We can already move all the tests with distinct prefixes: gem_, gen3_ and i915_. pm_ and drv_ tests will follow in batches, so we can do the adjustments in the reporting/filtering layer of the CI system. v2: Fix test-list.txt generation with meson v3: Fix docs build (Petri) Cc: Chris Wilson <chris@chris-wilson.co.uk> Cc: Petri Latvala <petri.latvala@intel.com> Cc: Martin Peres <martin.peres@linux.intel.com> Signed-off-by: Arkadiusz Hiler <arkadiusz.hiler@intel.com> Reviewed-by: Petri Latvala <petri.latvala@intel.com> Tested-by: Petri Latvala <petri.latvala@intel.com> Acked-by: Daniel Vetter <daniel.vetter@ffwll.ch> Acked-by: Chris Wilson <chris@chris-wilson.co.uk>