summaryrefslogtreecommitdiff
path: root/tests/i915/gem_softpin.c
AgeCommit message (Collapse)Author
2022-06-29i915/gem_softpin: Added test description for test case.Sai Gowtham Ch
Added test description for test and to all the subtests that are available. Cc: Kamil Konieczny <kamil.konieczny@linux.intel.com> Signed-off-by: Sai Gowtham Ch <sai.gowtham.ch@intel.com> Reviewed-by: Kamil Konieczny <kamil.konieczny@linux.intel.com>
2022-06-01tests/i915: Use correct type for gen parameterKarolina Drobnik
intel_gen is designed to return a big unsigned number for an unknown device. The value is interpreted to be the newest generation possible, and the matching configuration is used. Some functions incorrectly pass the gen value as a signed number, meaning it becomes negative, and the oldest configuration is used instead of the newest one. This leads to GPU hangs in some cases. Update the definition of submit functions in gem_exec_gttfill and gem_softpin, and has_cs_timestamp in gem_ctx_engines to use a correct type for gen parameter. Signed-off-by: Karolina Drobnik <karolina.drobnik@intel.com> Cc: Zbigniew Kempczyński <zbigniew.kempczynski@intel.com> Reviewed-by: Petri Latvala <petri.latvala@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-04-29tests/i915/gem_softpin: Exercise single offset eviction on all enginesZbigniew Kempczyński
Verify that eviction works when all engines try to use same offset for different handles. It replaces allocator-evict-all-engines test because it is simpler. v2: addressing review comments (Kamil) v3: simplifying subtest (Chris) v4: adding more debugging info (Kamil) Signed-off-by: Zbigniew Kempczyński <zbigniew.kempczynski@intel.com> Cc: Kamil Konieczny <kamil.konieczny@linux.intel.com> Cc: Thomas Hellström <thomas.hellstrom@linux.intel.com> Reviewed-by: Kamil Konieczny <kamil.konieczny@linux.intel.com>
2022-04-06tests/i915/gem_softpin: Use valid context when iterating over enginesZbigniew Kempczyński
For previous gens this bug was not discovered because newly created context over physical engines has same number of engines. For discrete this is not true so using bigger index taken from new context on default is leading to -EINVAL. Signed-off-by: Zbigniew Kempczyński <zbigniew.kempczynski@intel.com> Cc: Kamil Konieczny <kamil.konieczny@linux.intel.com> Reviewed-by: Nirmoy Das <nirmoy.das@intel.com>
2022-02-25lib/intel_allocator: Add safe alignment as a defaultZbigniew Kempczyński
For DG2 and beyond regions alignment may vary so many tests would need to be rewritten to handle this constraint. As Ashutosh noticed most of tests can use safe alignment as a default. Adopt intel-allocator to use safe or user defined power-of-two alignment. Signed-off-by: Zbigniew Kempczyński <zbigniew.kempczynski@intel.com> Suggested-by: Ashutosh Dixit <ashutosh.dixit@intel.com> Cc: Ashutosh Dixit <ashutosh.dixit@intel.com> Reviewed-by: Ashutosh Dixit <ashutosh.dixit@intel.com>
2022-01-10tests/i915/gem_softpin: Add safe-alignment testZbigniew Kempczyński
Exercise start offset and alignment detection when we start mixing system and local memory. v2: support integrated and check smem <-> smem alignment v3: iterate over engines to verify safe start is correct everywhere v4: rename to safe-alignment (Ashutosh) 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-08-11tests/gem_softpin: Exercise eviction with softpinningAndrzej Turko
Exercise eviction of many gem objects. The added tests are analogous to gem_exec_gttfill, but they use softpin and do not require relocation support. Signed-off-by: Andrzej Turko <andrzej.turko@linux.intel.com> Cc: Zbigniew Kempczyński <zbigniew.kempczynski@intel.com> Cc: Petri Latvala <petri.latvala@intel.com> Cc: Ashutosh Dixit <ashutosh.dixit@intel.com> Reviewed-by: Zbigniew Kempczyński <zbigniew.kempczynski@intel.com>
2021-07-28tests/i915/gem_softpin: Adjust the addresses of reverved blocksAndrzej Turko
Make sure that the reservations fit in the address space. Signed-off-by: Andrzej Turko <andrzej.turko@linux.intel.com> Cc: Zbigniew Kempczyński <zbigniew.kempczynski@intel.com> 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>
2021-04-13tests/gem_softpin: Verify allocator and execbuf pair work togetherZbigniew Kempczyński
Exercise objects offsets produced by the allocator for execbuf are valid and no EINVAL/ENOSPC occurs. Check it works properly also for multiprocess allocations/execbufs for same context. As we're in full-ppgtt we disable softpin to verify offsets produced by the allocator are valid and kernel doesn't want to relocate them. Add allocator-basic and allocator-basic-reserve to BAT. Signed-off-by: Zbigniew Kempczyński <zbigniew.kempczynski@intel.com> Cc: Chris Wilson <chris@chris-wilson.co.uk> Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk> Acked-by: Daniel Vetter <daniel.vetter@ffwll.ch> Acked-by: Petri Latvala <petri.latvala@intel.com>
2021-01-14i915/gem_softpin: Fix object leak in softpin testZbigniew Kempczyński
Signed-off-by: Zbigniew Kempczyński <zbigniew.kempczynski@intel.com> Cc: Chris Wilson <chris@chris-wilson.co.uk> Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2021-01-12i915/gem_softpin: Set size=4096 before calling __gem_createChris Wilson
Upon converting to __gem_create(), we now need to set the size in the caller. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Acked-by: Mika Kuoppala <mika.kuoppala@linux.intel.com>
2021-01-11lib/i915: Replace size to pointer to size in __gem_create()Zbigniew Kempczyński
Sometimes we're interested how much memory as allocated within the i915 driver so we have to change function prototype/implementation to the pointer to the size. As __gem_create() has few users change is simple and non-intrusive. Signed-off-by: Zbigniew Kempczyński <zbigniew.kempczynski@intel.com> Cc: Andrzej Turko <andrzej.turko@linux.intel.com> Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2020-12-24i915/gem_softpin: Test total occupancyChris Wilson
Use pad-to-size to fill the entire GTT. Make sure we own it all! Suggested-by: Matthew Auld <matthew.auld@intel.com> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Cc: Matthew Auld <matthew.auld@intel.com> Reviewed-by: Matthew Auld <matthew.auld@intel.com>
2020-12-21i915/gem_softpin: Fix compile warningChris Wilson
../tests/i915/gem_softpin.c: In function ‘test_zero’: ../tests/i915/gem_softpin.c:145:10: warning: suggest parentheses around ‘-’ inside ‘>>’ [-Wparentheses] Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Reviewed-by: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
2020-12-21i915/gem_softpin: Handle boundary testing with exactly 4G of GTTChris Wilson
Closes: https://gitlab.freedesktop.org/drm/intel/-/issues/2835 Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2020-12-17i915/gem_softpin: Check the last 32b page is excludedChris Wilson
In order to prevent issues with 32b stateless address, the last page under 4G is excluded for non-48b objects. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Cc: CQ Tang <cq.tang@intel.com> Reviewed-by: Matthew Auld <matthew.auld@intel.com>
2020-12-16i915/gem_softpin: Check full placement control under full-ppgttChris Wilson
With full-ppgtt, userspace has complete control over their GTT. Verify that we can place an object at the very beginning and the very end of our GTT. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Reviewed-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-07-06i915/gem_softpin: Tighten interruptible runtimesChris Wilson
Rather than repeating a 5s test until the whole can pass without a single interrupt, move the interrupting loop around the ioctls of interest. This brings a test hitting the same interrupt paths from 100s to the expected 5s. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Acked-by: Mika Kuoppala <mika.kuoppala@linux.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-25i915/gem_softpin: check for updated errno in snoop-evictChris Wilson
Minor ABI break in reporting a new error code for a self-inflicted user overlap within an execbuf. References: 2920bb94e65f ("drm/i915: Drop inspection of execbuf flags during evict") Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Acked-by: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
2020-03-03i915/gem_softpin: Fix up 'overlap' for change in errnoChris Wilson
Minor ABI break in reporting a new error code for a self-inflicted user overlap within an execbuf. References: 2920bb94e65f ("drm/i915: Drop inspection of execbuf flags during evict") Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Acked-by: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
2020-02-28i915/gem_softpin: Limit the noreloc test runtimeChris Wilson
Use a fixed duration rather than a fixed amount of work. Closes: https://gitlab.freedesktop.org/drm/intel/issues/1325 Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Acked-by: Mika Kuoppala <mika.kuoppala@linux.intel.com> Reviewed-by: Petri Latvala <petri.latvala@intel.com>
2020-02-25i915/gem_softpin: Check user evictionChris Wilson
Check that if the user demands the vma be replaced, they are. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Acked-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-10-05i915/gem_softpin: Replace constant loop with timeoutChris Wilson
Rather than do a fixed amount of work that takes *forever*, run for a fixed amount of time. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Reviewed-by: Andi Shyti <andi.shyti@intel.com>
2019-09-13igt/gem_blits: Check for blitter support before useChris Wilson
Not all HW supports XY blitter commands, so check before use. In particular, this makes it easier to debug the kernel. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Cc: Matthew Auld <matthew.auld@intel.com> Acked-by: Mika Kuoppala <mika.kuoppala@linux.intel.com>
2019-05-23lib/dummyload: Cleanup access to spin obj arrayMika Kuoppala
Instead of relying a static obj array inside igt_spin_t, access it with proper indexing. v2: IGT_SPIN_BATCH v3: indent 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>
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>