summaryrefslogtreecommitdiff
path: root/lib
AgeCommit message (Collapse)Author
2017-10-02tests: Stop looking at plane private membersMaarten Lankhorst
Most of these tests have no reason to look at those members, so try other ways of getting the information. Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com> Reviewed-by: Mika Kahola <mika.kahola@intel.com>
2017-09-29lib: Fix igt_sysfs_set_u32 return valueTvrtko Ursulin
Printf family functions return a number of bytes, not tokens, printed so the existing check (== 1) was wrong. Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com> Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
2017-09-28lib: Capture the error state on an unexpected hangChris Wilson
Dump debugfs/i915_error_state to the debug channel if we detect an ERROR uevent. This poses a few problems, not least that it is the auxiliary process doing the dumping (so the output may be interleaved with the test, but considering a hang occurred it is likely the test is blocked) and the average error state is around 60k, which may prove unwieldy! On the other hand, it may prove invaluable in debugging those impossible to reproduce bugs. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Reviewed-by: Petri Latvala <petri.latvala@intel.com>
2017-09-25igt_core: Rework igt_system()Petri Latvala
Instead of redirecting output to pipes and forking, redirect after forking to avoid having to carefully unredirect before logging anything. igt@tools_test@sysfs_l3_parity had a racy condition where it prints the output of intel_l3_parity prepended by [cmd], but that ended up being printed again prepended by [cmd] because output was redirected, causing outputs to appear multiple times. This patch fixes that. CC: Abdiel Janulgue <abdiel.janulgue@linux.intel.com> Signed-off-by: Petri Latvala <petri.latvala@intel.com> Reviewed-by: Abdiel Janulgue <abdiel.janulgue@linux.intel.com>
2017-09-22lib/igt_fb: Add igt_cairo_image_surface_create_from_png()Ville Syrjälä
Raw usage of cairo_image_surface_create_from_png() doesn't work since it doesn't know about IGT_DATADIR and IGT_SRCDIR. Let's extract the helper from igt_paint_image() that uses igt_fopen_data() + cairo_image_surface_create_from_png_stream() and call it igt_cairo_image_surface_create_from_png(). Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com> Reviewed-by: Petri Latvala <petri.latvala@intel.com>
2017-09-21i915_pciids: Change a KBL pci id to GT2 from GT1.5Rodrigo Vivi
In sync with 41693fd52373 ("drm/i915/kbl: Change a KBL pci id to GT2 from GT1.5") "See Mesa commit 9c588ff" v2: s/DT/Mobile Cc: Anuj Phogat <anuj.phogat@gmail.com> Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com> Reviewed-by: Anuj Phogat <anuj.phogat@gmail.com>
2017-09-18meson: Fix IGT_GIT_SHA1 handlingVille Syrjälä
Tell meson about the dependency on version.h. Avoids the compiler falling over on account of IGT_GIT_SHA1 not being there. Reviewed-by: Jordan Justen <jordan.l.justen@intel.com> Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
2017-09-15meson: Install libigt.soJordan Justen
Signed-off-by: Jordan Justen <jordan.l.justen@intel.com> Acked-by: Petri Latvala <petri.latvala@intel.com> Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
2017-09-13lib/igt_kmod: Allow specifying libkmod config via environment variablesJoonas Lahtinen
Allow specifying the kernel module configuration via environment variables. This allows enumerating the subtests of the kselftest wrappers from sysroot directory. IGT_KMOD_CONFIG_PATHS="" \ IGT_KMOD_DIRNAME="/path/to/sysroot/lib/modules/X.Y.Z" \ tests/drm_mm --list-subtests Signed-off-by: Joonas Lahtinen <joonas.lahtinen@linux.intel.com> Cc: Chris Wilson <chris@chris-wilson.co.uk> Cc: Petri Latvala <petri.latvala@intel.com> Cc: Arkadiusz Hiler <arkadiusz.hiler@intel.com> Cc: Daniel Vetter <daniel.vetter@ffwll.ch> Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
2017-09-12tests: Add kms_atomic_interruptible test, v4.Maarten Lankhorst
This tests the various parts of atomic that I want to make interruptible. Running with --debug shows the stats from __igt_sigiter_continue, which can be used to make sure that we don't fall over. The default igt kms helpers use drmIoctl, which is not intercepted by igt_while_interruptible. Only igt_ioctl is. This means we have to call the ioctls manually here. Changes since v1: - Implement interruptible DPMS checking too. - Use igt_ioctl + igt_while_interruptible, instead of the signal helper shotgun. Changes since v2: - Bump whitespace to get rid of the weird double } at same indent. - Use more newlines in the call to the atomic ioctl. Changes since v3: - Fix copyright on year. (Adrinael) - Use do_ioctl instead of do_or_die(igt_ioctl) (ickle). - Add test description. (Adrinael) Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com> Cc: Daniel Stone <daniels@collabora.com> Acked-by: Daniel Vetter <daniel.vetter@ffwll.ch> #v1 Reviewed-by: Petri Latvala <petri.latvala@intel.com> [mlankhorst: Document sleep values (Adrinael)]
2017-09-08meson: igt_frame also needs pixmanDaniel Vetter
Oversight I noticed because I have the deps for chamelium on the other machine already. Acked-by: Jani Nikula <jani.nikula@intel.com> Acked-by: Arkadiusz Hiler <arkadiusz.hiler@intel.com> Acked-by: Petri Latvala <petri.latvala@intel.com> Acked-by: Daniel Stone <daniels@collabora.com> Acked-by: Radoslaw Szwichtenberg <radoslaw.szwichtenberg@intel.com> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2017-09-08meson: Use static libs to handle IGT_LOG_DOMAIN.Eric Anholt
It means that compiler errors in the .c files take you to the source place in your editor, not a preprocessed temporary. v2: Add the library deps, fails linking otherwise. Signed-off-by: Eric Anholt <eric@anholt.net> (v1) Acked-by: Jani Nikula <jani.nikula@intel.com> Acked-by: Arkadiusz Hiler <arkadiusz.hiler@intel.com> Acked-by: Petri Latvala <petri.latvala@intel.com> Acked-by: Daniel Stone <daniels@collabora.com> Acked-by: Radoslaw Szwichtenberg <radoslaw.szwichtenberg@intel.com> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2017-09-08lib/ioctl_wrappers: make the valgrind wrapper always emit a statement:wDaniel Vetter
gcc complains otherwise about empty ; statements ... Acked-by: Jani Nikula <jani.nikula@intel.com> Acked-by: Arkadiusz Hiler <arkadiusz.hiler@intel.com> Acked-by: Petri Latvala <petri.latvala@intel.com> Acked-by: Daniel Stone <daniels@collabora.com> Acked-by: Radoslaw Szwichtenberg <radoslaw.szwichtenberg@intel.com> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2017-09-08meson: basic build system supportDaniel Vetter
Why? Because it's fast. Like really, really fast. Some data (from a snb laptop, so rather lower-powered): - Incremental build after $ touch lib/igt_core.c with meson: 0.6s It notices that the symbol list of the libigt.so hasn't changed and doesn't bother re-linking the almost 300 binaries we have. make -j 6 for the same scenario takes 44s. - Incremental build with nothing changed: make: 0.7s, meson: 0.2s This means stuff like --disable-git-hash is entirely pointless with meson, it's faster than a make ever can be (with 0.6s). - Reconfigure stage: ninja reconfigure 0.8s vs. ./configure 8.6s) - Running tests, after a full build: ninja test 6s vs. make check 24s - Full build (i.e. including ./autogen.sh respectively meson build), including tests, from a pristine git checkout. automake 2m49s vs. meson 44s. Cc: Ville Syrjälä <ville.syrjala@linux.intel.com> Cc: Eric Anholt <eric@anholt.net> Cc: Daniel Stone <daniel@fooishbar.org> Acked-by: Jani Nikula <jani.nikula@intel.com> Acked-by: Arkadiusz Hiler <arkadiusz.hiler@intel.com> Acked-by: Petri Latvala <petri.latvala@intel.com> Acked-by: Daniel Stone <daniels@collabora.com> Acked-by: Radoslaw Szwichtenberg <radoslaw.szwichtenberg@intel.com> Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
2017-09-08lib/uwildmat: Use include pathsDaniel Vetter
meson runs gcc from where meson.build that includes those files is, which means we need to add the directory ourselves. For automake it doesn't matter, so let's just do it for simplicity. Acked-by: Jani Nikula <jani.nikula@intel.com> Acked-by: Arkadiusz Hiler <arkadiusz.hiler@intel.com> Acked-by: Petri Latvala <petri.latvala@intel.com> Acked-by: Daniel Stone <daniels@collabora.com> Acked-by: Radoslaw Szwichtenberg <radoslaw.szwichtenberg@intel.com> Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
2017-09-08lib: clean up header includesDaniel Vetter
Just a bit of OCD, I like it when connections within library modules are a bit more obvious. igt.h is ok for tests, but let's use individual include lines for libraries consistently. Also order standard includes before igt ones. v2: Rebase. Acked-by: Jani Nikula <jani.nikula@intel.com> Acked-by: Arkadiusz Hiler <arkadiusz.hiler@intel.com> Acked-by: Petri Latvala <petri.latvala@intel.com> Acked-by: Daniel Stone <daniels@collabora.com> Acked-by: Radoslaw Szwichtenberg <radoslaw.szwichtenberg@intel.com> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2017-09-08lib: prefix frame_dump_pathDaniel Vetter
Just a bit of ocd for anything non-static. Acked-by: Jani Nikula <jani.nikula@intel.com> Acked-by: Arkadiusz Hiler <arkadiusz.hiler@intel.com> Acked-by: Petri Latvala <petri.latvala@intel.com> Acked-by: Daniel Stone <daniels@collabora.com> Acked-by: Radoslaw Szwichtenberg <radoslaw.szwichtenberg@intel.com> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2017-09-08build: remove _GNU_SOURCE from source filesDaniel Vetter
We are, the build system takes care of that. Reviewed-by: Eric Anholt <eric@anholt.net> Acked-by: Jani Nikula <jani.nikula@intel.com> Acked-by: Arkadiusz Hiler <arkadiusz.hiler@intel.com> Acked-by: Petri Latvala <petri.latvala@intel.com> Acked-by: Daniel Stone <daniels@collabora.com> Acked-by: Radoslaw Szwichtenberg <radoslaw.szwichtenberg@intel.com> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2017-09-08build: use HAVE_LIBGEN_H consistentlyDaniel Vetter
Also, we are _GNU_SOURCE, so simplify the conditions accordingly. The next patch will remove _GNU_SOURCE everywhere else. Reviewed-by: Eric Anholt <eric@anholt.net> Acked-by: Jani Nikula <jani.nikula@intel.com> Acked-by: Arkadiusz Hiler <arkadiusz.hiler@intel.com> Acked-by: Petri Latvala <petri.latvala@intel.com> Acked-by: Daniel Stone <daniels@collabora.com> Acked-by: Radoslaw Szwichtenberg <radoslaw.szwichtenberg@intel.com> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2017-09-08build: Nuke #ifdef HAVE_CONFIG_H cargo-cultDaniel Vetter
We have it. Daniel Stone said the #ifdef HAVE_CONFIG_H comes from the X11 transition to the modular build, where in the imake -> modular build transition config.h wasn't universally available. Now we just make this a requirement (so yeah Android better generate one too). v2: Improve commit message a bit. Reviewed-by: Eric Anholt <eric@anholt.net> Acked-by: Jani Nikula <jani.nikula@intel.com> Acked-by: Arkadiusz Hiler <arkadiusz.hiler@intel.com> Acked-by: Petri Latvala <petri.latvala@intel.com> Acked-by: Daniel Stone <daniels@collabora.com> Acked-by: Radoslaw Szwichtenberg <radoslaw.szwichtenberg@intel.com> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2017-09-08build: Define _GNU_SOURCE in Makefile.amDaniel Vetter
In meson I want to just set this everywhere (no reason not to), and doing so will allow us to clean up a few things. But that means autofoo needs to follow suit. v2: Rebase. Reviewed-by: Eric Anholt <eric@anholt.net> Acked-by: Jani Nikula <jani.nikula@intel.com> Acked-by: Arkadiusz Hiler <arkadiusz.hiler@intel.com> Acked-by: Petri Latvala <petri.latvala@intel.com> Acked-by: Daniel Stone <daniels@collabora.com> Acked-by: Radoslaw Szwichtenberg <radoslaw.szwichtenberg@intel.com> Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
2017-09-08lib/kms: Skip rather than fail when a suitable plane can't be foundVille Syrjälä
If the system doesn't have the plane the test wants, let's skip the test rather than fail it. Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk> Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
2017-09-08lib/kms: Fix the connector name strings to match what the kernel usesVille Syrjälä
We depend on kmstest_connector_type_str() matching the kernel. Fix up the cases where we differ currently. Also add the missing DPI "connector" type. Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk> Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
2017-09-08lib/sysfs: Fix fbcon rebindVille Syrjälä
"echo 1 > vtconN/bind" doesn't actually do anything. Looks like the only way to rebind fbcon is to unbind the current console. I suppose the failure to rebind might be a kernel bug, but I can't be bothered to decode the vt.c spaghetti so let's just try to handle this in igt. For simplicity let's assume the currently bound console is the dummy console and unbind that when we want to rebind fbcon. That works for me. With rebinding not working we can't really tell wich console is going to get bound anyway, so there's no way to make this code really robust, assuming we ever had more than these two console drivers involved. Additionally Daniel Vetter pointed out: "We select the dummy con in i915, to be able to kick out vgacon before we register fbdev. So should always be there." Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk> Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
2017-09-07lib/dummyload: Use -1 for all enginesChris Wilson
Random change when it was copied broke the interface I am using, so bring it back into line with all the other stanzas to generate engine[]. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2017-09-07igt/gem_exec_schedule: Basic tests for preemptionChris Wilson
We queue N low priority hanging batches across the engines and check that our high priority write over takes them. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Reviewed-by: Michał Winiarski <michal.winiarski@intel.com>
2017-09-07igt/gem_exec_schedule: Exercise reordering with many priority levelsChris Wilson
Apply a little more stress to the scheduler. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Reviewed-by: Michał Winiarski <michal.winiarski@intel.com>
2017-09-06igt/pm_rpm: Use libc 'ftw' rather than opencoding our own filetree walkChris Wilson
By using ftw, we avoid the issue of having to handle directory recursion ourselves and can focus on the test of checking the reading a sysfs/debugfs does not break runtime suspend. In the process, disregard errors when opening the individual files as they may fail for other reasons. v2: Bracket the file open/close with the wait_for_suspended() tests. Whilst the fd is open, it may be keeping the device awake, e.g. i915_forcewake_user. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Tested-by: Jari Tahvanainen <jari.tahvanainen@intel.com>
2017-09-06lib: Avoid actually throttling from igt_require_gem()Chris Wilson
igt_require_gem() checks whether we can use the i915 fd for submitting requests by detecting a wedged driver. It was intended to be used just after opening DRIVER_INTEL for a gem test to provide an early skip if the device was unusable. However, it is also used at the start of library functions like igt_spin_batch_new() which may be called after the test has setup some state, and importantly submitted some batches. igt_require_gem() has the risk of then waiting on those batches, unless we tell it to use a clean fd. v2: Chase the /proc/self/fd/$fd link Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Cc: Michał Winiarski <michal.winiarski@intel.com> Reviewed-by: Michał Winiarski <michal.winiarski@intel.com>
2017-09-06lib: Disable MI_STORE_DATA_IMM for gen3 (i915g and i915gm)Chris Wilson
The early gen3 machines inherited the MI block and restrictions from gen2, and may only use physical addresses in conjunction with MI_STORE_DATA_IMM -- that makes it unusable for us from userspace, where we can only use virtual offsets. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
2017-09-05Use PATH_MAX to fix some sprintf-into-short-buffers warnings.Eric Anholt
Signed-off-by: Eric Anholt <eric@anholt.net> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2017-09-05igt_core: Skip sync when listing subtestsTvrtko Ursulin
No need to sync filesystems when only listing subtest. Extremely marginal benefit of avoid a short stall after make followed by listing subtests. v2: Move sync to common_init for consolidation and simplicity. (Chris Wilson) 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-08-30lib/igt_debugfs: Open DRM driver without master for hpd storm exitPaul Kocialkowski
When running the full chamelium test binary, it occurs that the hpd storm exit handler (that restores its initial value) will fail when trying to acquire DRM master. This happens even though the previously-held DRM file descriptor was closed already. Since there is no need to get DRM master for debugfs access purposes, open the DRM node without requesting master to fix the issue. Signed-off-by: Paul Kocialkowski <paul.kocialkowski@linux.intel.com> Reviewed-by: Lyude Paul <lyude@redhat.com>
2017-08-30lib/igt_aux: Allow sysfs open to fail when setting suspend/resume delayPaul Kocialkowski
This removes the igt_require condition on the sysfs open call used to write the suspend/resume delay so that it is allowed to fail. Intsead, the code that depends on it is put in a conditional block. This allows running test binaries as a non-privileged user for e.g. listing the available tests with the SuspendResumeDelay parameter set in igtrc configuration. Sysfs access would otherwise cause it to fail. Signed-off-by: Paul Kocialkowski <paul.kocialkowski@linux.intel.com> Reviewed-by: Arkadiusz Hiler <arkadiusz.hiler@intel.com>
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-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-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-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-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-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-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-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-08lib: Remove illegal instructions from hang injectionChris Wilson
The idea behind using an illegal instruction was to hang the GPU must faster than simply using the recursive batch. However, we stopped doing so on gen8+ as the CS parser was much laxer and allowed the illegal command through but still interpreted the packet length (jumping over the recursive batch buffer start that followed). Sandybridge doesn't just hang the GPU when it encounters an illegal command on the BLT engine, it hangs the machine. That goes above and beyond testing our hangcheck + reset, so remove the deadly instructions. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Reviewed-by: Mika Kuoppala <mika.kuoppala@intel.com> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2017-08-01lib/igt_debugfs: Prevent compiler warning on unchecked printf formatGabriel Krisman Bertazi
Commit 34a54192e1fb ("lib/igt_debugfs: Add extended helper to format crc to string") introduced the following compiler warning: igt_debugfs.c: In function ‘igt_crc_to_string_extended’: igt_debugfs.c:373:4: warning: format not a string literal, argument types not checked [-Wformat-nonliteral] i == (crc->n_words - 1) ? '\0' : delimiter); This patch addresses the warning while also preventing a possible bad memory access access if n_words is > 64. I have no clue why we care about the padding size (crc_size), but since this was added recently, I'd rather leave it alone. Signed-off-by: Gabriel Krisman Bertazi <krisman@collabora.co.uk> Reviewed-by: Arkadiusz Hiler <arkadiusz.hiler@intel.com>
2017-07-28lib/aux: Better debug output for rtcwakeDaniel Vetter
Printing the error code is kinda useful. Also tune down the blame shifting away from i915, this could very well be an i915 bug, not just a setup issue. Also move the notice to the require test, not the failure, and suggest to look into dmesg. v2: Dont print errno, igt_require/assert already do that in the failure case (Chris). Acked-by: tomi.p.sarvela@intel.com Acked-by: Chris Wilson <chris@chris-wilson.co.uk> Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
2017-07-25lib/igt_draw: add support for Y tilingPaulo Zanoni
Most of the patch is to change the tile/untile functions so they can work with Y-major tiling. v2: (Praveen) No skipping on BLT for Y-tile now as we have a fix for that. Reviewed-by: Praveen Paneri <praveen.paneri@intel.com> Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com> Signed-off-by: Praveen Paneri <praveen.paneri@intel.com>
2017-07-25lib/igt_fb: Add helper function for tile_to_modPraveen Paneri
igt_get_fb_tile_size function takes modifer as an argument This helper function will let users to convert tiling to modifier and use igt_get_fb_tile_size() v2: Improved code comment (Paulo) v3 (from Paulo): Simple rebase. Reviewed-by: Paulo Zanoni <paulo.r.zanoni@intel.com> Signed-off-by: Praveen Paneri <praveen.paneri@intel.com> Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
2017-07-25lib/igt_fb: Let others use igt_get_fb_tile_sizePraveen Paneri
This function can be used by igt_draw to get accurate tile dimensions for all tile formats. v2: Added comments to function igt_get_fb_tile_size (Daniel) v3: Fixed errors in comments and coding style (Paulo) Reviewed-by: Paulo Zanoni <paulo.r.zanoni@intel.com> Signed-off-by: Praveen Paneri <praveen.paneri@intel.com>