summaryrefslogtreecommitdiff
path: root/tests/i915/gem_exec_flush.c
AgeCommit message (Collapse)Author
2021-08-16tests/gem_exec_flush: Adopt to no-relocZbigniew Kempczyński
Test uses "warming" execbuf which direct consequence is each child will have objects pinned in gtt before core of the test is performed. For gens with ppgtt we don't expect relocations so we can just add EXEC_OBJECT_PINNED flag. We can do this due to each batch created uses above offsets already. Signed-off-by: Zbigniew Kempczyński <zbigniew.kempczynski@intel.com> Cc: Petri Latvala <petri.latvala@intel.com> Cc: Ashutosh Dixit <ashutosh.dixit@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: Rename legacy for_each_engine to for_each_ringChris Wilson
Improve the differentiation between the legacy ring selector ABI and the more recent engine selection API. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Reviewed-by: Andi Shyti <andi.shyti@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-02-13i915/gem_exec_flush: Forgo I915_EXEC_NORELOCChris Wilson
As we do not maintain the contents of the batch buffers as we reuse and may move the objects between cycles, the requirements for I915_EXEC_NORELOC are not met. Rely on natural reloc skipping instead, so long as the ioctl overhead is less than the GPU, it should not have any impact on the incoherency detection rates. Closes: https://gitlab.freedesktop.org/drm/intel/issues/1203 Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Acked-by: Mika Kuoppala <mika.kuoppala@linux.intel.com>
2020-02-08i915/gem_exec_flush: Drop assertion the object is not movedChris Wilson
Each set of relocations track the content of their particular portion of the batch, the presumed offset they use encode matches their own view. It is legal for the object to be moved, and the execbuf will have to relocation -- we can't just assert that the relocations were not required as that is beyond our own control (unless we switch to softpin). Closes: https://gitlab.freedesktop.org/drm/intel/issues/1097 Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Acked-by: Mika Kuoppala <mika.kuoppala@linux.intel.com>
2020-01-29i915/gem_exec_flush: Require mapapble aperture when neededAntonio Argenziano
The test goes through multiple mapping so require mappable aperture when going through GTT. Also use any coherent mapping not just GTT. Signed-off-by: Antonio Argenziano <antonio.argenziano@intel.com> Cc: Chris Wilson <chris@chris-wilson.co.uk> Cc: Vinay Belgaumkar <vinay.belgaumkar@intel.com> Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk> Signed-off-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>
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>