summaryrefslogtreecommitdiff
path: root/tests/i915/gem_exec_parallel.c
AgeCommit message (Collapse)Author
2022-06-28tests/i915/gem_exec_parallel : Add subtests descriptionJanga Rahul Kumar
Add test description to all the available subtests. v2 : Modified test description. Cc: Kamil Konieczny <kamil.konieczny@linux.intel.com> Signed-off-by: Janga Rahul Kumar <janga.rahul.kumar@intel.com> Reviewed-by: Kamil Konieczny <kamil.konieczny@linux.intel.com>
2022-03-23tests/i915/gem_exec_parallel: Add 48b flag to execbufZbigniew Kempczyński
On dg2 and beyond safe alignment is bigger than on integrated so we can enter offset range >= 2^32. Add execbuf flag which allows using such offsets. Signed-off-by: Zbigniew Kempczyński <zbigniew.kempczynski@intel.com> Cc: Kamil Konieczny <kamil.konieczny@linux.intel.com> Reviewed-by: Kamil Konieczny <kamil.konieczny@linux.intel.com>
2021-08-10tests/gem_exec_parallel: Adopt to use alloctorZbigniew 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_exec_parallel: Convert to intel_ctx_t (v2)Jason Ekstrand
v2 (Zbigniew Kempczyński): - Don't NULL-init ctx 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>
2021-03-18i915/gem_exec_parallel: Drop gem_require_pread_pwrite check from userptr testsAshutosh Dixit
Since 0b6967520b ("tests: Do not use pread on userptr in gem_exec_parallel.") gem_exec_parallel userptr tests no longer use pread so gem_require_pread_pwrite check is not needed. Fixes: ad5eb02eb3 ("lib/ioctl_wrappers: Keep IGT working without pread/pwrite ioctls") Acked-by: Petri Latvala <petri.latvala@intel.com> Signed-off-by: Ashutosh Dixit <ashutosh.dixit@intel.com>
2021-03-17lib/ioctl_wrappers: Keep IGT working without pread/pwrite ioctlsAshutosh Dixit
The general direction at this time is to phase out pread/write ioctls and not support them in future products. This means IGT must handle the absence of these ioctls. This patch does this by modifying gem_read() and gem_write() to do the read/write using the pread/pwrite ioctls first but when these ioctls are unavailable fall back to doing the read/write using a combination of mmap and memcpy. Callers who must absolutely use the pread/pwrite ioctls (such as tests which test these ioctls or must otherwise only use the pread/pwrite ioctls) must use gem_require_pread_pwrite() to skip when these ioctls are not available. v1: Removed __gem_pread, gem_pread, __gem_pwrite and gem_pwrite introduced previously since they are not necessary, gem_require_pread_pwrite is sufficient v2: Fix CI failures in gem_advise and gen9_exec_parse by introducing gem_require_pread_pwrite v3: Skip mmap for 0 length read/write's v4: Remove redundant igt_assert's v5: Re-run v6: s/EOPNOTSUPP/-EOPNOTSUPP/ v7: Rebase on latest master, skip gem_exec_parallel@userptr with gem_require_pread_pwrite v8: Re-run v9: Rebase Acked-by: Dave Airlie <airlied@redhat.com> Acked-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com> Reviewed-by: Zbigniew Kempczyński <zbigniew.kempczynski@intel.com> Signed-off-by: Ashutosh Dixit <ashutosh.dixit@intel.com>
2021-01-28tests: Do not use pread on userptr in gem_exec_parallel.Maarten Lankhorst
It's even silly to use pread, directly read from the pointer instead by executing gem_wait first. Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com> Reviewed-by: Thomas Hellström <thomas.hellstrom@linux.intel.com> #irc
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-11-05i915/gem_exec_parallel: Reopen the existing deviceChris Wilson
Avoid any unnecessary filtering inside drm_open_driver() by explicitly reopening the same device. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Reviewed-by: Ashutosh Dixit <ashutosh.dixit@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-09-29i915/gem_exec_parallel: Add basic userptr thrashingChris Wilson
Mix in a modicum of generic userptr thrashing for a quick (1s) BAT pass, as we have currently no coverage of userptr at all in BAT. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Reviewed-by: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
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-03-31i915/gem_exec_parallel: Dynamise per-engine testsChris Wilson
Convert the per-engine tests into a dynamic subtest. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Acked-by: Mika Kuoppala <mika.kuoppala@linux.intel.com>
2020-03-03i915/gem_exec_parallel: Only check written handle/threadsChris Wilson
As we skip work if we exceed our timeout, we may not fill every dword in every surface, so confirm this thread has written into this dword before checking. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Acked-by: Mika Kuoppala <mika.kuoppala@linux.intel.com>
2020-03-03i915/gem_exec_parallel: Build failure begoneChris Wilson
Sigh, last minute adjustment to reduce a hard coded value goes wrong. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Acked-by: Mika Kuoppala <mika.kuoppala@linux.intel.com>
2020-03-03i915/gem_exec_parallel: Try to trim runtimeChris Wilson
In all likelihood the runtime is consumed by the thread setup, but just in case it is dominated by the execbuf, make sure that is bounded. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Reviewed-by: Mika Kuoppala <mika.kuoppala@linux.intel.com>
2020-01-29tests/i915/gem_exec_parallel:Set engine map to default contextSreedhar Telukuntla
Set the potential engine map of the parent client's default context to the newly created DRM client's default context. Without doing so there is a mismatch between the intended and actual engine used by the *-fds subtests. v2: Fix FDS flags check Tvrtko: v3: Use new helper gem_context_copy_engines. Signed-off-by: Sreedhar Telukuntla <sreedhar.telukuntla@intel.com> Cc: Tvrtko Ursulin <tvrtko.ursulin@intel.com> Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
2020-01-27i915/gem_engine_topology: Introduce and use gem_context_clone_with_enginesTvrtko Ursulin
In test cases which create new contexts and submit work against them using the passed in engine index we are sometimes unsure whether this engine index was potentially created based on a default context with engine map configured (such as when under the __for_each_physical_engine iterator. To simplify test code we add gem_context/queue_clone_with_engines which is to be used in such scenario instead of the current pattern of gem_context_create followed by gem_context_set_all_engines (which is also removed by the patch). v2: * Fix swapped arguments to gem_context_clone. (Chris) Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com> Suggested-by: Chris Wilson <chris@chris-wilson.co.uk> Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
2019-11-20test/i915: gem_exec_parallel: Fix for using context engine mapVenkata Sandeep Dhanalakota
Since engines are now looked up based on context engine map, context should be setup with engines before using in execbuf. Fixes: a9998c23 igt("gem_exec_parallel: use the gem_engine_topology") 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: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
2019-05-22test/i915: gem_exec_parallel: 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: Chris Wilson <chris@chris-wilson.co.uk>
2019-04-05gem_exec_parallel: allow unlimited open filesLucas De Marchi
I was looking into a failure in which I had libkmod: ERROR ../libkmod/libkmod-config.c:790 conf_files_list: opendir(/etc/modprobe.d): Too many open files libkmod: ERROR ../libkmod/libkmod-config.c:790 conf_files_list: opendir(/lib/modprobe.d): Too many open files (gem_exec_parallel:1315) igt_kmod-WARNING: Could not load i915 (gem_exec_parallel:1315) igt_kmod-WARNING: Could not load i915 I got curious because libkmod doesn't open more than one config file at a time. What's happening is that libkmod is not the culprit, it's just the one that failed because we open /dev/dri/card0 -ETOOMANYTIMES. Signed-off-by: Lucas De Marchi <lucas.demarchi@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>