summaryrefslogtreecommitdiff
path: root/tests/gem_ringfill.c
AgeCommit message (Collapse)AuthorFilesLines
2018-03-22igt/gem_measure_ring_size_inflight: Measure smallest inflight ring sizeAntonio Argenziano1-1/+1
Some tests measure the render's ring size but are actually meant to measure the smallest across all engines. This patch adds measuring the smallest size in gem_measure_ring_size_inflight() given the appropriate parameter. v2: - Only expose high level API. (Chris) v3: - Use ALL_ENGINES macro. Suggested-by: Chris Wilson <chris@chris-wilson.co.uk> Signed-off-by: Antonio Argenziano <antonio.argenziano@intel.com> Cc: Chris Wilson <chris@chris-wilson.co.uk> Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
2018-02-23tests/gem_ringfill: use intel_measure_ring_sizeDaniele Ceraolo Spurio1-95/+2
With intel_measure_ring_size added as common function we can use it instead of the local copy Signed-off-by: Daniele Ceraolo Spurio <daniele.ceraolospurio@intel.com> Cc: Daniele Ceraolo Spurio <daniele.ceraolospurio@intel.com> Cc: Chris Wilson <chris@chris-wilson.co.uk> Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
2017-12-11tests: Use igt_device_set_masterChris Wilson1-1/+2
A few tests only require DRM_MASTER privileges for a subset of gen or tests, and so open the device as normal and conditionally call drmSetMaster. Translate these over to using igt_device_set_master(), which includes a bit more debugging for when it fails. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Reviewed-by: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
2017-10-18tests: Clean up igt_skip_on_simulation() usesArkadiusz Hiler1-0/+2
General update to reflect current state of things. Signed-off-by: Arkadiusz Hiler <arkadiusz.hiler@intel.com> Acked-by: Radoslaw Szwichtenberg <radoslaw.szwichtenberg@intel.com> Acked-by: Petri Latvala <petri.latvala@intel.com>
2017-09-06igt/gem_ringfill: Prime execbuf before measuring ring sizeChris Wilson1-2/+8
Make sure that our buffers are ready and loaded to reduce the initial stall. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Reviewed-by: MichaƂ Winiarski <michal.winiarski@intel.com>
2017-07-06Revert "igt: Remove default from the engine list"Chris Wilson1-1/+1
This reverts commit d7a0b61450797a3d6644c65aebf75c2a90da1a15.
2017-07-06igt: Remove default from the engine listTvrtko Ursulin1-1/+1
Default is not an engine but an ABI alias for RCS. Remove it from the engine list to eliminate redundant subtests and test passes. Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com> Acked-by: Daniel Vetter <daniel.vetter@intel.com>
2017-05-18lib: Refactor testing for ability to use MI_STORE_DATA_IMMChris Wilson1-9/+2
Rather than have the code in multiple locations, put a copy in lib/ Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2017-03-10igt/gem_ringfill: Measure ringsize for quicker and deterministic testingChris Wilson1-22/+125
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2017-02-22igt: Start marking up GEM tests that require an alive GPU to functionChris Wilson1-0/+1
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2017-02-04igt: intel_gen(intel_gen()) eekChris Wilson1-1/+1
Painfully obvious afterwards. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2017-02-03igt: Skip MI_STORE_DWORD_IMM on gen2Chris Wilson1-0/+6
On gen2 MI_STORE_DWORD_IMM operates on a physical, not virtual, address i.e. we can't use it. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2017-01-21igt/gem_ringfill: Restore secure dispatch for ctg/ilkChris Wilson1-2/+18
Cantiga, Ironlake had early ppgtt hw and so marked MI_STORE_DATA_IMM as a privileged command, even when ppgtt is not enabled. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2017-01-19igt/gem_ringfill: Restrict BIT(22) to gen2/3 as it changed meaning on gen4+Chris Wilson1-1/+2
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2017-01-18igt/gem_ringfill: Drop SECURE dispatch for gen2/3Chris Wilson1-3/+1
It's not required, and fails completely without the master fd (i.e. on the new newfd tests). Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2017-01-18igt/gem_ringfill: Fill multiple execlist ringsChris Wilson1-25/+52
On execlists, there is a ring per engine per context. So create a few contexts (fd) and spam them. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2017-01-02igt: Mass conversion to to_user_pointer()Chris Wilson1-2/+2
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2016-10-13lib/igt_aux: Add support for various system suspend/resume optionsImre Deak1-2/+4
To have a more accurate idea about any suspend/resume issues we can perform the s/r until various phases in the s/r sequence. This way we can isolate the given problem as being a device driver, kernel core or BIOS related issue. Actual subtests using these new s/r phases will be added as follow-up. While at it also add the freeze suspend target, it's something we also would need to test. Signed-off-by: Imre Deak <imre.deak@intel.com>
2016-09-13igt/gem_busy: Prevent banning when running multiple hang testsChris Wilson1-1/+1
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2016-05-12lib/igt_aux: Polish docs for igt_interruptibleDaniel Vetter1-1/+1
- Give __ prefix to internal funcstion and structs, only igt_interruptible is used by tests. - Move docs to igt_interruptible and adjust. - Explain more clearly how the timeout is getting doubled each iteration until no more interruptions happen. Also rename the argument to give it a more meaningful name in the docs. - Link from other functions to this one for cross-referencing. - Rename to igt_do_interruptible to make it clearer it's a loop, inspired by do {} while () loops. v2: Rename instead to igt_while_interruptible and fix typos (Chris). And add gtk-doc for igt_ioctl, too. Acked-by: Chris Wilson <chris@chris-wilson.co.uk> Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
2016-05-03igt/gem_ringfill: Avoid CPU -> GTT -> CPU transitionChris Wilson1-5/+6
Avoid the second pair of full clflushes when setting up the batch. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2016-03-21igt/gem_ringfill: Fix basic- reversalChris Wilson1-1/+1
Rushed flipping around the logic to add basic- and forgot to apply the corrected patch. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2016-03-21igt/gem_ringfill: Fine-tune list of BAT testsChris Wilson1-10/+11
Drop -bomb as with forking * interruptible repeating, it takes too long to include in the BAT. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2016-03-19igt/gem_ringfill: Use igt_sigiter to focus the interruptible testingChris Wilson1-25/+21
Use the igt_sigiter interface to repeat the ringfill testing for as much as is required to exercise all potential injection sites. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2016-03-08igt/gem_ringfill: Check full rings across suspend/hibernateChris Wilson1-0/+18
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2016-02-04igt/gem_ringfill: Add exercising the default-ring to basic testingChris Wilson1-12/+9
ringfill generates a few very common errors when submitting requests, and historically these have been where we have had many implementation bugs, repeated over and over again. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2016-01-28igt/gem_ringfill: Set MI_MEM_VIRTUAL flag for gen<6Chris Wilson1-4/+3
bit22 of MI_STORE_DWORD is confusing as the meaning changed between physical/virtual addressing in early gen and GTT/ppGTT in later gen. It looks like gen4 and gen5 still need the flag. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2016-01-27Add I915_EXEC_DEFAULT to list of known enginesChris Wilson1-1/+1
I dropped this from the list of rings for some tests when refactoring to a common array. Almost all of the tests should be run over the default exec engine to ensure ABI backwards compatiblity. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2016-01-27igt/gem_ringfill: Use common array of ringsChris Wilson1-17/+6
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2016-01-27lib: Share common __gem_execbuf()Chris Wilson1-8/+0
An oft-repeated function to check EXECBUFFER2 for a particular fail condition. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2016-01-27igt/gem_ringfill: Allow listing subtests in gem_ringfillGabriel Feceoru1-1/+2
Moved gem_quiescent_gpu() call to the run path. Signed-off-by: Gabriel Feceoru <gabriel.feceoru@intel.com> Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
2016-01-27gem_ringfill: fix typo in test nameMaarten Lankhorst1-1/+1
Missing a r! Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
2016-01-22igt/gem_ringfill: Mark the write object as EXEC_OBJECT_WRITEChris Wilson1-0/+1
After setting the flag for NORELOC (to avoid having to pay the cost of validating the relocations on every pass), we need to make sure that we set EXEC_OBJECT_WRITE so that we do track the outstanding writes. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2016-01-22igt/gem_ringfill: Disable MI_STORE_DATA_IMM on BSD/gen6Chris Wilson1-0/+3
It's broken, avoid at all costs. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2016-01-22igt: Fix use MI_STORE_DATA_IMM on gen3Chris Wilson1-2/+7
For the older gen, MI_STORE_DATA_IMM is a privileged command so we need to set the "secure" batch flag, and we also need to instruct the command to use the GTT virtual address. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2016-01-22igt/gem_ringfill: Reduce ringfill to just filling the ringsChris Wilson1-184/+148
The objective of this test is to check how the driver handles a full ring. To that end we need only submit enough work to fill the ring by submitting work faster than the GPU can execute it. If we are more careful in our batch construction, we can feed them much faster and achieve the same results much quicker. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2015-09-11convert drm_open_any*() calls to drm_open_driver*(DRIVER_INTEL) calls with cocciMicah Fedke1-1/+1
Apply the new API to all call sites within the test suite using the following semantic patch: // Semantic patch for replacing drm_open_any* with arch-specific drm_open_driver* calls @@ identifier i =~ "\bdrm_open_any\b"; @@ - i() + drm_open_driver(DRIVER_INTEL) @@ identifier i =~ "\bdrm_open_any_master\b"; @@ - i() + drm_open_driver_master(DRIVER_INTEL) @@ identifier i =~ "\bdrm_open_any_render\b"; @@ - i() + drm_open_driver_render(DRIVER_INTEL) @@ identifier i =~ "\b__drm_open_any\b"; @@ - i() + __drm_open_driver(DRIVER_INTEL) Signed-off-by: Micah Fedke <micah.fedke@collabora.co.uk> Signed-off-by: Thomas Wood <thomas.wood@intel.com>
2015-08-21lib: add a single include headerThomas Wood1-5/+1
Add a header that includes all the headers for the library. This allows reorganisation of the library without affecting programs using it and also simplifies the headers that need to be included to use the library. Signed-off-by: Thomas Wood <thomas.wood@intel.com>
2015-06-29tests/gem_ringfill: Add {render,blitter}-forked-1 subtests.Joonas Lahtinen1-44/+67
Add forking subtests to gem_ringfill. Tests cause consistent GPU hangs on SKL. v2: Removed noop parts. v3: - Allow executing the tests in order too (Chris Wilson). - Rename the tests to -forked-1 Cc: Mika Kuoppala <mika.kuoppala@linux.intel.com> Cc: Chris Wilson <chris@chris-wilson.co.uk> Signed-off-by: Joonas Lahtinen <joonas.lahtinen@linux.intel.com> [ickle: Extend to cover forked-N] Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=89959
2015-03-06igt.cocci: Replace igt_assert() with igt_assert_CMP() where possibleMatt Roper1-1/+1
The integer comparison macros give us better error output by including the actual values that failed the comparison. Signed-off-by: Matt Roper <matthew.d.roper@intel.com> Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
2014-08-30batch: Specify number of relocations to accommodateChris Wilson1-1/+1
Since relocations are variable size, depending upon generation, it is easier to handle the resizing of the batch request inside the BEGIN_BATCH macro. This still leaves us with having to resize commands in a few places - which still need adaption for gen8+. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-08-29Prepare for 64bit relocation addressesChris Wilson1-4/+2
This reveal that quite a few locations were writing relocation offsets but only allowing for 32 bit addresses. To reveal such places in active tests, we also now double check that we do not use more batch space than declared. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-07-29tests/gem_ringfill: add interruptible modeDaniel Vetter1-0/+17
Should be useful to test intel_ring_begin restart behaviour a bit. Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2014-05-15igt/gem_ringfill: Only check for rendercopy when testing render ringChris Wilson1-7/+7
Overzealous test runner ftl. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=78591 Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-05-14tests: sprinkle igt loggingDaniel Vetter1-3/+3
All the cases that simply dump some debug information and couldn't be converted to some of the fancier macros. Some information output removed when it's redundant with the subtest status. Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2014-03-23lib: extract igt_aux.[hc]Daniel Vetter1-3/+3
And shovel all the various helpers in there. Also move igt_set_vt_graphics_mode to igt_kms.h since the function is implemented in igt_kms.c. And it fits better. I kinda missed this in the prep work. Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2014-03-22lib: rename intel_gpu_tools.h to intel_io.hDaniel Vetter1-1/+1
With the header cleanup we can now give this header a suitable name, since it now really only contains register access and other I/O functions and assorted definitions. Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2014-03-22lib: unnecessary header removal for drmtest.h, part 1Daniel Vetter1-1/+2
Brought a few missing headers to light in ioctl_wrappers.h, too. Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2014-03-22lib/intel_batchbuffer: drop cpu_mapping from igt_bufDaniel Vetter1-1/+0
It's unused. There's still num_tiles getting in the way of things, but that is used by gem_stress a bit. Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2014-03-22lib/intel_batchbuffer: igt_ prefix for rendercopy/mediafill funcsDaniel Vetter1-3/+3
Now everything is prepared to pour some neat api docs over this all. Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>