summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2017-08-30lib/kmod: Fix error reporting for kmod load/unloadChris Wilson
A "return -err ? err < 0 : err" managed to slip through. So if err was set, we returned 0 or 1 based on sign, or 0 if err was zero. If err is negative, we want treat it as an error, so report it back to the caller, all other values were a success, so convert those to 0. This should actually be no functional change, as all errors were reported as 1, and everything else as 0. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Reviewed-by: Petri Latvala <petri.latvala@intel.com>
2017-08-30igt/vgem_basic: Load and unload the module firstChris Wilson
To ensure the module exists, first load it. Then when we try to unload the module (to check that our modprobe interface works), we will not get spurious failures due to -ENOENT (in this case meaning the module did not exist): (vgem_basic:18361) igt-core-DEBUG: Starting subtest: unload (vgem_basic:18361) igt-kmod-DEBUG: Could not remove module vgem (No such file or directory) Test requirement not met in function test_unload, file vgem_basic.c:331: Test requirement: module_unload() == 0 Last errno: 2, No such file or directory Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Reviewed-by: Petri Latvala <petri.latvala@intel.com>
2017-08-30tests/kms_atomic: subtest atomic_invalid_params requires CRTCMarta Lofstedt
Check for valid crtc is missing in igt@kms_atomic@atomic_invalid_params. This leads to segfault on machines where the subtest should be skipped. Signed-off-by: Marta Lofstedt <marta.lofstedt@intel.com> Reviewed-by: Mika Kahola <mika.kahola@intel.com>
2017-08-29tools/intel_vbt_decode: migrate backlight dumping to kernel structJani Nikula
Drop obsolete field dumping. Acked-by: Daniel Vetter <daniel.vetter@ffwll.ch> Signed-off-by: Jani Nikula <jani.nikula@intel.com>
2017-08-29tools/intel_vbt_decode: migrate child device type bits decoding to kernel defsJani Nikula
This lets us use the verbatim copy of the kernel intel_vbt_defs.h file after kernel commit 058727ee8d9a ("drm/i915/bios: amend edp block based on intel_vbt_decode"). Acked-by: Daniel Vetter <daniel.vetter@ffwll.ch> Signed-off-by: Jani Nikula <jani.nikula@intel.com>
2017-08-29tools/intel_vbt_decode: migrate edp dumping to kernel structJani Nikula
No functional changes. Acked-by: Daniel Vetter <daniel.vetter@ffwll.ch> Signed-off-by: Jani Nikula <jani.nikula@intel.com>
2017-08-29tools/intel_vbt_decode: migrate psr dumping to kernel structJani Nikula
No functional changes. Acked-by: Daniel Vetter <daniel.vetter@ffwll.ch> Signed-off-by: Jani Nikula <jani.nikula@intel.com>
2017-08-29tools/intel_vbt_decode: migrate child device dumping to kernel structJani Nikula
Retain the legacy definition for the obsolete child device block, at least for now. No functional changes. Acked-by: Daniel Vetter <daniel.vetter@ffwll.ch> Signed-off-by: Jani Nikula <jani.nikula@intel.com>
2017-08-29tools/intel_vbt_decode: migrate timing dumping to kernel structJani Nikula
Adapt the dumping according to the changes, and do what the kernel does. Acked-by: Daniel Vetter <daniel.vetter@ffwll.ch> Signed-off-by: Jani Nikula <jani.nikula@intel.com>
2017-08-29tools/intel_vbt_decode: start migrating to kernel intel_vbt_defs.hJani Nikula
Copy over most of intel_vbt_defs.h, and use everything that matches with minor changes from there. Acked-by: Daniel Vetter <daniel.vetter@ffwll.ch> Signed-off-by: Jani Nikula <jani.nikula@intel.com>
2017-08-29tools/intel_vbt_decode: clean up struct lvds_dvo_timingJani Nikula
For reasons unknown, we have two copies of the struct. Deduplicate. Acked-by: Daniel Vetter <daniel.vetter@ffwll.ch> Signed-off-by: Jani Nikula <jani.nikula@intel.com>
2017-08-29tools/intel_vbt_decode: remove unused definitions from intel_bios.hJani Nikula
This is prep work for refactoring VBT definitions. Acked-by: Daniel Vetter <daniel.vetter@ffwll.ch> Signed-off-by: Jani Nikula <jani.nikula@intel.com>
2017-08-29tools/intel_lid: use local register definitionJani Nikula
This makes the future intel_vbt_decode refactoring easier. Acked-by: Daniel Vetter <daniel.vetter@ffwll.ch> Signed-off-by: Jani Nikula <jani.nikula@intel.com>
2017-08-29igt: Add gem_closeChris Wilson
What transpired recently was that we allow a single process to create multiple handles to the same VMA (which I broke). Make sure we test! References: https://bugs.freedesktop.org/show_bug.cgi?id=102355 Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Reviewed-by: Michał Winiarski <michal.winiarski@intel.com> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2017-08-28docs: Add user documentation about audio supportPaul Kocialkowski
This introduces plain-text documentation about the audio test, aimed at users who wish to setup and run the audio tests. Given the contents of this documentation, it felt more relevant to make it part of the tree instead of the API reference. Signed-off-by: Paul Kocialkowski <paul.kocialkowski@linux.intel.com> Reviewed-by: Lyude Paul <lyude@redhat.com>
2017-08-28docs: Add user and developer documentation about Chamelium supportPaul Kocialkowski
This introduces plain-text documentation about the Chamelium aimed at users who wish to deploy the platform, as well as developers who wish to work on improving IGT support for it. Given the contents of this documentation, it felt more relevant to make it part of the tree instead of the API reference. Signed-off-by: Paul Kocialkowski <paul.kocialkowski@linux.intel.com> (with one small typo fixed) Reviewed-by: Lyude Paul <lyude@redhat.com>
2017-08-28lib/igt_core: Use HTML character for documentation comment in examplePaul Kocialkowski
The gtkdoc output for the example configuration given in the file confuses gtkdoc because of the use of # for comments, that is interpreted as a headline (although it is an example block). This uses the HTML character instead to ensure the rendering is correct. Signed-off-by: Paul Kocialkowski <paul.kocialkowski@linux.intel.com> (with one small typo fixed) Reviewed-by: Lyude Paul <lyude@redhat.com>
2017-08-25tests: chamelium: Eliminate reset when preparing outputPaul Kocialkowski
Resetting the Chamelium when preparing the video output is unnecessary and significant increases the tests run-time. Since all video-related tests work just as well without it, eliminate it. This also adds a call to reset_test in the analog frame dump test, that was missing before, although the chamelium was still reset by the call to prepare_output. Signed-off-by: Paul Kocialkowski <paul.kocialkowski@linux.intel.com> Reviewed-by: Lyude Paul <lyude@redhat.com>
2017-08-24aubdump: Log some information about the execbuf callsJason Ekstrand
Reviewed-by: Scott D Phillips <scott.d.phillips@intel.com>
2017-08-24aubdump: Use write_reloc for filling out the ringbufferJason Ekstrand
Reviewed-by: Scott D Phillips <scott.d.phillips@intel.com> Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
2017-08-24aubdump: Reject execbuffer2 calls with bad BOsJason Ekstrand
This is required for the supports_48b_addresses check in the Vulkan driver to work without messing up the resulting aub. Reviewed-by: Scott D Phillips <scott.d.phillips@intel.com> Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
2017-08-24intel-ci: Remove generic.testlistPetri Latvala
The list has been unmaintained and unused. The set of tests is a subset of what CI runs in sharded runs so we are running all of them already. Signed-off-by: Petri Latvala <petri.latvala@intel.com> Acked-by: Arkadiusz Hiler <arkadiusz.hiler@intel.com> Acked-by: Daniel Vetter <daniel.vetter@intel.com> Acked-by: Tomi Sarvela <tomi.p.sarvela@intel.com>
2017-08-24lib/core: Use igt_info instead of printfDaniel Vetter
igt_info doesn't add anything when printing to stdout, but so looks the same. But it has the upside of appending the lines also to the igt crashdump log, where I especially want the backtraces. Atm they're the only thing that doesn't end up in there, which is a bit confusing. While at it also convert the other lines - the test summary usually doesn't make it since the test fails before that, and the version line tends to scroll off the crashdump. Signed-off-by: Daniel Vetter <daniel.vetter@intel.com> Reviewed-by: Petri Latvala <petri.latvala@intel.com> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2017-08-23intel-ci: Add fast chamelium tests to the fast-feedback listPaul Kocialkowski
This adds the fastest chamelium tests to the Intel CI fast-feedback list, with the objective of running in under a minute. Signed-off-by: Paul Kocialkowski <paul.kocialkowski@linux.intel.com> Reviewed-by: Lyude Paul <lyude@redhat.com>
2017-08-23tests/chamelium: Introduce fast CRC tests, with a single modePaul Kocialkowski
This introduces a fast fashion of testing display CRC, that only tests a single mode (the highest resolution). It drastically reduces the run time of the test, which is necessary for the fast-feedback test list. Signed-off-by: Paul Kocialkowski <paul.kocialkowski@linux.intel.com> Reviewed-by: Lyude Paul <lyude@redhat.com>
2017-08-23tests/chamelium: Introduce fast basic hpd tests, with limited togglesPaul Kocialkowski
This introduces a fast fashion of testing basic hotplug detect, with only 3 toggles. It drastically reduces the run time of the test, which is necessary for the fast-feedback test list. Signed-off-by: Paul Kocialkowski <paul.kocialkowski@linux.intel.com> Reviewed-by: Lyude Paul <lyude@redhat.com>
2017-08-22tests/Makefile.am: Wrap audio test with dedicated conditionalPaul Kocialkowski
This uses the dedicated HAVE_AUDIO conditional, that depends on both ALSA and GSL, for wrapping the audio test. This makes the wrapping consistent with what is done for the chamelium test. Signed-off-by: Paul Kocialkowski <paul.kocialkowski@linux.intel.com> Reviewed-by: Lyude Paul <lyude@redhat.com>
2017-08-21tests: Introduce audio tests, starting with HDMI signal integrityPaul Kocialkowski
This introduces a new test for audio going through display connectors. It currently contains a single subtest for HDMI signal integrity, but other test cases will be added later on. The test setup consists in using an HDMI-VGA bridge that separates the audio out (via a 3.5 mm jack) and feeding this back to the DUT's line-in where it can be recorded by ALSA with controls correctly configured. The audio test makes use of the audio and ALSA igt libraries helpers. Signed-off-by: Paul Kocialkowski <paul.kocialkowski@linux.intel.com> Reviewed-by: Lyude Paul <lyude@redhat.com>
2017-08-21lib: Add ALSA library with dedicated helpersPaul Kocialkowski
This introduces an ALSA library, with dedicated helpers for handling playback and capture. It handles ALSA device identification and configuration as well as a run loop with callback mechanisms for feeding output data and handling input data. This library paves the way for testing audio going through display connectors, such as HDMI. Signed-off-by: Paul Kocialkowski <paul.kocialkowski@linux.intel.com> Reviewed-by: Lyude Paul <lyude@redhat.com>
2017-08-21lib: Add audio library with dedicated helpersPaul Kocialkowski
This introduces an audio library, with dedicated helpers for both generating signals and detecting peak frequencies in a signal. This library paves the way for testing audio going through display connectors, such as HDMI. Signed-off-by: Paul Kocialkowski <paul.kocialkowski@linux.intel.com> Reviewed-by: Lyude Paul <lyude@redhat.com>
2017-08-16tools/intel_vbt_decode: Fix decoding of child device structureVille Syrjälä
Fix decoding of the start of the child device structure. I had accidentally duplicated the "device class/type" member and forgot to include the add-in offset later. Fortunately both were two byte fields so they effectively cancelled each other out and thus the remainder of the child device structure was being decoded correctly. But of course anything sitting between these two fields was being decoded incorrectly. Fixes: 86a546f6f798 ("tools/intel_bios_reader: Dump out more information from the child device structure") Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com> Reviewed-by: Jani Nikula <jani.nikula@intel.com>
2017-08-16tests/gem_exec_params: Update the invalid-flag subtest for FENCE_ARRAYJason Ekstrand
Tests for the new flag were added in 3685dabb0ab25eb1. Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2017-08-16lib/dummyload: Pad with a few nops so that we do not completely hog the systemChris Wilson
Part of the attraction of using a recursive batch is that it is hard on the system (executing the "function" call is apparently quite expensive). However, the GPU may hog the entire system for a few minutes, preventing even NMI. Quite why this is so is unclear, but presumably it relates to the PM_INTRMSK workaround on gen6/gen7. If we give the system a break by having the GPU execute a few nops between function calls, that appears enough to keep SNB out of trouble. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Cc: Tomi Sarvela <tomi.p.sarvela@intel.com> Cc: Daniel Vetter <daniel.vetter@intel.com> [danvet: Add bugzilla link] Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2017-08-16intel-ci: Add fast-feedback-simulation.testlistKelvin Gardiner
Added an initial list of fast feedback tests for simulation environments. v2 (Petri): Rebase README, Add the simulation list to EXTRA_DIST. Signed-off-by: Kelvin Gardiner <kelvin.gardiner@intel.com> Signed-off-by: Petri Latvala <petri.latvala@intel.com>
2017-08-15tests/kms_mmap_write_crc: Add drmModeDirtyFB after dirtying fbMaarten Lankhorst
The test shows the need for coherency through the dma-buf sync ioctl's, but forgets to call dirtyfb, without this the FB Is never updated and we will fail anyway. Solve this by adding a drmModeDirtyFB, I've confirmed by adding -n that the test will still faill without prime_sync_end anyway, so the test is still useful. Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com> Cc: Marta Löfstedt <marta.lofstedt@intel.com> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=101109 Tested-by: Chris Wilson <chris@chris-wilson.co.uk> #llc Acked-by: Marta Lofstedt <marta.lofstedt@intel.com> Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk> #llc
2017-08-15tests/kms_flip: fix spin_batch conversionDaniel Vetter
The goal of these subtests was just to delay a kms operation a little bit. The goal wasn't to - spin until the operation was completed. That results in a gpu hang, and gpu hangs need igt_hang for safety. - complete it before the operation. That's just pointless. Fix it by using the timeout support. This was all broken in the initial conversation: commit 96ec8cb3b5ec1fc2927d6cff8e09930082301d7e Author: Abdiel Janulgue <abdiel.janulgue@linux.intel.com> Date: Sat Oct 29 01:01:05 2016 +0300 igt/kms_flip: Use new igt_spin_batch Note that part of the damage was removed already in commit b0081ea9cb7d39234fd0fcc64dd56ed4f5d50b05 Author: Maarten Lankhorst <maarten.lankhorst@linux.intel.com> Date: Wed Aug 9 11:11:52 2017 +0200 tests/kms_flip: Remove $engine-flip-vs-dpms/modeset But this patch also made things worse, because it remove code that wasn't dead yet (because it didn't remove all the dpms vs spinning batch tests). v2: Augment commit message and use macro for 1s-in-ns. Cc: Tomeu Vizoso <tomeu.vizoso@collabora.com> Cc: Abdiel Janulgue <abdiel.janulgue@linux.intel.com> Cc: Maarten Lankhorst <maarten.lankhorst@linux.intel.com> Reviewed-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2017-08-14igt/gem_exec_fence: Exercise syncobj APIChris Wilson
New execbuf API allows to pass arrays of fences as handles rather than allocate lots of fds. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
2017-08-14tests/kms_flip: Remove $engine-flip-vs-dpms/modesetMaarten Lankhorst
This is already tested in kms_busy, and without cs flips there's no point in doing those tests any more. The removed tests were broken and caused GPU hangs because the spin batch was not unblocked correctly. Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com> Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2017-08-14lib/igt_kms: Remove vblank wait after plane update.Maarten Lankhorst
With the conversion to atomic, this is already handled in the core. Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com> Reviewed-by: Mika Kahola <mika.kahola@intel.com>
2017-08-14Revert "tests/igt_command_line: Ignore subtest list for kms_ccs"Petri Latvala
The temporary workaround can now be removed with kms_ccs being fixed. This reverts commit 1385b31d9371fae02af2fd8adb0d9ea86a5bb0f2. Signed-off-by: Petri Latvala <petri.latvala@intel.com> Acked-by: Arkadiusz Hiler <arkadiusz.hiler@intel.com>
2017-08-14lib/kms: Check usage of for_each_*Daniel Vetter
Except for for_each_pipe_static they cannot be used outside of fixtures/subtest. Assert this. This will make the broken version of kms_ccs assert when run, which also would have made $make check fail. Cc: Daniel Stone <daniels@collabora.com> Cc: Jason Ekstrand <jason@jlekstrand.net> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch> Reviewed-by: Petri Latvala <petri.latvala@intel.com>
2017-08-14tests/kms_ccs: Fix subtest enumeration:Daniel Vetter
- We can't enumerate planes, push that into the subtest. - pipe enumeration needs to use for_each_pipe_static. This fells our CI since the test enumeration/sharding happens on the build server, which has no gfx nor does the job run as root ... Cc: Daniel Stone <daniels@collabora.com> Cc: Jason Ekstrand <jason@jlekstrand.net> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch> Reviewed-by: Petri Latvala <petri.latvala@intel.com>
2017-08-14lib/kms: Add for_each_pipe_staticDaniel Vetter
for_each_pipe cannot be used for enumerating testcases, so provide something that can. Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch> Reviewed-by: Petri Latvala <petri.latvala@intel.com>
2017-08-14lib: Add igt_can_fail()Daniel Vetter
Useful to make sure folks use library helpers correctly. Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch> Reviewed-by: Petri Latvala <petri.latvala@intel.com>
2017-08-14configure.ac: bump libdrm requirement to 2.4.82Dave Airlie
In order to pick up syncobjs. Signed-off-by: Dave Airlie <airlied@redhat.com> Acked-by: Daniel Vetter <daniel.vetter@intel.com>
2017-08-10tests/igt_command_line: Ignore subtest list for kms_ccsArkadiusz Hiler
Temporary workaround for "make check" to pass despite the issue with kms_ccs which do not list any subtests, even though it should. TO BE REVERTED by Daniel Stone Cc: Daniel Stone <daniels@collabora.com> Cc: Daniel Vetter <daniel.vetter@intel.com> Signed-off-by: Arkadiusz Hiler <arkadiusz.hiler@intel.com> Acked-by: Daniel Vetter <daniel.vetter@intel.com>
2017-08-10tests/kms_ccs: Test CCS on sprite planesDaniel Stone
Also try to test CCS on available non-primary planes. However, as there is not enough bandwidth to scan out both the primary and sprite planes when using CCS (or even Y-tiled), fall back to linear for the primary plane when using CCS for a sprite/cursor plane. Signed-off-by: Daniel Stone <daniels@collabora.com> Acked-by: Jason Ekstrand <jason@jlekstrand.net>
2017-08-10tests/kms_ccs: Split all tests into subtestsDaniel Stone
Some subtests were magically doing a for-each-pipe loop. Remove that, and have all multi-pipe tests actually work across all pipes. Signed-off-by: Daniel Stone <daniels@collabora.com> Acked-by: Jason Ekstrand <jason@jlekstrand.net>
2017-08-10tests/kms_ccs: Test for supported modifierDaniel Stone
Make sure the CCS modifier is supported on our plane, before we try to use it on that plane. Signed-off-by: Daniel Stone <daniels@collabora.com> Acked-by: Jason Ekstrand <jason@jlekstrand.net>
2017-08-10tests/kms_ccs: Reshuffle test name and loopDaniel Stone
In preparation for also testing sprites. Signed-off-by: Daniel Stone <daniels@collabora.com> Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>