summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2016-11-29igt/kms_flip: Use new igt_spin_batchAbdiel Janulgue
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) v10: Adapt to api rename 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-29igt/gem_wait: Use new igt_spin_batchAbdiel Janulgue
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 v10: Adapt to api rename 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-29lib: add igt_dummyloadAbdiel Janulgue
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. Since v14: Since we are using multiple signals, walk list of batches to terminate a batch to avoid using a single global batch. Cycle signals between SIGRTMIN and SIGRTMAX properly. 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-29igt_aux: Add some list helpers from waylandLyude
Since we're going to be using lists for keeping track of EDIDs we've allocated on the chamelium, add some generic list helpers from the wayland project. Signed-off-by: Lyude <lyude@redhat.com> Changes since v1: - Rename list helpers to be more like those from the Linux kernel v2: Make the api compatible with the kernel as well.
2016-11-29lib: Make signal helper definitions reusableAbdiel Janulgue
Lots of test cases are re-declaring this. v2: Remove definition in benchmarks/gem_syslatency.c Signed-off-by: Abdiel Janulgue <abdiel.janulgue@linux.intel.com>
2016-11-29kms_atomic_transition: Fix compileMaarten Lankhorst
Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
2016-11-29kms_atomic_transition: Add test timeout to run_modeset_testsMaarten Lankhorst
This fixes the hang on kms_atomic_transitions.1x-modeset-transitions. Underlying cause still needs more looking at.. Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
2016-11-28aubdump: Add a PCI-ID= entry to the AUB file commentJason Ekstrand
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
2016-11-28aubdump: Set the application nameJason Ekstrand
This will help with identifying aub files Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
2016-11-28Revert "aubdump: Bump the GTT size to 256MB"Jason Ekstrand
This reverts commit c6191a41f6c858cbdd4280e9ffcc91170e87ebeb. It turns out that having a GTT that large causes the simulator massive headaches. Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
2016-11-28tests/kms_plane_multiple: CRC based atomic correctness testMika Kahola
This is a testcase with multiple planes. The idea here is the following - draw a uniform frame with blue color - grab crc for reference - put planes randomly on top with the same blue color - punch holes with black color into the primary framebuffer - ideally the planes should cover these holes so that the output is the identical to reference crc - composite all with one ioctl call - grab crc and verify that the reference crc is equal - repeat this for several iterations to maximize coverage v7: Unify reference crc grabbing for atomic and legacy tests (Maarten) v6: Rename test_planes() to prepare_planes() (Maarten) When grabbing reference crc, keep framebuffer and crc enabled for atomic mode setting. (Maarten) Fix crc collection for legacy modesetting (Maarten) v5: Remove limit for max number of iterations and add possibility to loop forever (Daniel) Remove IN_RANGE() macro (Maarten) Remove log file and show random number seed on screen instead (Maarten) Split legacy and atomic plane tests on own functions (Maarten) remove test_atomic() function and pass test mode info as parameter (Maarten) Use bigger rectangle size (256x256) for non-cursor planes and smaller (128x128) size for cursor plane (Maarten) v4: For atomic test enable crc capturing before entering into a iteration loop. After each iteration, check that page flip didn't take no more than 1 vblank, fetch all crc's and check the values. Introduce new command line parameter for the number of iterations. The test run from 1 to 256 iterations. v3: Cleanup by removing separate plane array For atomic, pass DRM_MODE_PAGE_FLIP_EVENT Grab crc by using igt_pipe_crc_get_crc instead of igt_pipe_crc_collect_crc Rename nplanes variable to max_planes To optimize test execution, run iterations after the modeset v2: Keep a logfile on random number seeds per subtest that are not skipped due to unmet test requirements Signed-off-by: Mika Kahola <mika.kahola@intel.com> Reviewed-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
2016-11-28kms_panel_fitting: Add some more tests for fastset testing.Maarten Lankhorst
Instead of only testing native resolution to a scaled resolution, test the following sequence: Native -> scaled -> scaled (different) -> native. Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
2016-11-27igt/kms_setmode: Skip unconnected connectorsChris Wilson
Assuming that we can program any random unconnected output to a mode is nowadays false. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=98547 Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2016-11-27igt: Add kselftest runner for drm_mmChris Wilson
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2016-11-25igt/kms_setmode: Adjust timing assertion from percentage to scanlineChris Wilson
The target is that we report the vblank time accurate to within a scanline (limit of the hw with which we can reliably compensate). Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2016-11-25intel_ci: Add gem_exec_reloc/basic-softpin to BATChris Wilson
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Cc: Petri Latvala <petri.latvala@intel.com> Acked-by: Petri Latvala <petri.latvala@intel.com>
2016-11-25intel-ci: Add gem_exec_suspend/S4-devices to BATImre Deak
Add basic-s4-devices subtests to BAT. At the same time remove basic-s4 from the list, which is atm implicitly disabled via HIBERNATION=n in kconfig. We would need at least basic S4 coverage provided by basic-s4-devices, which requires HIBERNATION=y. v2 (Petri): Don't add s3-devices Signed-off-by: Imre Deak <imre.deak@intel.com> Signed-off-by: Petri Latvala <petri.latvala@intel.com>
2016-11-24igt/gem_seqno_wrap: Tidy assertion failure message for reading i915_next_seqnoChris Wilson
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2016-11-24aubdump: Fix intel_aubdump -o <filename>Kenneth Graunke
This looks like a mistake in 1f43677f895a88ae880b35f9b18cc7e6869d0ca6. Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
2016-11-23kms_atomic_transition: Respect limits for sprite planes on earlier platforms.Maarten Lankhorst
Usually there is a maximum amount of width/height that a sprite plane can have, and on earlier platforms alpha sprite planes are usually unsupported. In case of SKL+ and VLV/CHV this is handled by only setting a maximum width, but on earlier platforms there's a hardware limitation for stride, width and height. Handle this by starting from cursor dimensions, and then increase width to max, followed by height to max. If the TEST_ONLY commit fails immediately with -EINVAL with cursor width/height in ARGB format, assume that ARGB is unsupported and fallback to XRGB. If that fails too fail the test. This should allow tests to pass on all earlier platforms too. Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
2016-11-22igt/gem_mmap_gtt: Silence compile warning for !sse4.1Chris Wilson
gem_mmap_gtt.c: In function ‘test_huge_copy’: gem_mmap_gtt.c:589:4: warning: passing argument 2 of ‘copy_wc_page’ from incompatible pointer type [enabled by default] copy_wc_page(page, a + PAGE_SIZE*i); ^ gem_mmap_gtt.c:503:13: note: expected ‘const uint32_t *’ but argument is of type ‘char *’ static void copy_wc_page(uint32_t *dst, const uint32_t *src) ^ gem_mmap_gtt.c:601:4: warning: passing argument 2 of ‘copy_wc_page’ from incompatible pointer type [enabled by default] copy_wc_page(page, b + PAGE_SIZE*i); ^ gem_mmap_gtt.c:503:13: note: expected ‘const uint32_t *’ but argument is of type ‘char *’ static void copy_wc_page(uint32_t *dst, const uint32_t *src) Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2016-11-22tests: kms_pipe_color: remove unused variableLionel Landwerlin
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
2016-11-22aubdump: Bump the GTT size to 256MBJason Ekstrand
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
2016-11-22aubdump: Fix GTT setup for Gen8+Francisco Jerez
Gen8+ have 64 bit GTT entries, so we need to allocate twice as much space for the GTT table in order to cover the same number of GTT pages. Fixes sporadic page-fault crashes on the simulator. Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
2016-11-22aubdump: Handle 48-bit relocations properlyJason Ekstrand
aubdump was only writing 32-bits regardless of platform. This is fine if the client being dumped leaves the top 32 bits zero since the aubdump GTT is fairly small. However, if the client does store something in the upper 32 bits, this results in an invalid relocation. Cc: Kristian Høgsberg <krh@bitplanet.net> Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
2016-11-21kms_cursor_legacy: Add nonblocking modeset vs cursor update test.Maarten Lankhorst
In case of a nonblocking modeset, the cursor update should block for the modeset to finish. Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
2016-11-18igt/gem_eio: Apply the cork to the execbufChris Wilson
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 Wilson
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2016-11-18igt/gem_eio: Add inflight testChris Wilson
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 Wilson
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2016-11-17igt/gem_exec_parse: check oacontrol lri bad for >= v9Robert Bragg
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 Bragg
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 Bragg
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 Bragg
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 Bragg
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 Bragg
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 Bragg
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 Bragg
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 Bragg
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 Bragg
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 Bragg
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 Bragg
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 Latvala
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 Wilson
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2016-11-11lib: substitute cxt BAN_PERIOD with BANNABLEMika Kuoppala
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 Vizoso
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 Wilson
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 Wilson
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2016-11-10igt/kms_frontbuffer_tracking: Drop unsynchronized pageflip testChris Wilson
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 Vizoso
GEM_SET_TILING doesn't care about Yf or Ys, so just pass Y. Signed-off-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>