summaryrefslogtreecommitdiff
path: root/tests/i915/gem_exec_alignment.c
AgeCommit message (Collapse)Author
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>
2021-10-15tests/gem_exec_alignment: Add prerequisite alignment conditionZbigniew Kempczyński
Skip the test if the kernel doesn't support passing object alignment. v2: rename to gem_allows_obj_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-10-08lib: Typechecking minmaxChris Wilson
Add typechecking to the min/max macros and make their locals truly unique-ish to reduce the risk of shadowing. v2: small bug fix, write also height coordinate on rotation test. (jheikkil) v3: Fix up a couple of other max/max_t instances (Ashutosh) Signed-off-by: Juha-Pekka Heikkilä <juha-pekka.heikkila@intel.com> Signed-off-by: Ashutosh Dixit <ashutosh.dixit@intel.com> Signed-off-by: Chris Wilson <chris.p.wilson@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>
2020-08-21i915/gem_exec_alignment: 32b printf cleanupsChris Wilson
PRIu64 to the rescue! Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Reviewed-by: Petri Latvala <petri.latvala@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-04-30i915/gem_exec_alignment: Directly compare naughty/normal execution timesChris Wilson
If the kernel improves upon its O(N^2) alignment search, it can easily fit a few GiB of buffers into the GTT within the expected minimum run time. Instead of hardcoding the expected bad behaviour, our assertion is that the naughty client does not hinder the normal client, so directly compare the two execution times. The normal client should not be doing any work, so we never expect it to take more than a few microseconds... Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Acked-by: Mika Kuoppala <mika.kuoppala@linux.intel.com>
2020-04-19i915/gem_exec_alignment: Cap object setup timeChris Wilson
Instantiating the objects can be surprisingly, worryingly slow; even on big core LLC devices. Rather than worry about that and cause timeouts in simply setting up the test, apply a limit to the setup time so that we only use the amount of objects instantiated within the first 20s. Due to the quadratic behaviour being exposed by the test, this may not entirely eliminate the timeouts -- but at least the timeouts should then be for the right reason. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Acked-by: Mika Kuoppala <mika.kuoppala@linux.intel.com>
2020-04-19i915/gem_exec_alignment: Cap object setup timeChris Wilson
Instantiating the objects can be surprisingly, worryingly slow; even on big core LLC devices. Rather than worry about that and cause timeouts in simply setting up the test, apply a limit to the setup time so that we only use the amount of objects instantiated within the first 20s. Due to the quadratic behaviour being exposed by the test, this may not entirely eliminate the timeouts -- but at least the timeouts should then be for the right reason. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Acked-by: Mika Kuoppala <mika.kuoppala@linux.intel.com>
2020-04-16i915/gem_exec_alignment: Add a timing telltale to setupChris Wilson
It's takes a long time to setup the test in CI, but how long? That is the question. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Acked-by: Mika Kuoppala <mika.kuoppala@linux.intel.com>
2020-04-12i915/gem_exec_alignment: Check independence of multiple full-ppgttChris Wilson
Different ppgtt should be independent under full-ppgtt. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Acked-by: Mika Kuoppala <mika.kuoppala@linux.intel.com>
2020-04-08i915/gem_exec_alignment: Include a distinct device fd for maximal pi isolationChris Wilson
Tell the naughty child to use a separate i915 so that there is no possibility that it should overlap with anything else. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Acked-by: Mika Kuoppala <mika.kuoppala@linux.intel.com>
2020-04-08i915/gem_exec_alignment: Tweak naughty client generationChris Wilson
The goal is to create just enough of a workload that will run long enough to delay others and be detectable. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Acked-by: Mika Kuoppala <mika.kuoppala@linux.intel.com>
2020-04-07i915/gem_exec_alignment: Limit priority inversion warningChris Wilson
The premise of the test is that one client does not block the other, to which we only need to verify that the ready client proceeds unhindered by the abusive client. So we only need assert that the ready client completes within a shorter time than the abusive client. It would be nice that we could assert that under all conditions it never takes more than a millisecond to submit a no-op; but that goal is a bit too far for today. Closes: https://gitlab.freedesktop.org/drm/intel/-/issues/1654 Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Acked-by: Mika Kuoppala <mika.kuoppala@linux.intel.com>
2020-04-04i915/gem_exec_alignment: Share a buffer between clientsChris Wilson
Break the complete isolation slightly with a test variant that shares a buffer (e.g. a framebuffer) between clients. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Acked-by: Mika Kuoppala <mika.kuoppala@linux.intel.com>
2020-04-04i915/gem_exec_alignment: Keep within limitsChris Wilson
If we have fast alignment searching, we can run out of preallocated objects. Make sure we apply the cap before passing in an illegal array. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Acked-by: Mika Kuoppala <mika.kuoppala@linux.intel.com>
2020-04-03i915/gem_exec_alignment: restrict workingsetChris Wilson
We barely use a fraction of the total number of objects we may allocate, so set a cap and prefer to try more alignments. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Acked-by: Mika Kuoppala <mika.kuoppala@linux.intel.com>
2020-04-03i915/gem_exec_alignment: Interrupt long running childChris Wilson
One day, execbuf will allow for the stuck drm_mm search to be interrupted. Send a signal for that fateful day. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Acked-by: Mika Kuoppala <mika.kuoppala@linux.intel.com>
2020-04-02i915/gem_exec_alignment: Exercise potential priority inversionDominik Grzegorzek
A low priority client should not block a high priority client. In this case we check that if a low priority client poisons its own GTT and so its execbuf may take ages to process, a high priority client can still execute in parallel. Signed-off-by: Dominik Grzegorzek <dominik.grzegorzek@intel.com> Cc: Zbigniew Kempczyński <zbigniew.kempczynski@intel.com> Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2020-04-01i915/gem_exec_alignment: Limit 'many' runtimeDominik Grzegorzek
Limit the 'many' runtime to 10s, performing as many passes of increasing alignment until we exceed the timeout. Signed-off-by: Dominik Grzegorzek <dominik.grzegorzek@intel.com> Cc: Zbigniew Kempczyński <zbigniew.kempczynski@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>