Age | Commit message (Collapse) | Author |
|
Inject of using a hanging batch and waiting for the driver to notice,
issue a hang/reset request directly via debugfs.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
|
|
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
|
|
Wrapping fdopen() proved dangerous, the underlying fd is not refcounted,
and we must close it in the library or else we easily leak and exhaust
all fd. Since we can't provide igt_debugfs_fopen(), move the burden onto
the caller for those that require a stream FILE*.
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>
|
|
If errno contains left overs from previous syscalls, we'll be failing
the assert in some successful conditions.
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>
|
|
The number of vblanks that pass whilst we read back the CRCs is depended
upon CPU scheduling -- we may take longer than expected and end up
reading more CRCs. Align the start of the loop to a vblank.
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=100132
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
|
|
If the pipe doesn't exist, don't bother submitting a hanging batch. Do a
basic check first before doing a crc read against a hanging batch.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
|
|
Use the proper iterator macros to prevent ever having an invalid config.
Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
|
|
The kernel has now a new debugfs ABI that can also allow capturing frame
CRCs for drivers other than i915.
Add alternative codepaths so the new ABI is used if the kernel is recent
enough, and fall back to the legacy ABI if not.
Signed-off-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
Reviewed-by: Robert Foss <robert.foss@collabora.com>
|
|
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>
|
|
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
|
|
suspend-read-crc-pipe will perform a suspend and then skip the test in case the
pipe is not present or is fused w/ another pipe. Skip the test before doing
the suspend.
v2: Somehow the subject was trimmed.
Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Signed-off-by: Marius Vlad <marius.c.vlad@intel.com>
|
|
We can inject a real GPU hang for greater effect!
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
|
|
Use igt_assert_eq() to compare the frame numbers during the frame
sequence tests so that we'll see exactly what the bad frame counts
are when the test fails.
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
|
|
v2: Rebased due to __attribute__((warn_unused_result))
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
|
|
Add support for reading the CRC in non-blocking mode. Useful for tests
that want to start the CRC capture, then do a bunch of operations, then
collect however many CRCs that got generated. The current
igt_pipe_crc_new() + igt_pipe_crc_get_crcs() method would block until
it gets the requested number of CRCs, whreas in non-blocking mode we
can just read as many as got generated thus far.
v2: __attribute__((warn_unused_result)), document the
new igt_pipe_crc_get_crcs() return value (Daniel)
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
|
|
Don't try to test invaliud pipe/port combos. Fixes the test on
VLV w/ DSI since the pipe<->DSI port mapping is fixed. Should also
fix other platforms with similar restrictions.
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
|
|
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>
|
|
Tests should positively check for crc matches, not for mismatches.
Enforce this by only exposing and igt_assert function for comparing
crcs.
For the few tests which didn't just do this as consistency checks but
to do functional tests add FIXME comments that some reference crc
values are missing.
Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
|
|
Because of hash collisions tests should only ever compare crc
checksums for equality. Checking for inequality can result in random
failures.
To ensure this only expose and igt_assert function and use that.
Follow-up patches will rework the code for tests which don't follow
this requirement and try to compare for CRC inequality.
v2: Rebase on top of Matt's kms_plane changes.
Signed-off-by: Daniel Vetter <daniel.vetter@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>
|
|
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>
|
|
The problem is that this causes writes to registers, and if the pipe
is off they might go nowhere (e.g. when runtime pm is enabled).
Furthermore we can only really check once the modeset setup is done,
but again most tests set up the CRC structure before calling
igt_commit and friends. We could add crc restore support to the
kernel's rpm code, but that will end up being rather invasive and
fragile hard-to-test code.
Now originally this was needed back when CRC support wasn't available
everywhere. But that's fixed now.
So given all this just drop that sanity check and make sure that we
only touch the debugfs file (and so the hw state) when we know the
pipe is running in the desired configuration.
A complementary kernel patch will try to catch offenders by returning
-EIO if the pipe is off.
v2: Forgot to git add one hunk.
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=86092
Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
|
|
These tests require DRM master right, so make sure they have it from the
beginning. This gives an early indication if another DRM master is running
and makes the given test skip (with a proper explanation of the reason)
instead of exiting with error.
Signed-off-by: Imre Deak <imre.deak@intel.com>
|
|
This just improves the language about the exact failure to reduce
confusion.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
|
|
Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
|
|
So give it a kmstest_ prefix and shuffle it around a bit.
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
|
|
And add api doc while at it.
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
|
|
Signed-off-by: Thomas Wood <thomas.wood@intel.com>
|
|
Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
|
|
Let's make the test a bit more generic and have the number of CRCs we're
collecting a define so it can be changed easily.
Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
|
|
Instead of just testing if the CRCs are stable, we also test 2 different
fbs to make sure that the CRC is actually changing.
Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
|
|
Let's put the per-output test in its own function to get rid of 1 level
of indentation. We'll need it to cycle through 2 different framebuffers
to make sure we compute different CRCs if the fbs are different.
Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
|
|
Currently pipe CRC support is broken after gpu hangs. This tests for
this bug.
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
|
|
Currently broken ...
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
|
|
All the cases that simply dump some debug information and couldn't be
converted to some of the fancier macros.
Some information output removed when it's redundant with the subtest
status.
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
|
|
Shorter and more in line with our general igt_ prefix for everything
which isn't somehow intel or i915-gem or otherwise hw specific - these
helpers here are all fully generic framebuffer handling functions
based on kms + cairo.
Well, the actual buffer alloc is done with i915 gem, but meh ;-)
Two special cases:
- bpp_depth_to_drm_format and drm_format_to_bpp completely lacked
prefixes, so just add igt_.
- write_fb was a bit misleading given that we have gem_write for
uploading to buffers. Rename that to write_fb_to_png to make it
crystal clear what this thing does even without looking at docs.
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
|
|
Use the new-style function using drm fourcc codes instead everywhere.
To easily use thew fourcc based interface also expose
bpp_depth_to_drm_format from the library. Finally include drm_fourcc.h
from the igt_kms.h header since pretty much everyone needs this now.
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
|
|
This time big with media_fill.h
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
|
|
Functions which provide feature checks through igt_skip should be of
the form <prefix>_require_<feature>.
Otoh feature checks which return in a boolean whether the feature is
available should be of the form <prefix>_has_<feature>, e.g.
gem_has_blt.
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
|
|
All tests have now lost explicit references to igt_debugfs_t!
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
|
|
Also add a missing igt_assert to kms_fbc_crc and again add the missing
Returns: section to the api doc.
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
|
|
Apparently the framework doesn't ignore disabled pipes correctly, so
help it out a bit.
Again an awesome track record for our QA and bug scrubbers :(
Oh and while I rant: Docs for this stuff, please ;-)
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
|
|
It's nowhere used and removing it gives us a cleaner, more
orthogonal interface.
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
|
|
Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
|
|
The fixture won't be run when listing the subtests and thus we can't use
igt_display_get_n_pipes() in the list of tests. The alternative here is
to list the subtests with the maximum values and skip when not supported
on the platform.
Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
|
|
Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
|