summaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2016-11-22igt/kms_busy.c: Use new igt_spin_batchHEADmasterAbdiel Janulgue1-75/+6
v7: Adapt to api rename v8: Tidy up finish_fb_busy (Chris Wilson) Cc: Chris Wilson <chris@chris-wilson.co.uk> Cc: Daniel Vetter <daniel.vetter@ffwll.ch> Reviewed-by: Tomeu Vizoso <tomeu.vizoso@collabora.com> Signed-off-by: Abdiel Janulgue <abdiel.janulgue@linux.intel.com>
2016-11-22igt/kms_flip: Use new igt_spin_batchAbdiel Janulgue1-186/+26
v7: Reuse NSEC_PER_SEC defines v8: Don't wait on the fb, it must be busy. Exit the spin batch when flip is queued (Chris Wilson) Cc: Chris Wilson <chris@chris-wilson.co.uk> Cc: Daniel Vetter <daniel.vetter@ffwll.ch> Reviewed-by: Tomeu Vizoso <tomeu.vizoso@collabora.com> Signed-off-by: Abdiel Janulgue <abdiel.janulgue@linux.intel.com>
2016-11-22igt/gem_wait: Use new igt_spin_batchAbdiel Janulgue1-119/+7
v7: Adapt to api rename v8: Restore sanitycheck wait on the recursive batch and avoid using C99 locals (Chris Wilson) v9: Explicitly quit the batch instead of timing out right away Cc: Chris Wilson <chris@chris-wilson.co.uk> Cc: Daniel Vetter <daniel.vetter@ffwll.ch> Reviewed-by: Tomeu Vizoso <tomeu.vizoso@collabora.com> Signed-off-by: Abdiel Janulgue <abdiel.janulgue@linux.intel.com>
2016-11-22lib: add igt_dummyloadAbdiel Janulgue5-0/+344
A lot of igt testcases need some GPU workload to make sure a race window is big enough. Unfortunately having a fixed amount of workload leads to spurious test failures or overly long runtimes on some fast/slow platforms. This library contains functionality to submit GPU workloads that should consume exactly a specific amount of time. v2 : Add recursive batch feature from Chris v3 : Drop auto-tuned stuff. Add bo dependecy to recursive batch by adding a dummy reloc to the bo as suggested by Ville. v4: Fix dependency reloc as write instead of read (Ville). Fix wrong handling of batchbuffer start on ILK causing test failure v5: Convert kms_busy to use this api v6: Add this library to docs v7: Document global use of batch, reuse defines Minor code cleanups. Rename igt_spin_batch and igt_post_spin_batch to igt_spin_batch_new and igt_spin_batch_free respectively (Tomeu Vizoso). Fix error in dependency relocation handling in HSW causing tests to fail. v8: Restore correct order of objects in the execbuffer. Batch object should always be last. v9 : Add helper to terminate batch manually Cc: Daniel Vetter <daniel.vetter@ffwll.ch> Cc: Ville Syrjälä <ville.syrjala@linux.intel.com> Cc: Chris Wilson <chris@chris-wilson.co.uk> Cc: tomeu@tomeuvizoso.net Reviewed-by: Tomeu Vizoso <tomeu.vizoso@collabora.com> Signed-off-by: Abdiel Janulgue <abdiel.janulgue@linux.intel.com>
2016-11-21lib: Make signal helper definitions reusableAbdiel Janulgue5-19/+10
v2: Remove definition in benchmarks/gem_syslatency.c More and more test-cases are using this. Signed-off-by: Abdiel Janulgue <abdiel.janulgue@linux.intel.com>
2016-11-18igt/gem_eio: Apply the cork to the execbufChris Wilson1-6/+7
git add failure, I pushed the incomplete test. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2016-11-18igt/gem_exec_reloc: Don't execute an empty object for basic-softpinChris Wilson1-13/+15
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2016-11-18igt/gem_eio: Add inflight testChris Wilson1-0/+65
Since we can submit requests after becoming wedged, we need to test that we do handle that correctly. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2016-11-18igt/gem_exec_reloc: Trivial test for softpin ABIChris Wilson1-0/+35
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2016-11-17igt/gem_exec_parse: check oacontrol lri bad for >= v9Robert Bragg1-0/+25
OACONTROL is no longer white listed in the command parser so this checks at attempted LRI will be disallowed and (more importantly) checks that userspace doesn't get an EINVAL error for an attempted OACONTROL LRI. This is important becase Mesa application attempt OACONTROL LRIs while initializing and will abort for any execbuf error. Signed-off-by: Robert Bragg <robert@sixbynine.org> Reviewed-by: Matthew Auld <matthew.auld@intel.com>
2016-11-17igt/gem_exec_parse: update registers test for v >= 8Robert Bragg1-45/+49
This combines some parts of the recently added store_lri test with the registers test to be able to first load a distinguishable value before the LRI and explicitly read back the register to determine if the command succeeded or was a NOOP. For now though we won't look at OACONTROL without checking for version 9 of the command parser. This updates the 'bad' test to check the OASTATUS2 register so that we can explicitly read back from the register to check it becomes a NOOP. This adds a struct test_lri for associating a mask with the init/test values so we ignore things like hw status bits that might interfere with the result. Signed-off-by: Robert Bragg <robert@sixbynine.org> Reviewed-by: Matthew Auld <matthew.auld@intel.com>
2016-11-17igt/gem_exec_parse: update hsw_load_register_reg for v >= 8Robert Bragg1-1/+13
This updates the checking of disallowed loads to set a distinguishable value before the load and explicitly check the load was a NOOP by reading back the final value. Signed-off-by: Robert Bragg <robert@sixbynine.org> Reviewed-by: Matthew Auld <matthew.auld@intel.com>
2016-11-17igt/gem_exec_parse: update cmd-crossing-page for >= v8Robert Bragg1-2/+13
Since an access violation won't return an error to userspace for v >= 8 of the command parser this updates the cmd-crossing-page test to explicitly read back from SO_WRITE_OFFSET[0] to see that the command wasn't squashed to a NOOP. Signed-off-by: Robert Bragg <robert@sixbynine.org> Reviewed-by: Matthew Auld <matthew.auld@intel.com>
2016-11-17igt/gem_exec_parse: update bitmasks test for v >=8Robert Bragg1-4/+14
With v8 of the command parser (where we won't get an EINVAL for an access violation) this updates the bitmasks test to explicitly confirm that the command became a NOOP by reading back from where the QW_WRITE would have otherwise landed. Signed-off-by: Robert Bragg <robert@sixbynine.org> Reviewed-by: Matthew Auld <matthew.auld@intel.com>
2016-11-17igt/gem_exec_parse: make basic-rejected version agnosticRobert Bragg1-11/+20
This adapts the basic-rejected test to focus on invalid commands that will result in an EINVAL errno being returned to userspace even with the upcoming version 8 parser change to stop reporting access violations as EINVAL errors. Signed-off-by: Robert Bragg <robert@sixbynine.org> Reviewed-by: Matthew Auld <matthew.auld@intel.com>
2016-11-17igt/gem_exec_parse: req. v < 9 for oacontrol tracking testRobert Bragg1-0/+3
This limits testing the oacontrol tracking (required pairing of oa enable/disable per batch buffer) to version <= 8 of the command parser. Version 9 of the command parser removes all special handling for OACONTROL which is now going to be managed by i915-perf and not programmed from userspace. Signed-off-by: Robert Bragg <robert@sixbynine.org> Reviewed-by: Matthew Auld <matthew.auld@intel.com>
2016-11-17igt/gem_exec_parse: init global parser_version in fixtureRobert Bragg1-9/+4
This adds a static global int parser_version that can be referenced by all subtests without needing multiple GETPARAM requests. Signed-off-by: Robert Bragg <robert@sixbynine.org> Reviewed-by: Matthew Auld <matthew.auld@intel.com>
2016-11-17igt/gem_exec_parse: make global vars local to main()Robert Bragg1-3/+3
Signed-off-by: Robert Bragg <robert@sixbynine.org> Reviewed-by: Matthew Auld <matthew.auld@intel.com>
2016-11-17igt/gem_exec_parse: update hsw_load_register_regRobert Bragg1-73/+64
This generalises hsw_load_register_reg to loop through an array of allowed and disallowed registers and to use the exec_batch[_patched] utilities. Signed-off-by: Robert Bragg <robert@sixbynine.org> Reviewed-by: Matthew Auld <matthew.auld@intel.com>
2016-11-17igt/gem_exec_parse: move hsw_load_register_reg downRobert Bragg1-91/+91
No functional change, just moving hsw_load_regster_reg test code down below the execbuf utilities in preparation for updating to use them. Signed-off-by: Robert Bragg <robert@sixbynine.org> Reviewed-by: Matthew Auld <matthew.auld@intel.com>
2016-11-17igt/gem_exec_parse: some minor cleanupsRobert Bragg1-130/+66
This normalizes the execbuf utilities in this file to all use memset to clear obj, reloc and execbuf structures and set them up in the same order. As I was debugging some unpredictable test failures I was getting unsure that all these structures were being fully initialized. The same I915_GEM_DOMAIN_COMMAND domain is now used with all relocs. The register/command defines have been moved to the top of the file to be available to all tests/utilities. The handle + fd variables are now static. Signed-off-by: Robert Bragg <robert@sixbynine.org> Reviewed-by: Matthew Auld <matthew.auld@intel.com>
2016-11-15lib: Add missing include for sync()Petri Latvala1-0/+1
Commit 721d8747e3a2 added sync() calls to igt_main and igt_simple_main, making self-tests fail to build. #including unistd.h in igt_core.h fixes that. Fixes: 721d8747e3a2 ("igt: Add a test for reordering execbufs") CC: Chris Wilson <chris@chris-wilson.co.uk> Signed-off-by: Petri Latvala <petri.latvala@intel.com> Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
2016-11-14igt/gem_exec_schedule: Update param for finalChris Wilson1-1/+1
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2016-11-11lib: substitute cxt BAN_PERIOD with BANNABLEMika Kuoppala4-37/+68
Context BAN_PERIOD will get depracated so subsitute it with BANNABLE property. Make ctx param test to accept both variants for now until kernel changes have landed, to not break BAT. v2: check against - EINVAL on get/set ban as it can return -EPERM v3: better naming for get/set (Chris) Cc: Chris Wilson <chris@chris-wilson.co.uk> Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk> Signed-off-by: Mika Kuoppala <mika.kuoppala@intel.com>
2016-11-11lib: Pass I915_TILING_NONE if Yf or YsTomeu Vizoso1-1/+2
The kernel expects that BOs for framebuffers with I915_FORMAT_MOD_Yf_TILED will have I915_TILING_NONE. Fixes: 050c00d53f39 ("lib: Pass I915_TILING_Y to the kernel if Yf or Ys") Cc: Tvrtko Ursulin <tvrtko.ursulin@linux.intel.com> Signed-off-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
2016-11-10igt/gem_mmap_gtt: Swap thrash copyChris Wilson1-2/+8
Copy between two objects that together just exceed physical memory causing ping-pong on every page. Not for the faint hearted. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2016-11-10igt/gem_mmap_gtt: Add forked contention to the mmap copiesChris Wilson1-96/+116
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2016-11-10igt/kms_frontbuffer_tracking: Drop unsynchronized pageflip testChris Wilson1-8/+0
A raw pageflip is nonblocking and asynchronous, but kms_frontbuffer_tracking persumed that it was synchronous and completed before the funtion returns. It doesn't, so the CRC could be sampled before the flip completed. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Reviewed-by: Petri Latvala <petri.latvala@intel.com>
2016-11-10lib: Pass I915_TILING_Y to the kernel if Yf or YsTomeu Vizoso1-0/+3
GEM_SET_TILING doesn't care about Yf or Ys, so just pass Y. Signed-off-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
2016-11-10lib: Pass tiling constant where that's expectedTomeu Vizoso3-20/+32
We were passing in two places a framebuffer modifier constant instead of a tiling constant. Also adds igt_fb_mod_to_tiling so tests can do that by themselves. Cc: Tvrtko Ursulin <tursulin@ursulin.net> Fixes: 8a1a38661f56 ("lib: Add igt_create_bo_with_dimensions") Signed-off-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
2016-11-09tests: kms_pipe_color: fix ctm testsLionel Landwerlin1-1/+8
Some of the Intel platforms have odd numbers of LUT entries and we need to tests a couple of values around the expected result. Bring back the CRC equal function we need that doesn't trigger an assert right away, while we still assert if we can't find a correct result in the outter loop. v2: update Fixes field (Jani) v3: Use memcmp (Ville) v4: missing signed-off bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=97691 Fixes: 582ce4cd19c6 ("lib/debugs: nuke igt_crc_equal again") Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
2016-11-09aubdump: add --command option to stream aubdump to another programLionel Landwerlin2-11/+98
This comes handy if you want to look at your application output without having to save it into a file. For example, use this with aubinator from Mesa : $ intel_aubdump -c '/path/to/aubinator --gen=hsw' my_gl_app v2: Fix handling empty command line option v3: Fix command line concatenation (again...) v4: Use execvp (Petri) Indentation (Petri) Allow recording to a file and stream to an external application (Lionel) Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com> Reviewed-by: Sirisha Gandikota <Sirisha.Gandikota@intel.com>
2016-11-09tools: intel_aubdump: pass configuration through file descriptorLionel Landwerlin2-23/+59
This makes parsing options less complicated and easier to extend. v2: Fix device id parsing (atoi -> sscanf) (Sirisha) Combine with previous commit moving init function (Sirisha) v3: Fix behavior change between bash 4.3 & 4.4 in <<< with \n characters (Lionel) Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com> Reviewed-by: Sirisha Gandikota <Sirisha.Gandikota@intel.com>
2016-11-09configure.ac: correctly manage DRM_INTEL_{CFLAGS, LIBS}Emil Velikov1-4/+7
Currently the latter is only set when using --enable-intel. Whereas for the CFLAGS: if we "enable" PKG_CHECK_MODULES sets the variable, while for "disable" we do it locally. In either case the CFLAGS is not propagated through, this one can get build issues regardless of the actual state of the toggle. v2: Add -I for the include directive and correctly propagate $(top_srcdir). Cc: Brian Starkey <brian.starkey@arm.com> Cc: Robert Foss <robert.foss@collabora.com> Reported-by: Brian Starkey <brian.starkey@arm.com> Signed-off-by: Emil Velikov <emil.velikov@collabora.com> Reviewed-by: Robert Foss <robert.foss@collabora.com> Tested-by: Brian Starkey <brian.starkey@arm.com>
2016-11-09lib: use the local intel_aub.h fileEmil Velikov3-4/+4
File is provided by the libdrm_intel package which is optional. Since we already have a local copy of the file, we might as well use it ;-) v2: Move the file alongside intel_bufmgr.h and use it in the disable-intel case. Cc: Brian Starkey <brian.starkey@arm.com> Reported-by: Brian Starkey <brian.starkey@arm.com> Signed-off-by: Emil Velikov <emil.velikov@collabora.com> Tested-by: Brian Starkey <brian.starkey@arm.com>
2016-11-09Revert "lib: use the local intel_aub.h file"Tomeu Vizoso2-2/+2
Emil prefers if the approach in v2 is used (it was sent around the time v1 had been applied). This reverts commit 438c8d7c688780337d271016d84a69aab0474097.
2016-11-09igt/gem_exec_parse: Exercise lots of different allocation sizesChris Wilson1-0/+37
Try and exercise the batch-pool vs shrinker. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2016-11-09igt/gem_exec_reloc: Reduce being interrupted to a warnChris Wilson1-6/+24
If the relocation is incomplete and we take the slow path, we fill the reloc.presumed_offset with -1. This shouldn't happen for the basic tests, at least not on the most recent kernels, yet can happen in older kernels. Just reduce the failure to a warn. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2016-11-07igt: Add a test for reordering execbufsChris Wilson5-0/+519
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2016-11-07igt: Add exerciser for execbuf fence-out <-> fence-inChris Wilson2-0/+378
When execbuf2 supports explicit fencing with sync_file in/out fences (via a fence-fd), we can control execution via the fence. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2016-11-07igt: Add test case for EXEC_OBJECT_ASYNCChris Wilson2-0/+218
The intention behind EXEC_OBJECT_ASYNC is to instruct the kernel to ignore implicit fences on the object but still maintain them for the GEM API. The user is expected to provide explicit fencing to maintain correct ordering of rendering. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2016-11-07igt/gem_mmap_gtt: Use SSE4.1 streaming to speed up per-pixel checksChris Wilson1-29/+110
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2016-11-07igt/gem_exec_reloc: Check we write the full 64bit relocationChris Wilson2-0/+202
Recently a patch ran successfully through BAT that broke 64bit relocations on a couple of machines. Oops. So lets add a very fast set of tests to check basic relocation handling. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2016-11-03benchmarks: Add prime_lookup to .gitignorePetri Latvala1-1/+2
Also re-sort the file. Signed-off-by: Petri Latvala <petri.latvala@intel.com>
2016-11-03tools: Add intel_guc_logger to .gitignorePetri Latvala1-1/+2
Also re-sort the file. Signed-off-by: Petri Latvala <petri.latvala@intel.com>
2016-11-02igt/kms_flip: Use the computed vblank interval for TS checkingChris Wilson1-11/+22
Since the modeline may differ from actual hardware timings, do not rely upon it but instead measure the actual and verify that it does not change across the various flip/vblank configurations. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2016-11-02igt/kms_flip: Mark frame_time() as coming from the modeChris Wilson1-12/+12
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2016-11-02igt/gem_ctx_create: Exercise allocating as many contexts as we canChris Wilson1-7/+149
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2016-11-01tests: add more debugs on failure to unload snd_hda_intelJani Nikula1-0/+1
List open files under sound devices. Signed-off-by: Jani Nikula <jani.nikula@intel.com>
2016-11-01tests: do snd_hda_intel unbind before unload in module reload testJani Nikula1-0/+5
Try to make sure the snd_hda_intel module is not in use, and can be unloaded. v2: unbind all cards (Libin) Cc: Keqiao Zhang <keqiao.zhang@intel.com> Cc: Libin Yang <libin.yang@intel.com> Reviewed-by: Libin Yang <libin.yang@intel.com> Signed-off-by: Jani Nikula <jani.nikula@intel.com>