Age | Commit message (Collapse) | Author |
|
We want to create very large objects, larger than the 2G limit imposed
by using ints.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Arkadiusz Hiler <arkadiusz.hiler@intel.com>
Reviwed-by: Mika Kuoppala <mika.kuoppala@linux.intel.com>
|
|
Just stub out the features return value, and return an empty string.
Signed-off-by: Eric Anholt <eric@anholt.net>
Reviewed-by: Petri Latvala <petri.latvala@intel.com>
|
|
We have two style of ioctl wrappers. The principle interface does error
checking on behalf of the caller (to avoid having lots of repetitious
code in each test), and for the few cases where the error is important
for the test, we also expose a double underscore version. Fix up
__gem_create() to follow this pattern and report the negative error code
returned by the kernel.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
Reviewed-by: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
|
|
In commit ebd6eb69f57b ("Make igtrc configuration common, with
configurable suspend/resume delay") .igtrc handling was moved to
igt_core from igt_chamelium. That made everything in IGT depend on
GLIB by accident.
In short, igt_core.h declared a variable of type GKeyFile*, requiring
glib.h. Everything that tried to #include igt_core.h required glib.h
to be available, by use of GLIB_CFLAGS. This "worked" so far because
CAIRO_CFLAGS contained GLIB_CFLAGS.
As the variable is only used by other stuff in lib/, stuff it in its
own header file to leave igt_core.h without a dependency to glib.h.
Also add a couple of missing #ifdef HAVE_GLIBs around.
Reported-by: Felipe De Jesus Ruiz Garcia <felipe.de.jesus.ruiz.garcia@intel.com>
Signed-off-by: Petri Latvala <petri.latvala@intel.com>
Reviewed-by: Arkadiusz Hiler <arkadiusz.hiler@intel.com>
|
|
In between tests, some tests can do the following sequence:
(pipe C configured with FB)
igt_plane_set_fb(primary (pipe C), NULL);
/* Clear rotation property first */
igt_display_commit2(display, COMMIT_UNIVERSAL);
/* disable pipe */
igt_display_commit2(display, COMMIT_LEGACY);
This would result in PIPE_C not being properly disabled, which
will cause an error on the next mode. This can be seen when running
the full kms_rotation_crc testcase without --subtest, it will fail
on exhaust-fences because the bad-tiling subtest wasn't able to
disable pipe C correctly.
Testcase: kms_rotation_crc
Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
Reviewed-by: Mika Kahola <mika.kahola@intel.com>
|
|
igt_output_set_pipe with PIPE_ANY used to mean that we bind the output
to any pipe, but this is now a deprecated alias for PIPE_NONE, and
means the output will be unbound.
Because of this it's better to change output->pending_crtc_idx_mask to
an enum pipe, because only a single choice may be given for a pipe.
Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
Reviewed-by: Mika Kahola <mika.kahola@intel.com>
|
|
Signed-off-by: Petri Latvala <petri.latvala@intel.com>
Acked-by: Daniel Vetter <daniel.vetter@ffwll.ch>
|
|
Signed-off-by: Petri Latvala <petri.latvala@intel.com>
Acked-by: Daniel Vetter <daniel.vetter@ffwll.ch>
|
|
media_fill.c has been unused from around 2014 when its contents moved
to intel_batchbuffer.c.
Signed-off-by: Petri Latvala <petri.latvala@intel.com>
Acked-by: Daniel Vetter <daniel.vetter@ffwll.ch>
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
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)]
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
"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>
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
Signed-off-by: Eric Anholt <eric@anholt.net>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|