summaryrefslogtreecommitdiff
path: root/lib
AgeCommit message (Collapse)Author
2016-07-03lib/igt_aux: Framework for measuring latency in raising signalsChris Wilson
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2016-06-30intel_chipset: Remove unused PCI_CHIP idsChris Wilson
These are now taken from i915_pciids.h. However, some of the older ids are still used explicitly for per-devid information, and so are not yet removable. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2016-06-30intel_chipset: Replace lookup of GT size with computationChris Wilson
Instead of a large if-chain for matching devid to GT, we can just compute it directly from the encoded devid. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2016-06-30intel_chipset: Convert IS_G4X to device infoChris Wilson
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2016-06-30intel_chipset: Convert IS_915, IS_945 to device infoChris Wilson
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2016-06-30intel_chipset: Convert IS_PINEVIEW to device infoChris Wilson
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2016-06-30intel_chipset: Convert IS_IRONLAKE to device infoChris Wilson
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2016-06-30intel_chipset: Convert IS_IVYBRIDGE to device infoChris Wilson
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2016-06-30intel_chipset: Convert IS_VALLEYVIEW to device infoChris Wilson
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2016-06-30intel_chipset: Convert IS_HASWELL to device infoChris Wilson
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2016-06-30intel_chipset: Convert IS_BROADWELL to device infoChris Wilson
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2016-06-30intel_chipset: Convert IS_CHERRYVIEW to device infoChris Wilson
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2016-06-30intel_chipset: Convert IS_SKYLAKE to device infoChris Wilson
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2016-06-30intel_chipset: Convert IS_BROXTON to device infoChris Wilson
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2016-06-30intel_chipset: Convert IS_BROADWATER, IS_CRESTLINE to device infoChris Wilson
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2016-06-30intel_chipset: Convert IS_965 to use intel_gen()Chris Wilson
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2016-06-30intel_chipset: Convert IS_MOBILE to intel_device_infoChris Wilson
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2016-06-30lib: Start weaning off defunct intel_chipset.hChris Wilson
Several years ago we made the plan of only having one canonical source for i915_pciids.h, the kernel and everyone importing their definitions from that. For consistency, we style the intel_device_info after the kernel, most notably using a generation mask and a per-codename bitfield. This first step converts looking up the generation for a devid tree from a massive if(devid)-chain to a (cached) table lookup. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2016-06-29Revert "igt_kms: Add modeset support for atomic style commits."Maarten Lankhorst
This reverts commit 4a1859781f154513f19cd6392e04f50dbe6c030a. This commit wasn't ready yet, should never have been committed.
2016-06-29igt_kms: Add modeset support for atomic style commits.Maarten Lankhorst
All pipes are now updated in the loop first, before connectors are read out. The mode_id and active crtc properties are added, and crtc_id for connectors. These are required to do a modeset, and the behavior during atomic commits is changed slightly too. A lot of code will do the following: - Init. - igt_output_set_pipe(output, pipe); - commit. Since legacy setcrtc and atomic commit differ, there are some differences in how we commit pipes and connectors too. For atomic we set output->crtc during igt_output_set_pipe, and use it in atomic commit. This may be set to NULL, in which case the output is disconnected from the crtc. Unlike legacy we won't attempt to bind all connectors to all pipes, only the ones that were explicitly set. As a test, convert kms_rmfb.c Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
2016-06-29lib/igt_kms: Add for_each_pipe_with_valid_output and ↵Maarten Lankhorst
for_each_valid_output_on_pipe. There are a lot of places where we do either for_each_pipe { igt_subtest_f(... "-pipe-C", pipe_name()) for_each_connected_output() /* Run subtest */ } or: igt_subtest_f(...) { for_each_pipe() for_each_connected_output() /* Run subtest */ } The former should be replaced with for_each_valid_output_on_pipe, the latter with for_each_pipe_with_valid_output. Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
2016-06-28lib/intel_chipset: Removing PCI IDs that are no longer listed as Kabylake.Rodrigo Vivi
This is unusual. Usually IDs listed on early stages of platform definition are kept there as reserved for later use. However these IDs here are not listed anymore in any of steppings and devices IDs tables for Kabylake on configurations overview section of BSpec. So it is better removing them before they become used in any other future platform. It reflects kernel: commit a922eb8d4581c883c37ce6e12dca9ff2cb1ea723 Author: Rodrigo Vivi <rodrigo.vivi@intel.com> Date: Thu Jun 23 14:50:36 2016 -0700 drm/i915: Removing PCI IDs that are no longer listed as Kabylake. v2: Rebase. Reviewed-by: Dhinakaran Pandiyan <dhinakaran.pandiyan@intel.com> Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
2016-06-28lib/intel_chipset: Add more Kabylake PCI IDs.Rodrigo Vivi
The spec has been updated adding new PCI IDs. In parity with kernel: commit 33d9391d3020e069dca98fa87a604c037beb2b9e Author: Rodrigo Vivi <rodrigo.vivi@intel.com> Date: Thu Jun 23 14:50:35 2016 -0700 drm/i915: Add more Kabylake PCI IDs. v2: Avoid using "H" instead of HALO to keep names uniform - DK. Reviewed-by: Dhinakaran Pandiyan <dhinakaran.pandiyan@intel.com> Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
2016-06-28lib: Fix reporting of debugfs mountpointChris Wilson
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2016-06-28lib: Suppress kmsg on exit for unknown programmesChris Wilson
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2016-06-28lib: Avoid running gem_quiescent_gpu() on non-Intel hardwareRobert Foss
When opening the device, we first ensure the device is idle. However, performing GEM operations on !i915 is bad behaviour, so don't. Signed-off-by: Robert Foss <robert.foss@collabora.com>
2016-06-23igt: Add basic framework for GVT-g testingChris Wilson
We don't do anything yet other than try to load the module. Initial sanity checks to come. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Cc: Zhi Wang <zhi.a.wang@intel.com>
2016-06-23Silence compiler warnings for expected and handled error conditionsChris Wilson
Silly compiler emitting warnings that just cause people to break code attempting to silence the compiler. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2016-06-21lib: Suppress error messages from failure to load driver modulesChris Wilson
Pass -s switch to modprobe so that we don't litter stderr with the error message for a missing module - the load failure is sufficient. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2016-06-20lib/debugfs: Fix probe path for opening i915 debugfs dirChris Wilson
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2016-06-20igt/vgem_basic: Exercise opening sysfs/debugfsChris Wilson
For fun, debugfs/.../names currently explodes, so lets capture that and make sure that basic access to debugfs does no harm. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2016-06-18igt: Add basic exercise of vGEMChris Wilson
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2016-06-18lib: Support opening vGEM deviceChris Wilson
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2016-06-17tests: Push igt_fork/stop_hang_detector into fixturesDaniel Vetter
It access hardware, hence why the simple igt_only_list_subtests() check from igt_fork/stop_signal_helper() isn't enough. Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
2016-06-09lib/gt: Omit illegal instruction on hang injection with gen 8+Mika Kuoppala
0xffffffff as an illegal command confuses the command execution on gen9 so that the next BB start will get ignored, causing a runaway head past the bb end. This delays the hang detection substantially as hangcheck then observes only a non progressing seqno. Omit the bad instruction on gen8+ and rely on the chained batch loop to cause a deterministic hang. Make the chained bb start to jump straight into bb start, omitting the MI_NOOP or the bad instruction on subsequent passes. This makes the acthd sampling to hit more reliably to the same value, as the loop is smaller, making the head appear to be 'more stuck'. References: https://bugs.freedesktop.org/show_bug.cgi?id=92715 Cc: Chris Wilson <chris@chris-wilson.co.uk> Signed-off-by: Mika Kuoppala <mika.kuoppala@intel.com> Reviewed-by: Chris Wilson <chris at chris-wilson.co.uk>
2016-06-07igt/gem_stolen: Check for available stolen memory sizeAnkitprasad Sharma
Check for available stolen memory size before attempting to run the stolen memory tests. This way we make sure that we do not create objects from stolen memory without knowing the available size. This checks if the kernel supports creation of stolen backed objects before doing any operation on stolen backed objects. Also correcting the CREATE_VERSION ioctl number in getparam ioctl, due to kernel changes added in between. v2: Removed size argument for checking stolen memory availability (Tvrtko) Signed-off-by: Ankitprasad Sharma <ankitprasad.r.sharma@intel.com> Reviewed-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
2016-06-03Introduced by 0e11befe442. openat(2) is used in igt_sysfs_set() w/ aMarius Vlad
relative path. Fix by passing the correct dirfd. Signed-off-by: Marius Vlad <marius.c.vlad@intel.com> CC: Chris Wilson <chris@chris-wilson.co.uk> Reviewed-By: Chris Wilson <chris@chris-wilson.co.uk>
2016-05-31lib: Override the connector status using the sysfs status attributeChris Wilson
There are two paths to force enable a connector, via debugfs and via sysfs. sysfs has the advantage of being a stable interface and of updating the connector after application (allowing us to not force a reprobe from userspace). v2: Don't assume Intel only Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>
2016-05-31lib: Add simple sysfs accessorsChris Wilson
igt_sysfs_set() for setting an attribute via sysfs, igt_sysfs_get() for reading. v2: Lots of little bugs in igt_sysfs_get() v3: Pass device to open, stop assuming Intel rules. v4: Test opening and reading! Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2016-05-31lib: Actually use provided size when creating BOTomeu Vizoso
When reworking igt_create_fb_with_bo_size to use igt_create_bo_with_dimensions, we mistakenly stopped acknowledging non-zero size parameters. To fix this, we move the core of the code to create_bo_for_fb and teach it to use the GEM APIs when a size is passed. igt_create_bo_with_dimensions ends up calling just create_bo_for_fb with a zero size because now the later is more generic than the former. Also, create_bo_for_fb now returns the handle of the BO that was created, as there's no point anymore in having it be a parameter passed by reference. Signed-off-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
2016-05-27igt_core: Search "." as final fallback for igt_fopen_data()Matt Roper
Some validation teams seem to run tests out of source directories that have been nfs mounted or rsync'd to different locations on the target machine. This causes the igt_srcdir that the tests were built with to be invalid on the machine the tests get run on. Add the current directory as a final fallback for data file searches. Reference: https://bugs.freedesktop.org/show_bug.cgi?id=92248 Cc: Humberto Israel Perez Rodriguez <humberto.i.perez.rodriguez@intel.com> Signed-off-by: Matt Roper <matthew.d.roper@intel.com> Signed-off-by: Marius Vlad <marius.c.vlad@intel.com>
2016-05-23lib/crc: Update doc for igt_pipe_crc_get_crcsDaniel Vetter
Noticed while discussing CRC tests with Ville that this was totally wrong. v2: Ville pointed out that it only does not block when opened using igt_pipe_crc_new_nonblocking. Still different from igt_pipe_crc_collect_crc, which will always block. v3: Fix type (Ville). Cc: Ville Syrjälä <ville.syrjala@linux.intel.com> Acked-by: Ville Syrjälä <ville.syrjala@linux.intel.com> Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
2016-05-20lib/gt: Replace hanging instructionChris Wilson
First try an illegal instruction before the infinite loop to try and trigger a gpu hang more gracefully as the infinite loop is causing some older machines issues as the GPU hogs the entire systems and makes the machine laggy, unresponsive for long periods. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2016-05-17lib/igt_kms: move gtk-doc comments next to the definitionJani Nikula
Now that we have actual functions for kms_test_*_str since commit 2d432fc5773df17f04283f4780dab161dd2e1c85 Author: Jani Nikula <jani.nikula@intel.com> Date: Wed May 11 12:42:06 2016 +0300 lib/igt_aux: define actual functions for kmstest_*_str move also the gtk-doc comments next to the definitions, for consistency. Acked-by: Daniel Vetter <daniel@ffwll.ch> Signed-off-by: Jani Nikula <jani.nikula@intel.com>
2016-05-12lib/igt_aux: Polish docs for igt_timeoutDaniel Vetter
Add docs, rename parameter and rename the macro to igt_do_timeout to make it clear it works like a loop. v2: Rename instead to igt_until_timeout (Chris). Acked-by: Chris Wilson <chris@chris-wilson.co.uk> Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
2016-05-12lib/igt_aux: Polish docs for igt_interruptibleDaniel Vetter
- 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-11lib/igt_aux: define actual functions for kmstest_*_strJani Nikula
Macro generated function definitions considered harmful. You can't find them with code search tools or grep. There may be places where such things might be useful, but this is not it. Define actual functions for kmstest_encoder_type_str(), kmstest_connector_status_str() and kmstest_connector_type_str(). While at it, make the arrays static const. Signed-off-by: Jani Nikula <jani.nikula@intel.com> Signed-off-by: Marius Vlad <marius.c.vlad@intel.com>
2016-05-11lib/igt_aux: update encoder and type namesJani Nikula
Virtual, DSI, DP MST. Signed-off-by: Jani Nikula <jani.nikula@intel.com> Signed-off-by: Marius Vlad <marius.c.vlad@intel.com>
2016-05-04lib/igt_kms: Add fail exit branch in do_display_commit()Feceoru, Gabriel
On Cherryview PIPE_C can only be connected to PORT_D (bspec). The driver properly reports the crtc_mask for the encoder, however the mismatch between pipe and port is not reported back to the test. Add support for detecting this case so the test can be skipped. v2: Apply review comments (Marius) Signed-off-by: Gabriel Feceoru <gabriel.feceoru@intel.com> Signed-off-by: Marius Vlad <marius.c.vlad@intel.com>
2016-05-03lib: compute exitcode firstChris Wilson
Before we print the exitcode to the debug/kmsg logs, we should inspect what its final value will be. For example, in the case of running multiple subtests which all happen to be skipped, igt_exitcode is 0, but the final exit code will be 77. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Cc: Tvrtko Ursulin <tvrtko.ursulin@intel.com> Tested-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>