summaryrefslogtreecommitdiff
path: root/tests/prime_busy.c
AgeCommit message (Collapse)Author
2022-06-13prime_busy: Replace open-coded spinner with igt_spin_tChris Wilson
Now that we can create arbitrary dependencies with the igt_spin_t dummy load, we can replace the custom spinner in prime_busy. v2: put_ahnd() used [Zbigniew] Signed-off-by: Chris Wilson <chris.p.wilson@intel.com> Signed-off-by: Ramalingam C <ramalingam.c@intel.com> Reviewed-by: Zbigniew Kempczynski <zbigniew.kempczynski@intel.com>
2022-02-07i915/tests: Pass right ctx id into igt_allow_hang()Chuansheng Liu
Just like the commit 74fc362b425c(i915/gem_busy: Prevent context ban with right ctx id), some codes are using the constant ctx id 0 passed into igt_allow_hang(), it may cause test failures. This patch is to correct them with right ctx id for the below tests: tests/i915/prime_busy tests/i915/gem_ctx_persistence tests/i915/gem_exec_schedule tests/i915/gem_wait Cc: Ashutosh Dixit <ashutosh.dixit@intel.com> Signed-off-by: Chuansheng Liu <chuansheng.liu@intel.com> Reviewed-by: Ashutosh Dixit <ashutosh.dixit@intel.com>
2021-10-04tests/i915: use device_coherent mmapPriyanka Dandamudi
Update mmap__wc with mmap__device_coherent, as it works on discrete platforms, while still using an explicit WC mmap on integrated platforms. Below are the updated tests: gem_exec_capture gem_exec_nop perf_pmu prime_busy Signed-off-by: Priyanka Dandamudi <priyanka.dandamudi@intel.com> Cc: Matthew Auld <matthew.auld@intel.com> Cc: Ashutosh Dixit <ashutosh.dixit@intel.com> Reviewed-by: Matthew Auld <matthew.auld@intel.com>
2021-07-08tests/prime_busy: Convert to intel_ctx_tJason Ekstrand
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-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-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-04-03prime_busy: Dynamic active engine testsChris Wilson
Use igt_subtest_with_dynamic for the flexible approach to engine dependent test discovery. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Acked-by: Mika Kuoppala <mika.kuoppala@linux.intel.com>
2019-12-03tests: remove igt_skip_on_simulation()Swati Sharma
Removing igt_skip_on_simulation() from tests since this feature is not supported anymore. v2: Rebase v3: Removed skip_on_simulation() from tests/dumb_buffer 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-15lib/i915: Add query to detect if engine accepts only ro batchesKuoppala, Mika
If cmd parser is mandatory, batch can't be modified post execbuf. Some tests rely on modifying batch post execbuf. Give those tests a method to query if those modifications ever reach the actual engine command stream. v2: pull in the test changes, doh v3: class based query v4: rebase Signed-off-by: Mika Kuoppala <mika.kuoppala@intel.com> Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
2019-10-26lib/i915: Use explicit iterator names in for_each_engine()Chris Wilson
Provide the iterator name as an explicit macro parameter so that it is known to the caller, and allows for them to properly nest loops over all engines. Fixes: ../tests/i915/gem_exec_schedule.c: In function ‘semaphore_noskip’: ../lib/igt_gt.h:84:44: warning: declaration of ‘e__’ shadows a previous local [-Wshadow] for (const struct intel_execution_engine *e__ = intel_execution_engines;\ ^~~ ../tests/i915/gem_exec_schedule.c:653:2: note: in expansion of macro ‘for_each_physical_engine’ for_each_physical_engine(i915, other) { ^~~~~~~~~~~~~~~~~~~~~~~~ ../lib/igt_gt.h:84:44: note: shadowed declaration is here for (const struct intel_execution_engine *e__ = intel_execution_engines;\ ^~~ ../tests/i915/gem_exec_schedule.c:652:2: note: in expansion of macro ‘for_each_physical_engine’ for_each_physical_engine(i915, engine) { ^~~~~~~~~~~~~~~~~~~~~~~~ ../tests/i915/gem_exec_schedule.c: In function ‘measure_semaphore_power’: ../lib/igt_gt.h:84:44: warning: declaration of ‘e__’ shadows a previous local [-Wshadow] for (const struct intel_execution_engine *e__ = intel_execution_engines;\ ^~~ ../tests/i915/gem_exec_schedule.c:1740:3: note: in expansion of macro ‘for_each_physical_engine’ for_each_physical_engine(i915, engine) { ^~~~~~~~~~~~~~~~~~~~~~~~ ../lib/igt_gt.h:84:44: note: shadowed declaration is here for (const struct intel_execution_engine *e__ = intel_execution_engines;\ ^~~ ../tests/i915/gem_exec_schedule.c:1719:2: note: in expansion of macro ‘for_each_physical_engine’ for_each_physical_engine(i915, signaler) { ^~~~~~~~~~~~~~~~~~~~~~~~ Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Cc: Tvrtko Ursulin <tvrtko.ursulin@intel.com> Cc: Andi Shyti <andi.shyti@intel.com>
2019-08-22prime_busy: Prebind the batch bufferChris Wilson
The test assumes that the dmabuf for the batch buffer has no exclusive fence. This is only true for the batch as it executes on the GPU; prior to that we may be in the process of moving it into memory and the ppGTT which cause the batch to carry an exclusive fence. Keep the test simple and prebind the batch buffer so that when we poll the dmabuf fd, we only expect it to be the spinning batch. Alternatively we could wait until we start writing values into scratch (i.e. igt_spin_busywait_until_started()). This seemed simpler. 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>
2017-10-18tests: Clean up igt_skip_on_simulation() usesArkadiusz Hiler
General update to reflect current state of things. Signed-off-by: Arkadiusz Hiler <arkadiusz.hiler@intel.com> Acked-by: Radoslaw Szwichtenberg <radoslaw.szwichtenberg@intel.com> Acked-by: Petri Latvala <petri.latvala@intel.com>
2017-09-19igt/prime_busy: Declare the hang tests expect to cause GPU hangsChris Wilson
Pull the two subtests together into the same subtest group as the fixtures were repeated for both and so we can consolidate down to one. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Cc: Mika Kuoppala <mika.kuoppala@linux.intel.com> Reviewed-by: Mika Kuoppala <mika.kuoppala@linux.intel.com>
2017-07-06Revert "igt: Remove default from the engine list"Chris Wilson
This reverts commit d7a0b61450797a3d6644c65aebf75c2a90da1a15.
2017-07-06igt: Remove default from the engine listTvrtko Ursulin
Default is not an engine but an ABI alias for RCS. Remove it from the engine list to eliminate redundant subtests and test passes. Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com> Acked-by: Daniel Vetter <daniel.vetter@intel.com>
2017-05-18lib: Refactor testing for ability to use MI_STORE_DATA_IMMChris Wilson
Rather than have the code in multiple locations, put a copy in lib/ Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2017-02-22igt: Start marking up GEM tests that require an alive GPU to functionChris Wilson
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2016-08-04Revert "tests/prime_busy: Remove unstable sub-test from BAT/add flag to ↵Chris Wilson
bring them back when they're stable to be run in CI." This reverts commit 860b3c14f9e98face626e6ca025daf22844dd156.
2016-07-25tests/prime_busy: Remove unstable sub-test from BAT/add flag to bring them ↵Marius Vlad
back when they're stable to be run in CI. The following BAT are causing problems: prime_busy@basic-after-default, fails on all platforms since it was added, and it sometimes hangs BSW machine prime_busy@basic-before-default, fails on all platforms since it was added. prime_busy@basic-wait-after-default, fails on all platforms since it was added, and it sometimes hangs BSW machine prime_busy@basic-wait-before-default, fails on all platforms since it was added. Signed-off-by: Marius Vlad <marius.c.vlad@intel.com>
2016-07-07igt/prime_busy: Check the busy status is cleared upon a hangChris Wilson
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2016-07-01igt/prime_busy: Promote the test for dma-buf implicit fences as basicChris Wilson
This is a requirement for interoperability that we fail. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2016-06-14igt: Add a test case for polling dma-buf fencesChris Wilson
This tests that we are adding our requests to the dma-buf reservation object, both in exclusive (write) and shared (read) mode. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>