Age | Commit message (Collapse) | Author |
|
On most platforms ARGB8888 is only supported by the cursor plane,
which doesn't support tiled buffers. Hence the kernel is under no
obligation to accept the request to create a tiled ARGB888
framebuffer. Apparently we've been letting this slip through so
far, but that is about to change.
Fortunately the resulting fb was neer actually used (in fact the
kernel would have rejected the setplane/atomic ioctl with such
a framebuffer). All we're really interested here is the gem BO
which we feed to the kernel via the setcursor ioctl after changing
the tiling to linear. To avoid changing the test drastically we
can simply change the fb to XRGB8888, which combined with X-tiling
is supported on all platforms.
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
|
|
Replace custom execbuf ioctl wrapper with the ones in lib.
v2:
- Lib execbuf wrapper is not signal handling friendly. (Chris)
v3:
- EXECBUFFER2_WR != EXECBUFFER2. (Chris)
v4: Drop gem_exec_fence.c changes
Signed-off-by: Antonio Argenziano <antonio.argenziano@intel.com>
Cc: Daniele Ceraolo Spurio <daniele.ceraolospurio@intel.com>
Cc: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Petri Latvala <petri.latvala@intel.com>
Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
|
|
Sometimes a test wants to verify that an engine, or all of them, are
functional by executing a nop batch. Provide a common routine to submit
an empty batch then test whether the driver is wedged.
Reported-by: Antonio Argenziano <antonio.argenziano@intel.com>
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Antonio Argenziano <antonio.argenziano@intel.com>
Reviewed-by: Antonio Argenziano <antonio.argenziano@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>
|
|
Signed-off-by: Eric Anholt <eric@anholt.net>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
|
|
pm_rpm is one of the main offenders for long runtime in our full igt
run. And hey, there's a quick option already, so make it the default.
This means there's yet another way to enable stress tests, we really
need to standardize this somehow. Or shred the stress-tests we really
don't want/need anymore.
v2: Fixup the entire help text (David).
v3: Switch shortopt from 'q' to 'l', only used internal, so just for
clarity (Arkadiusz).
Cc: David Weinehall <david.weinehall@linux.intel.com>
Cc: Paulo Zanoni <paulo.r.zanoni@intel.com>
Cc: Arkadiusz Hiler <arkadiusz.hiler@intel.com>
Reviewed-by: Arkadiusz Hiler <arkadiusz.hiler@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
|
|
Rather than compute the temporary full path name, remember it via the dir
fd we already have.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
|
|
As we have libkmod available, it is faster and safer than calling
system().
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
|
|
This reverts commit 25fbae15262cf570e207e62f50e7c5233e06bc67, restoring
commit 301ad44cdf1b868b1ab89096721da91fa8541fdc
Author: Tomeu Vizoso <tomeu.vizoso@collabora.com>
Date: Thu Mar 2 10:37:11 2017 +0100
lib: Open debugfs files for the given DRM device
with fixes.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
|
|
This reverts commit 301ad44cdf1b868b1ab89096721da91fa8541fdc.
When a render-only device is opened and gem_quiescent_gpu is called, we
need to use the debugfs dir for the master device instead.
Signed-off-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
|
|
When opening a DRM debugfs file, locate the right path based on the
given DRM device FD.
This is needed so, in setups with more than one DRM device, any
operations on debugfs files affect the expected DRM device.
v2: - rebased and fixed new API additions
v3: - updated chamelium test, which was missed previously
- use the minor of the device for the debugfs path, not the major
- have a proper exit handler for calling igt_hpd_storm_reset with the
right device fd.
Signed-off-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
Reviewed-by: Robert Foss <robert.foss@collabora.com>
Acked-by: Chris Wilson <chris@chris-wilson.co.uk>
|
|
To have a more accurate idea about any suspend/resume issues we can
perform the s/r until various phases in the s/r sequence. This way we
can isolate the given problem as being a device driver, kernel core or
BIOS related issue. Actual subtests using these new s/r phases will be
added as follow-up.
While at it also add the freeze suspend target, it's something we also
would need to test.
Signed-off-by: Imre Deak <imre.deak@intel.com>
|
|
Don't just fail, skip gracefully if an external module is unavailable.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
|
|
The transition to PCI device state D3 is not instantaneous and only
started when runtime suspended. Allow the driver/hardware a little bit
of time to complete the transition before declaring a test failure.
References: https://bugs.freedesktop.org/show_bug.cgi?id=93123
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
|
|
All the tests I wrote always assumed that every connector supported
CRTC 0. This is not the case for BSW and possibly others, so fix the
tests before the CI reports more failures.
Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
|
|
Move it from pm_rpm.c to lib/igt_kms and remove the hardcoded version
from kms_frontbuffer_tracking. I'm also planning to add other callers.
Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
|
|
On machines that lack an LLC the pm-caching subtest will
terminate with sigbus and thus CRASH during the
I915_CACHING_CACHED iteration. To work around this we reset
the caching to I915_CACHING_NONE before doing memory access.
v2: Various improvements based on feedback from Chris Wilson
v3: Fix incorrect Signed-off-by: line
v4: Further improvements based on feedback from Chris Wilson
Signed-off-by: David Weinehall <david.weinehall@linux.intel.com>
Reviewed-by: Imre Deak <imre.deak@intel.com>
Signed-off-by: Marius Vlad <marius.c.vlad@intel.com>
|
|
Move power management related code to a separate library.
Initially this is done only for workarounds that apply to external
components. Modify the users of such workarounds accordingly.
This currently involves HD audio and SATA link power management.
For SATA link PM there's also code to save the previous settings,
to allow for resetting the values after we've finished testing.
Signed-off-by: David Weinehall <david.weinehall@intel.com>
Reviewed-by: Marius Vlad <marius.c.vlad@intel.com>
Signed-off-by: Marius Vlad <marius.c.vlad@intel.com>
|
|
BSW does not allow CRTC 0 to be used on every connector, so we need to
write code to actually find a suitable CRTC.
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=93124
Acked-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
|
|
Unused ever since we moved some code from pm_rpm.c to lib/. This is
currently defined inside igt_aux.c.
Acked-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
|
|
Several tests do one or more of the following:
* igt_create_fb() + igt_paint_test_pattern()
* igt_create_color_fb() + igt_paint_test_pattern()
* igt_create_fb() + igt_paint_image()
Extract them into new helpers: igt_create_pattern_fb(),
igt_create_color_pattern_fb(), igt_create_image_fb().
v2: Fix typos, and improve API docs (Thomas)
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
|
|
Speeds up testcases except for those where we want to exercise the
probing itself. The only exceptions left where we do a full probe are
- pm_rpm: We use it to make sure the kernel doesn't get things wrong
with power domains, so we really want to exercise the full probe
paths. And there the only place really is the specific validation
done with the data gathered by get_drm_info.
- kmstest_force_ functions: Newer kernels should be better at
re-probing state when the force sysfs fields change, but better safe
than sorry.
v2: I also consolidated the start_n_modes and start_connectors while
at it - move one of the fixup hunks to this patch that accidentally
got misplaced (Thomas).
Cc: Thomas Wood <thomas.wood@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
|
|
The kernel is free to allocate blob ids however it wants to. And also
to reallocate them whenever it sees fit. The only thing we are allowed
to compare is the length and the actual date.
Removing this bogus check makes drm-resources-equal on my snb.
Cc: Paulo Zanoni <paulo.r.zanoni@intel.com>
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=90546
Reviewed-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
|
|
v4: re-bind the gem objects each time before calling
disable_all_screens_and_wait().
v3: Use smaller sizes when allocating gem objects for caching tests.
v2: use mmap to gtt instead off cpu and various style-changes.
Signed-off-by: Marius Vlad <marius.c.vlad@intel.com>
Reviewed-by: Imre Deak <imre.deak@intel.com>
Signed-off-by: Imre Deak <imre.deak@intel.com>
|
|
Signed-off-by: Thomas Wood <thomas.wood@intel.com>
|
|
gem_mmap__{cpu,gtt,wc}() already has the assert built in, so replace
__gem_mmap__{cpu,gtt,wc}() + igt_assert() with it.
Mostly done with coccinelle, with some manual help:
@@
identifier I;
expression E1, E2, E3, E4, E5, E6;
@@
(
- I = __gem_mmap__gtt(E1, E2, E3, E4);
+ I = gem_mmap__gtt(E1, E2, E3, E4);
...
- igt_assert(I);
|
- I = __gem_mmap__cpu(E1, E2, E3, E4, E5);
+ I = gem_mmap__cpu(E1, E2, E3, E4, E5);
...
- igt_assert(I);
|
- I = __gem_mmap__wc(E1, E2, E3, E4, E5);
+ I = gem_mmap__wc(E1, E2, E3, E4, E5);
...
- igt_assert(I);
)
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Stochastically-reviwewed-by: Chris Wilson <chris@chris-wilson.co.uk>
|
|
Rename the current gem_mmap__{cpu,gtt,wc}() functions into
__gem_mmap__{cpu,gtt,wc}(), and add back wrappers with the original name
that assert that the pointer is valid. Most callers will expect a valid
pointer and shouldn't have to bother with failures.
To avoid changing anything (yet), sed 's/gem_mmap__/__gem_mmap__/g'
over the entire codebase.
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Stochastically-reviwewed-by: Chris Wilson <chris@chris-wilson.co.uk>
|
|
Do the following
ptr = gem_mmap__{cpu,gtt,wc}()
+igt_assert(ptr);
whenever the code doesn't handle the NULL ptr in any kind of
specific way.
Makes it easier to move the assert into gem_mmap__{cpu,gtt,wc}() itself.
Mostly done with coccinelle, with some manual cleanups:
@@
identifier I;
@@
<... when != igt_assert(I)
when != igt_require(I)
when != igt_require_f(I, ...)
when != I != NULL
when != I == NULL
(
I = gem_mmap__gtt(...);
+ igt_assert(I);
|
I = gem_mmap__cpu(...);
+ igt_assert(I);
|
I = gem_mmap__wc(...);
+ igt_assert(I);
)
...>
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Stochastically-reviwewed-by: Chris Wilson <chris@chris-wilson.co.uk>
|
|
Apply the new API to all call sites within the test suite using the following
semantic patch:
// Semantic patch for replacing drm_open_any* with arch-specific drm_open_driver* calls
@@
identifier i =~ "\bdrm_open_any\b";
@@
- i()
+ drm_open_driver(DRIVER_INTEL)
@@
identifier i =~ "\bdrm_open_any_master\b";
@@
- i()
+ drm_open_driver_master(DRIVER_INTEL)
@@
identifier i =~ "\bdrm_open_any_render\b";
@@
- i()
+ drm_open_driver_render(DRIVER_INTEL)
@@
identifier i =~ "\b__drm_open_any\b";
@@
- i()
+ __drm_open_driver(DRIVER_INTEL)
Signed-off-by: Micah Fedke <micah.fedke@collabora.co.uk>
Signed-off-by: Thomas Wood <thomas.wood@intel.com>
|
|
Add a header that includes all the headers for the library. This allows
reorganisation of the library without affecting programs using it and
also simplifies the headers that need to be included to use the library.
Signed-off-by: Thomas Wood <thomas.wood@intel.com>
|
|
These always need to pass for basic PM functionality.
Reviewed-by: Daniel Vetter <daniel@ffwll.ch>
Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
|
|
And drop the now unnecessary universal plane definitions. The 2.4.55
version is already quite old, so we should be fine.
Thanks to Thomas Wood for quickly spotting this.
Signed-off-by: Paulo Zanoni <paulo.r.zanoni@>
|
|
This was forgotten since we moved some code to igt_aux.c a long time
ago.
Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
|
|
v2: Try to open i915_pc8_status first to make the transition (or just
running on older kernels) better. (Paulo)
Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
|
|
It can be useful to have one of those to carry state between the handler
parsing the options and the rest of the test. Right now the only thing
we can do is to use global variables for that.
Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
|
|
Just a little helper for code that needs to wait for a certain
condition to happen. It has the nice advantage that it can survive the
signal helper.
Despite the callers added in this patch, there is another that will go
in a separate patch, and another in a new IGT test file that I plan to
push later.
v2: Check COND again before returning in case we hit the timeout.
Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
|
|
This converts the IGT API only, underneath legacy set_tiling is still used.
v2: One got away in kms_flip.
Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
|
|
The integer comparison macros give us better error output by including
the actual values that failed the comparison.
Signed-off-by: Matt Roper <matthew.d.roper@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
|
|
We fail to detect some VGA monitors using our I2C method, leading to
bug reports from QA. If you look at the dmesg of these cases, you'll
see the Kernel complaining about EDID reading mostly FFs and then
disabling bit-mangling. Since we don't want to reimplement everything
the Kernel does, let's just accept the fact that some VGA outputs
won't be properly detected.
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=84273
Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
|
|
Remove options from argv that have been handled by getopt to allow
additional non-option parameters to be processed in the test application.
This fixes issues when using options such as --debug with tests that accept
additional non-option parameters.
Signed-off-by: Thomas Wood <thomas.wood@intel.com>
|
|
Also move forcewake and stop_rings code from igt_debugfs to igt_gt
since it fits better. And move the hang injection fork helpers from
igt_aux to igt_gt, too.
Also push the intel_gen call into igt_hang_ring while at it.
Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
|
|
This triggers a device suspended WARN in the kernel in
gen6_ggtt_insert_entries() while calling the GEM pwrite ioctl.
The sequence is suggested by Daniel.
Signed-off-by: Imre Deak <imre.deak@intel.com>
Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>
|
|
Signed-off-by: Thomas Wood <thomas.wood@intel.com>
|
|
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
|
|
We were having a problem where the system-suspend test was passing,
but then the next test - gem-execbuf-stress - was failing because of
bugs caused by the suspend subtest. So add a single test that emulates
the same problem, and another test that just sets a mode after resume.
This way, we should be reproducing the problem even if you don't run
the tests in the order they are defined.
Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
|
|
If we don't enable audio runtime PM, the audio driver won't release
its reference, the refcount won't ever become zero, so we will never
actually runtime suspend. So move this code from pm_rpm.c to
igt_aux.c, so kms_flip - and any other IGT test case using RPM - can
benefit from it.
Previously, if you ran pm_rpm before running the other tests - or if
you just didn't have snd_hda_intel loaded - you wouldn't notice this
bug.
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=78893
Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
|
|
A few weeks ago we were hitting this assertion, and the _eq macro is
more useful when you're debugging.
Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
|
|
warning: ignoring return value of ‘write’, declared with attribute
warn_unused_result [-Wunused-result]
Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
|
|
With the current Kernel, it takes more than 10 minutes to run
modeset-stress-extra-wait on BYT with eDP, and we don't really want
IGT subtests that take more than 10 minutes to run: QA reports them as
bugs.
Since, as far as I remember, any of these RPM race condition bugs we
had could always be triggered with just 4-5 rounds of testing, let's
tune down the number of rounds we test:
Before:
rounds = (--quick option used) ? 10 : 50;
After:
rounds = (--quick option used) ? 10 : 40;
rounds = (wait_flags & WAIT_EXTRA) ? rounds / 2 : rounds;
This should make all subtests be way above the 10m limit.
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=84897
Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
|
|
Signed-off-by: Imre Deak <imre.deak@intel.com>
|