summaryrefslogtreecommitdiff
path: root/lib/igt_dummyload.c
AgeCommit message (Collapse)AuthorFilesLines
2024-05-07lib: use poll.h in includesReagan Bohan1-1/+1
sys/poll.h is non-standard and including it on musl produces a warning. Signed-off-by: Reagan Bohan <reagan@ourmail.work> Reviewed-by: Kamil Konieczny <kamil.konieczny@linux.intel.com>
2024-03-29tests/intel: Use MI_ARB_CHECK definition more consistentlyMatt Roper1-3/+1
Even though we have MI_ARB_CHECK defined in our GPU instruction header, several of our tests and test libraries seem to be using alternate definitions and/or magic numbers to emit this instruction, which makes grep'ing the code for it challenging (and makes the behavior of the tests themselves less obvious in some cases). Try to use the standard definition more consistently everywhere. Reviewed-by: Gustavo Sousa <gustavo.sousa@intel.com> Link: https://lore.kernel.org/r/20240328174139.1533658-1-matthew.d.roper@intel.com Signed-off-by: Matt Roper <matthew.d.roper@intel.com>
2023-07-17lib/igt_dummyload: Extract sync spinner APITvrtko Ursulin1-0/+105
Sync spinner API is identical and compatible with regular spinners just that it tries to make sure spinner is actually running on the hardware before returning from the constructor. A few tests already use it, one more will, so lets promote it into common library. Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com> Cc: Vinay Belgaumkar <vinay.belgaumkar@intel.com> Reviewed-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
2023-06-16lib/xe/xe_spin: Integrate igt_spin_new with XeSai Gowtham Ch1-5/+35
Extending the spin_create implementation and allocator handle support in xe, where it submits dummy work loads to engine. This Implementation is wrapped around vm_bind and unbind as we are supposed to do it manually for xe. Cc: Zbigniew Kempczyński <zbigniew.kempczynski@intel.com> Signed-off-by: Sai Gowtham Ch <sai.gowtham.ch@intel.com> Reviewed-by: Zbigniew Kempczyński <zbigniew.kempczynski@intel.com>
2023-04-20lib/igt_dummyload: Fall back to no scheduling policy if SCHED_FIFO unavailablePetri Latvala1-2/+8
If pthread_create with SCHED_FIFO fails, try creating the thread without a policy before bailing out. Cc: Petri Latvala <adrinael@adrinael.net> Suggested-by: Chris Wilson <chris.p.wilson@intel.com> Signed-off-by: Petri Latvala <petri.latvala@intel.com> Signed-off-by: Kamil Konieczny <kamil.konieczny@linux.intel.com> Reviewed-by: Zbigniew Kempczyński <zbigniew.kempczynski@intel.com>
2023-03-08igt: Remove duplicated macrosZbigniew Kempczyński1-1/+1
Introducing intel_gpu_commands.h requires removing all conflicting macros definitions with altering the code (mostly command length). For all commands used in IGT but not in the kernel (yet) add intel_gpu_commands_staging.h which will keep all commands used here only. Next import of command macros might finish verbatim copy + removing from staging in one commit to compile cleanly. Signed-off-by: Zbigniew Kempczyński <zbigniew.kempczynski@intel.com> Cc: Petri Latvala <adrinael@adrinael.net> Cc: Kamil Konieczny <kamil.konieczny@linux.intel.com> Reviewed-by: Kamil Konieczny <kamil.konieczny@linux.intel.com>
2023-01-12lib/igt_dummyload: Don't assume dependency object sizeZbigniew Kempczyński1-1/+3
Most of the tests use page size for dependency object so spinner had this value hardcoded as a default. But there're exceptions where dependency object is bigger and for softpin path we need to allow pass this size to properly acquire offsets from the allocator. Signed-off-by: Zbigniew Kempczyński <zbigniew.kempczynski@intel.com> Reviewed-by: Kamil Konieczny <kamil.konieczny@linux.intel.com>
2022-09-20lib: Fix off-by-one-page in 48b obj.flagsChris Wilson1-32/+31
The kernel checks that the last byte of the object will fit inside the 32b GTT window unless the object is marked as being suitable for use with 48b addressing. However, the spinner only checked the start of the object which depending on the mix of size/alignment, could allow the object to straddle the 32b boundary and not be marked as 48b capable. Always set 48b for all the objects where ppGTT merites. In the process, there was one location where we failed to write the upper 32b of the address into the instruction. Signed-off-by: Chris Wilson <chris.p.wilson@linux.intel.com> Reviewed-by: Kamil Konieczny <kamil.konieczny@linux.intel.com>
2022-02-28lib/igt_dummyload: Drop ahnd from igt_spin_tAshutosh Dixit1-5/+4
In 4d9396e67930 we have started storing the opts with which the spin was created as part of igt_spin_t. The ahnd stored as part of igt_spin_t is therefore redundant. We can get ahnd from opts.ahnd. Cc: Zbigniew Kempczynski <zbigniew.kempczynski@intel.com> Cc: Jasmine Newsome <jasmine.newsome@intel.com> Signed-off-by: Ashutosh Dixit <ashutosh.dixit@intel.com> Reviewed-by: Zbigniew Kempczyński <zbigniew.kempczynski@intel.com>
2022-02-24lib/igt_dummyload: Save spin->opts as part of the spinnerJasmine Newsome1-0/+1
Save the opts with which the spin was created as part of the spin so that the opts are available in case they are needed. Signed-off-by: Jasmine Newsome <jasmine.newsome@intel.com> Reviewed-by: Ashutosh Dixit <ashutosh.dixit@intel.com>
2021-08-10lib/igt_dummyload: Add support of using allocator in igt spinnerZbigniew Kempczyński1-14/+60
For gens without relocations we need to use softpin with valid offsets which do not overlap other execbuf objects. As spinner during creation knows nothing about vm it has to run into allocator handle must be passed to properly acquire offsets from allocator instance. Signed-off-by: Zbigniew Kempczyński <zbigniew.kempczynski@intel.com> Cc: Petri Latvala <petri.latvala@intel.com> Cc: Ashutosh Dixit <ashutosh.dixit@intel.com> Cc: Chris Wilson <chris@chris-wilson.co.uk> Reviewed-by: Ashutosh Dixit <ashutosh.dixit@intel.com>
2021-07-16i915: Improve the precision of command parser checksJason Ekstrand1-5/+10
The previous gem_has_cmdparser helper took an engine and did nothing with it. We delete the engine parameter and use the general helper for the ALL_ENGINES cases. For cases where we really do care about something more precise, we add a version which takes an intel_ctx_cfg_t and an engine specifier and is able to say whether or not that particular engine has the command parser enabled. Signed-off-by: Jason Ekstrand <jason@jlekstrand.net> Cc: Lakshminarayana Vudum <lakshminarayana.vudum@intel.com> Acked-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2021-07-08igt/dummyload: Require an intel_ctx_t for POLL_RUN and !ALL_ENGINESJason Ekstrand1-15/+5
This lets us drop gem_context_lookup_engines Signed-off-by: Jason Ekstrand <jason@jlekstrand.net> Reviewed-by: Zbigniew Kempczyński <zbigniew.kempczynski@intel.com> Reviewed-by: Ashutosh Dixit <ashutosh.dixit@intel.com> Acked-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
2021-07-08lib/igt_dummyload: Stop supporting ALL_ENGINES without an intel_ctx_tJason Ekstrand1-15/+6
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-06-22lib: Ensure the spinner reuses the canonical addressChris Wilson1-2/+5
For resubmitting a spinner, we pinned the objects into their addresses used for the initial submission (so that we can remove the relocations). When supplying a pinned address, the kernel insists that it should be in canonical form, so let's also make sure that it is on setting the pin flag. Signed-off-by: Chris Wilson <chris.p.wilson@intel.com> Reviewed-by: Zbigniew Kempczyński <zbigniew.kempczynski@intel.com>
2021-06-22lib: Beware implicit sign extension on large constantsChris Wilson1-1/+1
(gdb) p/x (long long unsigned int)(1 << 31) $1 = 0xffffffff80000000 (gdb) p/x (long long unsigned int)(1u << 31) $2 = 0x80000000 The impact of this is that the random address we were placing the spinner at was always invalid on modern machines, causing the kernel to relocate the spinners wherever and thus undergoing relocations. Signed-off-by: Chris Wilson <chris.p.wilson@intel.com> Reviewed-by: Zbigniew Kempczyński <zbigniew.kempczynski@intel.com>
2021-06-10lib/dummyload: Support intel_ctx_t (v2)Jason Ekstrand1-8/+22
v2 (Zbigniew Kempczyński): - Drop a spurrious newline - Use igt_assert() instead of assert() Signed-off-by: Jason Ekstrand <jason@jlekstrand.net> Reviewed-by: Zbigniew Kempczyński <zbigniew.kempczynski@intel.com>
2021-06-10lib/dummyload: Rename igt_spin_factory::ctx to ctx_idJason Ekstrand1-3/+3
Signed-off-by: Jason Ekstrand <jason@jlekstrand.net> Acked-by: Daniel Vetter <daniel.vetter@ffwll.ch> Reviewed-by: Zbigniew Kempczyński <zbigniew.kempczynski@intel.com>
2021-05-27lib/i915/gem_create: Add gem_create_extAndrzej Turko1-1/+1
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-01-06lib: Immediately cancel a spinner for an expired timeoutChris Wilson1-1/+5
If the relative timeout to igt_spin_set_timeout() is in the past, immediately end the spinner. Closes: https://gitlab.freedesktop.org/drm/intel/-/issues/2903 Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Acked-by: Mika Kuoppala <mika.kuoppala@linux.intel.com>
2021-01-02lib/i915: Handle spinner execution from userptr on gen<6Chris Wilson1-5/+14
On early gens, the batch buffer must not be snooped and so we need to clflush the write into the userptr memory to terminate the loop. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Acked-by: Mika Kuoppala <mika.kuoppala@linux.intel.com>
2020-12-18lib: Fix double lock in igt_free_spins()Chris Wilson1-17/+23
igt_free_spins() took the lock to iterate the list, igt_spin_free() took the lock to remove the list element. We only want one. Closes: https://gitlab.freedesktop.org/drm/intel/-/issues/2823 Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Acked-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
2020-12-17i915/perf_pmu: Exercise I915_PMU_SOFTWARE_GT_AWAKE_TIMEChris Wilson1-0/+10
Measure the sample gt-awake time while each engine and every engine is busy. They should all report the same duration, the elapsed runtime of the batch. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Cc: Tvrtko Ursulin <tvrtko.ursulin@linux.intel.com> Reviewed-by: Tvrtko Ursulin <tvrtko.ursulin@linux.intel.com>
2020-12-11i915/gem_exec_fence: Check a submit chainChris Wilson1-1/+6
Submit a chain of spinners across all the engines, using the submit fence to launch them in parallel. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Acked-by: Mika Kuoppala <mika.kuoppala@linux.intel.com>
2020-11-30i915/gem_request_retire: Switch from random blitter loads to dummyChris Wilson1-11/+12
Use the spinners to provide exactly the right amount of background busyness. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Cc: Tvrtko Ursulin <tvrtko.ursulin@linux.intel.com> Reviewed-by: Tvrtko Ursulin <tvrtko.ursulin@linux.intel.com>
2020-10-09lib: Launch spinners from inside userptrChris Wilson1-31/+56
Add support for dummyload to be userptr, the variation in object type may be useful in some tests and to ensure complete coverage of some dark corners. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Reviewed-by: Mika Kuoppala <mika.kuoppala@linux.intel.com>
2020-07-12lib/i915: Set NO_RELOC flag for spinnersChris Wilson1-4/+4
We write the addresses into the batch and fill in the presumed_offset and execobj.offset correctly, so we meet the no-relocation requirements and so can normally avoid relocations. In order to let the kernel know it can trust us, we should also set the I915_EXEC_NO_RELOC flags. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Acked-by: Mika Kuoppala <mika.kuoppala@linux.intel.com>
2020-06-12lib/i915: Fix GTT offset for 64bChris Wilson1-1/+3
Large GTT do not fit into the 32b local, use a 64b and limit to [2G-3G]! Fixes: 0421ebe98f0b ("lib/i915: Increase range for randomised location of dummyload") Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Reviewed-by: Mika Kuoppala <mika.kuoppala@linux.intel.com>
2020-06-12lib/i915: Increase range for randomised location of dummyloadChris Wilson1-1/+3
Suggest a wider range of possible relocations to reduce the chance of colliding with a framebuffer. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Acked-by: Mika Kuoppala <mika.kuoppala@linux.intel.com>
2020-05-26lib: Randomise spinner location to reduce relocation riskChris Wilson1-8/+33
Randomise the position of the spinner to reduce the number of relocations we might require. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Acked-by: Mika Kuoppala <mika.kuoppala@linux.intel.com>
2020-05-19lib/i915: Reset all engine properties to defaults prior to the start of a testChris Wilson1-2/+0
We need each test in an isolated context, so that bad results from one test do not interfere with the next. In particular, we want to clean up the device and reset it to the defaults so that they are known for the next test, and the test can focus on behaviour it wants to control. 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> Acked-by: Mika Kuoppala <mika.kuoppala@linux.intel.com>
2020-05-11Macros fixes: Removed unused & redundant macrosranjeet kumar1-4/+1
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 Wilson1-5/+6
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-16lib: Use read() for timerfd timeout detectionChris Wilson1-6/+6
The poll() is proving unreliable, where our tests timeout without the spinner being terminated. Let's try a blocking read instead! Closes: https://gitlab.freedesktop.org/drm/intel/-/issues/1676 Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Cc: "Dixit, Ashutosh" <ashutosh.dixit@intel.com> Reviewed-by: "Dixit, Ashutosh" <ashutosh.dixit@intel.com>
2020-04-09lib: Set initial invalid timerfd to -1Chris Wilson1-9/+8
Allow for a timerfd of 0, just in case some test closes stdin. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Acked-by: Mika Kuoppala <mika.kuoppala@linux.intel.com>
2020-04-09i915/gem_wait: Warn if the test completes before the spinner times outChris Wilson1-0/+3
Check that our threaded timer to expire the igt_spin_t does fire! Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Acked-by: Mika Kuoppala <mika.kuoppala@linux.intel.com>
2020-04-04lib/igt_dummyload: Give the timer thread a RT priority boostChris Wilson1-1/+10
Do not leave it up to the lazy scheduler when the timeout is applied to the batch, force it to be real-time! Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Cc: Michał Winiarski <michal.winiarski@intel.com> Reviewed-by: Andi Shyti <andi.shyti@intel.com>
2020-03-31lib/igt_dummyload: Use timerfd rather than SIGEV_THREADMichał Winiarski1-17/+25
Since timer_delete doesn't give us any guarantees that the thread and its notify_function isn't currently running, we can hit a use-after-free in a race condition scenario. This causes a seemingly random segfault when igt_spin_end from notify thread is called after igt_spin_free was already called from the main thread. Let's fix that by using timerfd and managing the timer thread ourselves. Signed-off-by: Michał Winiarski <michal.winiarski@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>
2020-01-31lib: Don't feed IGT_SPIN_INVALID_CS to the command parserChris Wilson1-1/+6
If using a cmdparser, it may be intelligent enough to not execute the invalid batch leading to an unwritten breadcrumb and igt_spin_busywait_until_started() in an infinite loop. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Reviewed-by: Mika Kuoppala <mika.kuoppala@linux.intel.com>
2020-01-29lib: Don't assert spinner is still alive when using INVALID_CSChris Wilson1-4/+10
Using INVALID_CS may lead to an immediate GPU hang and reset of the spinner. So even before we return the new spinner to the caller, it may be completed and we cannot assert that it is still busy. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Reviewed-by: Mika Kuoppala <mika.kuoppala@linux.intel.com>
2020-01-28i915: Inject invalid CS into hanging spinnersChris Wilson1-0/+2
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-31lib/igt_dummyload: Use mapping selection to allow run batch from lmemZbigniew Kempczyński1-9/+6
For batches which need to be run from device memory there's a need to use mmap offset interface to map the buffer. 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>
2019-11-14lib: Set the COND_BB_END mask for bdwChris Wilson1-1/+2
On Skylake+, the use of the mask for the compare address is predicated by an instruction flag. On Broadwell, it seems that some engines use the mask and some do not. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=112270 Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Cc: Mika Kuoppala <mika.kuoppala@linux.intel.com> Acked-by: Mika Kuoppala <mika.kuoppala@linux.intel.com>
2019-11-13igt: Use COND_BBEND for busy spinning on gen9Jon Bloomfield1-2/+37
gen9+ introduces a cmdparser for the BLT engine which copies the incoming BB to a kmd owned buffer for submission (to prevent changes being made after the bb has been safely scanned). This breaks the spin functionality because it relies on changing the submitted spin buffers in order to terminate them. Instead, for gen9+, we change the semantics by introducing a COND_BB_END into the infinite loop, to wait until a memory flag (in anothe bo) is cleared. v2: Correct nop length to avoid overwriting bb_end instr when using a dependency bo (cork) v3: fix conflicts on igt_dummyload (Mika) v4: s/bool running/uint32_t running, fix r->delta (Mika) v5: remove overzealous assert (Mika) v6: rebase on top of lib changes (Mika) v7: rework on top of public igt lib changes (Mika) v8: rebase v9: simplify by using bb end as conditional (Chris) Signed-off-by: Jon Bloomfield <jon.bloomfield@intel.com> (v2) Cc: Joonas Lahtinen <joonas.lahtinen@intel.com> Cc: Rodrigo Vivi <rodrigo.vivi@intel.com> Cc: Mika Kuoppala <mika.kuoppala@intel.com> Signed-off-by: Mika Kuoppala <mika.kuoppala@linux.intel.com> Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2019-11-12lib/igt_list: Update, clean-up and document igt_listArkadiusz Hiler1-5/+5
Our list was something between Wayland and Linux Kernel list implementations, right in the uncanny valley. On top of that it falsely claimed that it's a straight copy from the Wayland project. Let's make our impl more akin to the kernel one to ease the cognitive dissonance for the developers working on all those projects. This patch: * mimics the current kernel list interface * separates IGT helpers in the source files * adds brief explanation and code example for igt-doc * introduces igt_list.c as static inlines are not visible in the docs v2: mimic the kernel instead of wayland (Chris) - _head suffix for the sentinel/link struct - _entry_ in iterator names that go over the elements v3: I forgot to merge this in time and there was another call site that had to be converted in gem_spin_batch.c Cc: Petri Latvala <petri.latvala@intel.com> Cc: Chris Wilson <chris@chris-wilson.co.uk> Signed-off-by: Arkadiusz Hiler <arkadiusz.hiler@intel.com> Acked-by: Chris Wilson <chris@chris-wilson.co.uk> Reviewed-by: Petri Latvala <petri.latvala@intel.com>
2019-10-19lib: Make dummyload less sensitive to abusive usersChris Wilson1-1/+2
If the user wants to keep the handle alive after igt_spin is freed, let them take ownership! Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Reviewed-by: Andi Shyti <andi.shyti@intel.com>
2019-09-19kms_busy: Replace fiddling with hangcheck modparam with explicit fenceChris Wilson1-0/+5
Use an explicit fence to circumvent the [i915] GPU hang detection rather than tweak the i915 specific modparam (and remove the assertion that such a param exists). Note, that with a bit more work, the fence could be used be directly rather than via dirtying the fb with a dummyload. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Reviewed-by: Andi Shyti <andi.shyti@intel.com>
2019-05-23i915/gem_exec_fence: Replace open-coded recursive batch with igt_spin_tChris Wilson1-0/+10
The only detail of note here was that we were creating a fence from the recursive batch, now supported by igt_spin_t (thanks Tvrtko). Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Cc: Tvrtko Ursulin <tvrtko.ursulin@intel.com> Cc: Matthew Auld <matthew.auld@intel.com> Reviewed-by: Matthew Auld <matthew.auld@intel.com>
2019-05-23lib/dummyload: Cleanup access to spin obj arrayMika Kuoppala1-7/+6
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>
2019-05-22lib: igt_dummyload: use for_each_context_engine()Andi Shyti1-9/+20
With the new getparam/setparam api, engines are mapped to context. Use for_each_context_engine() to loop through existing engines. Suggested-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com> Signed-off-by: Andi Shyti <andi.shyti@intel.com> Reviewed-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>