summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2017-12-05meson: build a full dependency for lib_igt_perfDaniel Vetter
meson prefers packages dependencies over passing arount static libraries, because those also include linker flags, include dirs and everything else. While at it pull the special cases out from the common build stanzas like we do with other special cases. Just a bit of ocd to keep everything polished. v2: Don't forget to add perf_pmu to the test list (Petri). Cc: Tvrtko Ursulin <tvrtko.ursulin@intel.com> Reviewed-by: Petri Latvala <petri.latvala@intel.com> Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
2017-12-05meson: gtkdoc supportDaniel Vetter
Bunch of neat improvements: - xml generates correctly depend upon the test binaries - no need to re-run autogen.sh when new chapters/functions get added, all handed by meson Still one issue: - the gtkdoc target doesn't depend upon the custom_target yet, hacked around using build_by_default: true This is an issue known to upstream already: https://github.com/mesonbuild/meson/issues/2148 v2: Bump meson version to 0.42, since that's the first release which adds the build dir when running the gtkdoc tools, and hence allows including generated files. v2: - Undo the bump, it's only needed for generated source files. Other generated files as input should work with 0.40 already. - Generate version.xml from version.xml.in, which allows us to keep the &version; entity. v3: Add github issue link. v4: - Resurrect lost KEYWORDS (Petri) - Fix issue when running with a clean build, files() doesn't work on generate files (Petri). Reviewed-by: Petri Latvala <petri.latvala@intel.com> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2017-12-05lib: avoid < in gtkdoc commentsDaniel Vetter
For reasons entirely not clear to me meson gtkdoc runs in strict xml parsing mode, whereas automake gtkdoc doesn't. And gtkdoc itself is tooooooooo dense to correctly escape this stuff. Paper around this. v2: {foo} instead of of tripy &lt;foo> (Joonas) v3: More fixups (Joonas) Cc: Joonas Lahtinen <joonas.lahtinen@linux.intel.com> Reviewed-by: Petri Latvala <petri.latvala@intel.com> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2017-12-05igt/perf_pmu: Replace hard-coded sleep before rc6 with a probeChris Wilson
Instead of trying to sleep for 2 evaluations intervals and then assuming that rc6 is working, poll the rc6 residency instead. v2: dce References: https://bugs.freedesktop.org/show_bug.cgi?id=103929 Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Cc: Tvrtko Ursulin <tvrtko.ursulin@intel.com> Reviewed-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
2017-12-05igt/pm_rc6_residency: Replace hard-coded sleep before rc6 with a probeChris Wilson
Instead of trying to sleep for 2 evaluations intervals and then assuming that rc6 is working, poll the rc6 residency instead. References: https://bugs.freedesktop.org/show_bug.cgi?id=104099 Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Cc: Tvrtko Ursulin <tvrtko.ursulin@intel.com> Reviewed-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
2017-12-05tests/gem_seqno_wrap: Drop gem_seqno_wrap.cAbdiel Janulgue
gem_seqno_wrap is defunct as the debug API withered away. The handling of wraparound under many different workloads is tested by gem_exec_whisper (Chris). Signed-off-by: Abdiel Janulgue <abdiel.janulgue@linux.intel.com> Reviewed-by: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
2017-12-05tests/gem_pin: Drop gem_pin.cAbdiel Janulgue
gem_pin ABI is going away (Chris). Signed-off-by: Abdiel Janulgue <abdiel.janulgue@linux.intel.com> Reviewed-by: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
2017-12-05tests/gem_hangcheck_forcewake: Drop gem_hangcheck_forcewake.cAbdiel Janulgue
gem_hangcheck_forcewake has been superseded by drv_hangman, and a lot of other very extensive hangchecking that is not run by CI (Chris). Signed-off-by: Abdiel Janulgue <abdiel.janulgue@linux.intel.com> Reviewed-by: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
2017-12-04igt/pm_rc6_residency: Measure residency after checking for applicabilityChris Wilson
CI doesn't run in whole-test mode, but runs each subtest individually. Tests that are designed to do a block of work to be shared between many subtests end up running that work multiple times (once per subtest) and worse, that work is wasted if the subtest will be skipped. pm_rc6_residency is one such example that measured all the residencies up front before skipping, each skip was therefore taking in excess of 10s. v2: Put a small delay back before starting measurements as rc6 doesn't start until an evaluation interval after idling. v3: Drop rc6p+ tests; we have no control over the hw whether it decides to use rc6 or deeper (we can enable it, but not dictate it). Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Reviewed-by: Ewelina Musial <ewelina.musial@intel.com> #v1
2017-12-04igt/perf_pmu: Tighten semaphore-wait measurementChris Wilson
Record the before/after semaphore-wait values around the sleep to try to reduce the inaccuracy from scheduler delays. Previously, the samples were taken before submitting the batch and then after synchronising its completion. The measurement will then be the total that the semaphore was being sampled, but with the extra syscalls intervening may have drifted from the sleep duration. To further reduce the disparity, wait for the batch to start executing before taking our samples. References: https://bugs.freedesktop.org/show_bug.cgi?id=104013 Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Cc: Tvrtko Ursulin <tvrtko.ursulin@intel.com> Reviewed-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
2017-12-04igt: Make dependency on libunwind mandatoryArkadiusz Hiler
With Android support gone there is not much reason for keeping libunwind dependency optional. This also deals (cheaply!) with ifdefs covering huge portions of code, removing a placement minefield. Cc: Tvrtko Ursulin <tvrtko.ursulin@linux.intel.com> Cc: Chris Wilson <chris@chris-wilson.co.uk> Signed-off-by: Arkadiusz Hiler <arkadiusz.hiler@intel.com> Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
2017-12-04igt/drv_selftests: Disable initialising the displayChris Wilson
Many of the selftests try to completely fill global resources; resources that are presumed available for bringing up the display. Avoid the contention by simply not bringing up the display! This does limit the effectiveness of selftesting to GEM for the time being. To exercise KMS from selftests we would essentially have to always mock the displays. References: https://bugs.freedesktop.org/show_bug.cgi?id=103718 Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Reviewed-by: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
2017-12-04igt/gem_busy: Replace arbitrary busy batch with indefinite spinbatchChris Wilson
In CI, we were observing situations where the busy blt would complete before the very next instruction (in userspace) to assert that it was busy. This is entirely possible if the process was scheduled away and slept for longer than the arbitrary batch. Instead replace arbitrariness with a precise infinity. v2: Be respectful to UP! v3: Move spinbatch to owning process to avoid serialisation delays. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=103829 Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Reviewed-by: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
2017-12-04tests/kms_ccs: Test case for wrong aux buffer stride sizeGabriel Krisman Bertazi
Two scenarios tested: - unaligned stride - Stride too small Since v4: - Fix SIGFPE if width <= 1024 (Arkadiusz Hiler/Ville Syrjälä) - Add test for pitches[1]=0 (Ville Syrjälä) Signed-off-by: Gabriel Krisman Bertazi <krisman@collabora.co.uk> Reviewed-by: Ben Widawsky <ben@bwidawsk.net>
2017-12-04tests/kms_ccs: Test case where CCS is on a different BOGabriel Krisman Bertazi
Signed-off-by: Gabriel Krisman Bertazi <krisman@collabora.co.uk> Reviewed-by: Arkadiusz Hiler <arkadiusz.hiler@intel.com>
2017-12-04tests/kms_ccs: Test case where the CCS buffer was not providedGabriel Krisman Bertazi
Signed-off-by: Gabriel Krisman Bertazi <krisman@collabora.co.uk> Reviewed-by: Arkadiusz Hiler <arkadiusz.hiler@intel.com>
2017-12-04tests/kms_ccs: Prevent segfault if pipe is not supportedGabriel Krisman Bertazi
for_each_plane_on_pipe() indexes bad memory when iterating over an invalid pipe. Make sure the pipe exists before trying to use it. This prevents the crash below: root@ideacentre:~# igt-gpu-tools/tests/kms_ccs --r pipe-D-crc-sprite-planes-basic IGT-Version: 1.19-g59f0e3d182a8 (x86_64) (Linux: 4.13.0-rc6.intel-boxes+x86_64) Received signal SIGSEGV. Stack trace: #0 [fatal_sig_handler+0x185] #1 [killpg+0x40] #2 [__real_main485+0x2de] #3 [main+0x3f] #4 [__libc_start_main+0xf1] #5 [_start+0x2a] #6 [<unknown>+0x2a] Subtest pipe-D-crc-sprite-planes-basic: CRASH (0.004s) Signed-off-by: Gabriel Krisman Bertazi <krisman@collabora.co.uk> Reviewed-by: Arkadiusz Hiler <arkadiusz.hiler@intel.com> Reviewed-by: Ben Widawsky <ben@bwidawsk.net>
2017-12-04lib/igt_kms: Fix off-by-one bug on skip of missing pipeGabriel Krisman Bertazi
display->n_pipes is zero-indexed, so N returned in igt_display_get_n_pipes is already not a valid pipe. This patch prevents kms_ccs from going nuts when testing the first unexisting pipe. Signed-off-by: Gabriel Krisman Bertazi <krisman@collabora.co.uk> Reviewed-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com> Reviewed-by: Arkadiusz Hiler <arkadiusz.hiler@intel.com> Reviewed-by: Ben Widawsky <ben@bwidawsk.net>
2017-12-04tests/kms_ccs: Test pipes other than pipe AGabriel Krisman Bertazi
Commit d41c4ccbd2f9 ("tests/kms_ccs: Fix subtest enumeration") accidently removed the update of data.pipe, causing kms_ccs to silently only test PIPE_A. This fixes the behavior reported by Daniel Vetter where tests would succeed even on nonexistent pipes. Signed-off-by: Gabriel Krisman Bertazi <krisman@collabora.co.uk> Reviewed-by: Arkadiusz Hiler <arkadiusz.hiler@intel.com> Reviewed-by: Ben Widawsky <ben@bwidawsk.net>
2017-12-01igt/gem_eio: Increase wakeup delay for in-flight-suspendChris Wilson
For in-flight-suspend, we need to wait for the GPU hang within i915_gem_suspend(). This will take 10-20s, which means that the standard wakeup delay of around 15s may occur before we complete the suspend. This causes a pm_system_wakeup(), causing dpm_suspend() to return -EBUSY. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Reviewed-by: Mika Kuoppala <mika.kuoppala@linux.intel.com>
2017-11-30igt/gem_eio: Test we can suspend when the driver is already wedgedChris Wilson
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Cc: Mika Kuoppala <mika.kuoppala@linux.intel.com> Cc: Joonas Lahtinen <joonas.lahtinen@linux.intel.com> Reviewed-by: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
2017-11-30kms_plane: Enumerate outputs before planes in panning subtestsImre Deak
Enumerating outputs before planes allows us to calculate the reference CRC only once for each subtest instead of calculating it for each plane tested. This removes an extra modeset during the test of each plane, speeding up things, especially on internal panels with long power cycle delays. In addition when testing multiple outputs we'll now test all planes for a given output in one go, so we can avoid the full modeset we currently have when switching from one output to another when testing a given plane. Signed-off-by: Imre Deak <imre.deak@intel.com> Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2017-11-30kms_plane: Enumerate outputs before planes in position subtestsImre Deak
Enumerating outputs before planes allows us to calculate the reference CRC only once for each subtest instead of calculating it for each plane tested. This removes an extra modeset during the test of each plane, speeding up things, especially on internal panels with long power cycle delays. In addition when testing multiple outputs we'll now test all planes for a given output in one go, so we can avoid the full modeset we currently have when switching from one output to another when testing a given plane. While at it remove the redundant igt_skip_on() for non-existant pipes and planes, we check for these already earlier. Signed-off-by: Imre Deak <imre.deak@intel.com> Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2017-11-30igt/perf_pmu: Increase delay for rc6 to startChris Wilson
I was thinking of the RC6 threshold parameter, but needed to consider the RC6 evaluation interval instead. RC6 doesn't enable until activity is below the threshold inside an evaluation interval, therefore we need to wait at least 2 EI after idling before we can expect RC6 to be enabled. Fixes: 55a17bc2d040 ("igt/perf_pmu: Reduce arbitrary delays before rc6") Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Cc: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
2017-11-29tools/intel_watermark: Right justify register namesVille Syrjälä
I think the dump is a more legible when the register names are right justified. That way the register name and its value are right next to each other. Cc: Dhinakaran Pandiyan <dhinakaran.pandiyan@intel.com> Cc: Tvrtko Ursulin <tvrtko.ursulin@linux.intel.com> Reviewed-by: Dhinakaran Pandiyan <dhinakaran.pandiyan@intel.com> Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
2017-11-29tools/intel_watermark: Clean up formattingVille Syrjälä
Align the comlums properly, and replace some of the whitespace in the printf()s with properly sized fields. Cc: Dhinakaran Pandiyan <dhinakaran.pandiyan@intel.com> Cc: Tvrtko Ursulin <tvrtko.ursulin@linux.intel.com> Reviewed-by: Dhinakaran Pandiyan <dhinakaran.pandiyan@intel.com> Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
2017-11-29tools/intel_watermark: Clean up SKL plane namesVille Syrjälä
Only print the plane name for planes that actually exist. Also Also include the pipe in the plane name. Cc: Dhinakaran Pandiyan <dhinakaran.pandiyan@intel.com> Cc: Tvrtko Ursulin <tvrtko.ursulin@linux.intel.com> Reviewed-by: Dhinakaran Pandiyan <dhinakaran.pandiyan@intel.com> Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
2017-11-29tools/intel_watermark: Refactor reg name stuffVille Syrjälä
Pull the code to generate the SKL register names into small helper to declutter the main code. Cc: Dhinakaran Pandiyan <dhinakaran.pandiyan@intel.com> Cc: Tvrtko Ursulin <tvrtko.ursulin@linux.intel.com> Reviewed-by: Dhinakaran Pandiyan <dhinakaran.pandiyan@intel.com> Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
2017-11-29tools/intel_watermark: Silence gcc7 snprintf() warningsVille Syrjälä
Bump the snprintf() buffer size to 32 bytes to silence gcc. intel_watermark.c:203:57: warning: ‘%c’ directive output may be truncated writing 1 byte into a region of size between 0 and 9 [-Wformat-truncation=] snprintf(reg_name, sizeof(reg_name), "PLANE_WM_%1d_%c_%1d", ^~ intel_watermark.c:203:43: note: directive argument in the range [0, 8] snprintf(reg_name, sizeof(reg_name), "PLANE_WM_%1d_%c_%1d", ^~~~~~~~~~~~~~~~~~~~~ etc. Cc: Dhinakaran Pandiyan <dhinakaran.pandiyan@intel.com> Cc: Tvrtko Ursulin <tvrtko.ursulin@linux.intel.com> Reported-by: Tvrtko Ursulin <tvrtko.ursulin@linux.intel.com> Reviewed-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com> Tested-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com> Reviewed-by: Dhinakaran Pandiyan <dhinakaran.pandiyan@intel.com> Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
2017-11-29Revert "lib/igt_aux: Make procps optional"Arkadiusz Hiler
This reverts commit d7d3f4e87b827152f00bdf89a67871736672b492 and gets rid of the config option from the meson.build. It was needed only for the Android support. Signed-off-by: Arkadiusz Hiler <arkadiusz.hiler@intel.com> Acked-by: Daniel Vetter <daniel.vetter@ffwll.ch> Acked-by: Petri Latvala <petri.latvala@intel.com>
2017-11-29igt: Remove Android supportArkadiusz Hiler
This patch gets rid of the Android support, deleting all the hacks and moving code around to the places it belongs. Android build is not really maintained properly and rots rather fast. With recent push for Meson here and Android going for Soong it will only accelerate. It's a good time to drop the illusion of providing any support. Cc: Daniel Vetter <daniel.vetter@intel.com> Cc: Kalyan Kondapally <kalyan.kondapally@intel.com> Cc: Petri Latvala <petri.latvala@intel.com> Cc: Radoslaw Szwichtenberg <radoslaw.szwichtenberg@intel.com> Signed-off-by: Arkadiusz Hiler <arkadiusz.hiler@intel.com> Reviewed-by: Juha-Pekka Heikkila <juhapekka.heikkila@gmail.com> Acked-by: Petri Latvala <petri.latvala@intel.com>
2017-11-28tests/perf_pmu: Sync invalid-init with i915 changesTvrtko Ursulin
i915 started returning -EINVAL for incorrect CPU. Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com> Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
2017-11-28igt: Remove gem_ctx_basicChris Wilson
This is just a very plain stress test that doesn't do any verification, and is entirely duplicated by the other context tests. The test currently leaks objects from every thread on every pass (which is triggering an oom on smaller machines), while fixing it would be trivial, it also is pointless as the test is of little merit. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Reviewed-by: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
2017-11-27igt/perf_pmu: Keep batch_duration_ns as the minimum measurement durationChris Wilson
We have chosen batch_duration_ns to be the minimum duration we need to meet our accuracy requirements for legacy ringbuffer PMU sampling. As such, we need to be careful to use multiples of it during tests, and not split it into different phases within a test, like multi_client does. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Cc: Tvrtko Ursulin <tvrtko.ursulin@intel.com> Reviewed-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
2017-11-24intel/pmu: Catch-up with i915 RC6 aggregation changesTvrtko Ursulin
Since i915 PMU is removing separate RC6 counters and now aggregates all under a single one, catch up the test and intel-gpu-overlay with those changes. Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com> Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2017-11-24lib/igt_core: Move write_stderr out of LIBUNWIND ifdefArkadiusz Hiler
write_stderr() and __write_stderr() are defined behind ifdef on HAVE_LIBUNWIND, but do no depend on the lib in any way. fatal_sig_handler() uses those helpers unconditionally. This patch just moves the code couple of lines up, so the helpers are always available and do not break build on systems without libunwind. Cc: Tvrtko Ursulin <tvrtko.ursulin@linux.intel.com> Signed-off-by: Arkadiusz Hiler <arkadiusz.hiler@intel.com> Reviewed-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
2017-11-24igt/perf_pmu: Recalibrate interrupt loop.Chris Wilson
We have to be careful in our calibration loop, too slow and we timeout, too fast and we don't emit an interrupt! On fast legacy devices, we would overflow the calibration calcuation... v2: Give the time constants a name. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Cc: Tvrtko Ursulin <tvrtko.ursulin@intel.com> Reviewed-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
2017-11-24igt/perf_pmu: Stop peeking at intel_mmio registersChris Wilson
Program the MI_WAIT_FOR_EVENT without reference to DERRMR by knowing its state is ~0u when not in use, and is only in use when userspace requires it. By not touching intel_regsiter_access we completely eliminate the risk that we leak the forcewake ref, which can cause later rc6 to fail. At the same time, note that vlv/chv use a different mechanism (read none) for coupling between the render engine and display. v2: Note that we assume DERRMR should be ~0u when not in use. For futureproofing one might like to do SRM/LRM (but I believe that if the HW changes that much, we are likely to need a bigger boat). Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Reviewed-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
2017-11-23igt/perf_pmu: Reduce arbitrary delays before rc6Chris Wilson
gem_quiescent_gpu() is supposed to ensure that the HW is idle, and in the process kick the GPU into rc6, so we should not need a long delay afterwards to ensure that we are indeed in rc6. We do however need a small delay in order to be sure that rc6 cycle counter has started and stopped. v2: Apply to rc6p as well. v3: The longest rc6 timeout (before the HW kicks in and enables rc6 on an idle GPU) is 50ms, so make sure that at least that time has passed since we were busy. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Cc: Tvrtko Ursulin <tvrtko.ursulin@intel.com> Reviewed-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
2017-11-23tests/perf_pmu: Bump measuring duration for semaphores as wellTvrtko Ursulin
As Chris has discover 100ms is not long enough to cover the sampling error in general, fix the semaphore subtest as well to measure for 500ms. Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com> Cc: Chris Wilson <chris@chris-wilson.co.uk> Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
2017-11-23tests/perf_pmu: Make the invalid-init failure place more obviousTvrtko Ursulin
Put the values into the assert so we know which step failed. Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com> Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
2017-11-23igt/perf_pmu: Bump batch_duration for legacy sampling inaccuracyChris Wilson
Since the legacy ringbuffer uses a sampling technique, it is limited to an accuracy based on a 200Hz timer, or 5ms. We assert that measurements are within 5%, so with a 100ms duration that gives us no room for the systematic error in our sampling. Bump the duration to 500ms to give us plenty of safety margin (back of the paper estimate is that we need 300ms to provide the accuracy we request for legacy submission), if it then fails, it should not be due to the sampling! Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Cc: Tvrtko Ursulin <tvrtko.ursulin@intel.com> Reviewed-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
2017-11-23igt/perf_pmu: Avoid underflow in measured_sleep()Chris Wilson
Be careful not to underflow into a very large positive usec value and so sleep forever^W until boredom kicks in. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Cc: Tvrtko Ursulin <tvrtko.ursulin@intel.com> Reviewed-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
2017-11-23igt/perf_pmu: Protect macro argsChris Wilson
In particular we fix the evaluation of "(double)x" when x is a compound. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Cc: Tvrtko Ursulin <tvrtko.ursulin@intel.com> Reviewed-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
2017-11-23igt/perf_pmu: Explicitly reset min_freq before max_freqChris Wilson
The kernel doesn't like it when you set max_freq < min_freq and complains bitterly. So before setting max_freq = min_freq, first set min_freq to min_freq! Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Cc: Tvrtko Ursulin <tvrtko.ursulin@intel.com> Reviewed-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
2017-11-23igt/perf_pmu: Clear errno in between invalid atrr testsChris Wilson
Reset the errno after testing each invalid attr so that it is carried over on a false positive. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Cc: Chris Wilson <chris@chris-wilson.co.uk> Reviewed-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
2017-11-23igt/perf_pmu: Tidy skip message for unsupported kernelsChris Wilson
Use a more compact expression to detect when the kernel doesn't support perf. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Cc: Tvrtko Ursulin <tvrtko.ursulin@intel.com> Reviewed-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
2017-11-23igt/perf_pmu: Test for supported perf before starting test_interruptsChris Wilson
Check for the perf event prior to calibrating the nop batch, so that we don't spend 4.5s before skipping. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Cc: Tvrtko Ursulin <tvrtko.ursulin@intel.com> Reviewed-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
2017-11-22lib/core: Avoid unused result in backtrace printingTvrtko Ursulin
Add helpers for direct write to stderr to consolidate the code and avoid the unused result warning in build. v2: Use igt_ignore_warn since it is questionable whether igt_assert is safe in signal handlers. (Chris Wilson) Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com> Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
2017-11-22intel_gvtg_test: Handle system(3) return value.Tvrtko Ursulin
Avoid the build warning by checking the pkill either did not find any guests or managed to send a signal to all of them. v2: Inspect system(3) return value properly. (Petri Latvala) Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com> Reviewed-by: Petri Latvala <petri.latvala@intel.com>