summaryrefslogtreecommitdiff
path: root/tests/i915/gem_busy.c
AgeCommit message (Collapse)Author
2022-06-24tests/i915/gem_busy : Added subtests descriptionSinjan Kumar
Added subtest description to gem_busy tests Cc: Kamil Konieczny <kamil.konieczny@linux.intel.com> Signed-off-by: Sinjan Kumar <sinjan.kumar@intel.com> Reviewed-by: Kamil Konieczny <kamil.konieczny@linux.intel.com>
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-01-24i915/gem_busy: Prevent context ban with right ctx idChuansheng Liu
When running multiple hang tests, the code is intended to disallow context ban at first, but it is always with fix ctx id 0. It will cause below test failures when running the test gem_busy: Reviewed-by: Ashutosh Dixit <ashutosh.dixit@intel.com> Signed-off-by: Chuansheng Liu <chuansheng.liu@intel.com>
2021-10-13tests/i915: use gem_require_mmap_device_coherentPriyanka Dandamudi
Update gem_require_mmap_wc to gem_require_mmap_device_coherent along with mmap__wc, as it works on discrete platforms, while still using an explicit WC mmap on integrated platforms. Below are the updated tests: gem_exec_schedule gem_exec_async gem_busy kms_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-08-10tests/gem_busy: 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_busy: Convert to intel_ctx_t (v3)Jason Ekstrand
v2 (Zbigniew Kempczyński): - Don't null-init ctx v3 (Jason Ekstrand): - Pass the context config to gem_submission_measure() 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-08lib/i915/gem_submission_measure: Take an optional intel_ctx_cfg_tJason Ekstrand
If provided, the engine (or ALL_ENGINES) is relative to the given context config. This is intended to be transitional. We'll get rid of all the __for_each_physical_engine stuff later. 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-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-30i915: Drop gem_cs_prefetchChris Wilson
Covered with more accuracy with selftests. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Acked-by: Mika Kuoppala <mika.kuoppala@linux.intel.com>
2020-11-16i915: Increase engine[] to fit the entire RING_MASKChris Wilson
As a stepping stone, increase the assumed 16 engines is enough for everyone, to cover the current RING_MASK, the maximum number of engines that can currently be selected during execbuf. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Reviewed-by: Umesh Nerlige Ramappa <umesh.nerlige.ramappa@intel.com>
2020-05-26i915/gem_exec_schedule: Fix measurement of ring size to use right engineChris Wilson
gem_ring_measure_inflight() uses the legacy ring idx, whereas gem_exec_schedule is using the new dynamic ctx->engine[] indices. Mismatch and hanging tests ensue. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Acked-by: Mika Kuoppala <mika.kuoppala@linux.intel.com>
2020-05-26i915/gem_busy: Mask out the effect of GPU relocationsChris Wilson
If we use GPU relocations, then we will mark the batch as being written to by the GPU. This can be any engine, and so may perturb the reported busyness. Take this into account before reporting an error. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Acked-by: Mika Kuoppala <mika.kuoppala@linux.intel.com>
2020-05-19i915/gem_busy: Remove unnecessary non-preemptible workloadDominik Grzegorzek
Non-preemptible spinners should be avoided as often as possible. gem_busy@basic has no reason to use non-preemptible workload, only hung subtests need it. Signed-off-by: Dominik Grzegorzek <dominik.grzegorzek@intel.com> Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2020-05-11Macros fixes: Removed unused & redundant macrosranjeet kumar
Local macros were declared in several files as a prelude to upstream implementations. Now that we ship include/drm-uapi, we can remove LOCAL as we upstream. Cc: Dixit, Ashutosh <ashutosh.dixit@intel.com> Cc: Tahvanainen Jari <jari.tahvanainen@intel.com> Signed-off-by: ranjeet kumar <ranjeet1.kumar@intel.com> Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
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-05-05i915/gem_busy: Replace open-coded spinnerChris Wilson
Replace the open-coded spinner wit igt_spin. This allows us to run the test even with the cmdparser in play, but at the cost of removing the relocation result testing. Since the test focus is on validating the gem_busy api, that loss is not a great concern. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Acked-by: Mika Kuoppala <mika.kuoppala@linux.intel.com>
2020-04-06i915/gem_busy: Drop i915_hangcheck_infoChris Wilson
All the information for hangcheck is pulled into i915_engine_info so the separate dump is redundant. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Cc: Andi Shyti <andi.shyti@intel.com> Reviewed-by: Andi Shyti <andi.shyti@intel.com>
2020-04-01i915/gem_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>
2020-03-09i915/gem_busy: Drop redundant assert(gem_bo_busy)Chris Wilson
The spin->handle is already validated by igt_spin_new(), and in particular we need to be careful when using INVALID_CS that it the hang may be detect and the request reset + completed before the gem_bo_busy is called. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Acked-by: Mika Kuoppala <mika.kuoppala@linux.intel.com>
2020-01-28i915: Inject invalid CS into hanging spinnersChris Wilson
Some spinners are used with the intent of never ending and being declared hung by the kernel. In some cases, these are being used to simulate invalid payloads and so we can use an invalid command to trigger a GPU hang. (Other cases, they are simulating infinite workloads that truly never end, but we still need to be able to curtail to provide multi-tasking). This patch adds IGT_SPIN_INVALID_CS to request the injection of 0xdeadbeef into the command stream that should trigger a GPU hang. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Reviewed-by: Mika Kuoppala <mika.kuoppala@linux.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-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-05-24i915/gem_busy: Fix typo killing snb!Chris Wilson
Check the right engine to see if it is the one that explodes! Fixes: 88318b0771f9 ("test/i915: gem_busy: use the gem_engine_topology library") Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Cc: Andi Shyti <andi.shyti@intel.com> Cc: Tvrtko Ursulin <tvrtko.ursulin@intel.com> Reviewed-by: Andi Shyti <andi.shyti@intel.com>
2019-05-23tests/i915: Restore some BAT coverageTvrtko Ursulin
Engine enumerated test names have changed so fast-feedback.testlist needs to be updated. However listing all engines there won't scale. So instead add new tests cases which iterate all engines internally. v2: * Fix basic-all test name. * Fix params to basic (bool false to zero). * Use I915_EXEC_DEFAULT in has_extended_busy_ioctl to workaround stateful contexts for now. * Have only basic-all in BAT. (Chris) v3: * Don't overload I915_EXEC_DEFAULT. (Chris) Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com> Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk> Reviewed-by: Andi Shyti <andi.shyti@intel.com> # v1
2019-05-23test/i915: gem_busy: fix misuse of the "flags" parameter in basic()Andi Shyti
The "flags" parameter received by the "basic()" function checks for the HANG (0x2) bit, while callers give it a boolean true/false value. Restore the original meaning of "flags" as a bit mask. Fixes: 88318b0771f9 ("test/i915: gem_busy: use 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@intel.com> Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
2019-05-22test/i915: gem_busy: 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> 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-03-05i915/gem_busy: Another year, another ABI bumpChris Wilson
The ABI ring ids are dead. Long live our classes. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Cc: Tvrtko Ursulin <tvrtko.ursulin@intel.com> Cc: Joonas Lahtinen <joonas.lahtinen@linux.intel.com> Reviewed-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
2019-01-02i915/gem_busy: Use a non-preemptible hanging batchChris Wilson
Ensure that the hangcheck notices the hanging batch by using a non-preemptible spin batch, as some future versions of hangcheck may allow a preemptible GPU hog to survive. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> 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>