Age | Commit message (Collapse) | Author |
|
No one is using anything but the "auto" crc source, so the enum
listing other options is quite pointless. Let's switch to just
using the string instead of the enum. That way any hypothetical
test that wants to use a more specific crc source can just
pass in the proper string.
v2: Assert the string isn't NULL (Chris)
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
|
|
We have tons of issues with crc mismatches, but often by that time
there was already a fifo underrun, which disables further fifo
underrun reporting. Reset fifo underrun reporting before we capture a
crc so that it's easier to figure out why the crc mismatch happened.
Reviewed-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
|
|
Function to open a debugfs directory of a connector associated to
a device.
v2:
instead of string manipulation openat used [Chris]
Signed-off-by: Ramalingam C <ramalingam.c@intel.com>
Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
|
|
All users of igt_pipe_crc_get_single() want a blocking read even if
the fd was opened in nonblocking mode. Make it so.
v2: Fix the docs for igt_pipe_crc_get_single()
Cc: Juha-Pekka Heikkila <juhapekka.heikkila@gmail.com>
Cc: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Reviewed-by: Juha-Pekka Heikkila <juhapekka.heikkila@gmail.com>
|
|
Quite often on catastrophic failure the test leaves a long queue of
unterminated batches pending execution. Each runs until hangcheck fires
and skips onto the next, leaving us waiting for a very long time at test
exit.
On older kernels, this gracefully degrades into the existing mechanism.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Reviewed-by: Antonio Argenziano <antonio.argenziano@intel.com>
|
|
tests/kms_frontbuffer_tracking and tests/kms_psr read debugfs nodes
several times after opening the directory once. There is already an
implementation of this in the kms_frontbuffer_tracking, moving that
functionality to the library will allow us to share the code with kms_psr
and kms_fbcon_fbt
Signed-off-by: Dhinakaran Pandiyan <dhinakaran.pandiyan@intel.com>
Reviewed-by: José Roberto de Souza <jose.souza@intel.com>
|
|
A pair of igt_pipe_crc_drain() and igt_pipe_crc_get_single() has a bug in which
you're not sure whether the new CRC is captured because the vblank irq may race
against the CRC irq and delivered to userspace too soon.
When receiving a vblank event, igt_pipe_crc_drain() will then drain all crc's,
but not the new (stale) crc, which is then delivered and immediately returned
by igt_pipe_crc_get_single().
Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>
|
|
Collecting CRC may result in a modeset and extra vblank waits. On some
tests this will increase the runtime a lot, so it makes sense to
keep it enabled, and only collect the most recent CRC when needed.
Changes since v1:
- Fix read_crc semantics. (Ville)
Changes since v2:
- Remove EAGAIN assert, can be reached from drain_crc.
Changes since v3:
- Do not infinitely loop in igt_pipe_crc_drain().
Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
Reviewed-by: Mika Kahola <mika.kahola@intel.com> #v2
Tested-by: Vidya Srinivas <vidya.srinivas@intel.com>
|
|
A new flag for an old API; now we can request that the driver flush its
idle_worker to release internal caches.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Reviewed-by: Joonas Lahtinen <joonas.lahtinen@linux.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>
|
|
This introduces a igt_crc_to_string_extended helper that allows
formatting a crc to a string with a given delimiter and size to print
per crc word.
Signed-off-by: Paul Kocialkowski <paul.kocialkowski@linux.intel.com>
Reviewed-by: Lyude <lyude@redhat.com>
|
|
This introduces an igt_check_crc_equal function in addition to
igt_assert_crc_equal and makes the CRC comparison logic from the latter
common. In particular, an igt_find_crc_mismatch function indicates
whether there is a mistmatch and at what index, so that the calling
functions can print the diverging values.
Signed-off-by: Paul Kocialkowski <paul.kocialkowski@linux.intel.com>
Reviewed-by: Lyude <lyude@redhat.com>
|
|
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>
|
|
As we can export igt_debugfs_dir() to cache the path to our debugfs
directory, encourage a few more users to take advantage.
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>
|
|
Introduce a new fork helper that spawns a process that just repeatedly
calls i915_gem_shrink_all() and watch what happens as we try to use
objects that have been shrunk.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
|
|
Recently we added i915_hpd_storm_ctl into i915's debugfs directory,
which allows us to control the thresholds i915 uses for detecting
hotplug interrupt storms from userspace, along with the ability to
entirely disable them. This adds some helper functions into IGT to
enable making use of this feature, along with adding some chamelium
tests for it.
Signed-off-by: Lyude <lyude@redhat.com>
|
|
Since we're not modifying these anywhere, let's make them const so as to
not break code doing comparisons against compile-time CRCs.
Signed-off-by: Lyude <lyude@redhat.com>
Tested-by: Robert Foss <robert.foss@collabora.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>
|
|
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
|
|
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
|
|
Not everything we want from debugfs is under debugfs/dri. But we do want
to share the code to find the debugfs mount point (and mount it if is
not found).
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
|
|
This was intentionally left out of the abi since CRC have fairly low
entropy and can't be reliably compared for inequality in testcases.
Spotted while fixing up warnigns in docs, but given that igt_assert_crc_equal
has a big comment explaining why only the positive assert exists I'm not
sure all those docs are all that useful :(
Cc: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Cc: Matt Roper <matthew.d.roper@intel.com>
Cc: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
|
|
- gtk-doc requires that the names in comments match the ones in the header
declaration.
- igt_debugfs_dir works together with igt_sysfs_get().
Cc: Chris Wilson <chris@chris-wilson.co.uk>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
|
|
For fun, debugfs/.../names currently explodes, so lets capture that and
make sure that basic access to debugfs does no harm.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
|
|
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Matt Roper <matthew.d.roper@intel.com>
Signed-off-by: Matt Roper <matthew.d.roper@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>
|
|
gem_flink_race and prime_self_import have subtests which read the
number of open gem objects from debugfs to determine if objects have
leaked during the test. However the test can fail sporadically if
the number of gem objects changes due to other process activity.
This patch introduces a change to check the number of gem objects
several times to filter out any fluctuations.
v2: Moved the common code to a library and made the loop android
specific (Daniel Vetter)
v3: Renamed get_stable_obj_count -> igt_get_stable_obj_count
Signed-off-by: Derek Morton <derek.j.morton@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
|
|
Signed-off-by: Thomas Wood <thomas.wood@intel.com>
|
|
Add igt_debugfs_search to search each line in a debugfs file for a
specified substring.
Signed-off-by: Thomas Wood <thomas.wood@intel.com>
|
|
A helpful function for when you want to read a whole debugfs file to a
string and don't want to worry about opening and closing file
descriptors and asserting buffer sizes.
We've been using this already for kms_frontbuffer_tracking and
kms_fbcon_fbt, so the only test with new code here is kms_fbc_crc.
Also notice that for kms_fbc_crc we had to increase the buffer size
since the file can sometimes be bigger than 64 bytes - depending on
the reason why FBC is disabled.
Of course, there are probably many other programs we can patch, but
I'm not doing this now.
v2: Add the macro to wrap sizeof() (Daniel).
v3: Add documentation for the macro too (Daniel).
Signed-off-by: Paulo Zanoni <paulo.r.zanoni@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>
|
|
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>
|
|
Signed-off-by: Thomas Wood <thomas.wood@intel.com>
|
|
Signed-off-by: Thomas Wood <thomas.wood@intel.com>
|
|
|
|
Multiple tests are introducing hangs by fidding with i915_ring_stop
debugfs entry.
Signed-off-by: Mika Kuoppala <mika.kuoppala@intel.com>
|
|
Only include what the header itself needs. The big fish here is
intel-gpu-tools.h. More will follow.
One ugly thing removed here is the duplicated GEN6_TD_CTL #define, one
of which was broken.
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>
|
|
And also move the igt_debugfs_t type out of the headers.
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>
|
|
Also update the api docs a bit since the Returns: section was missing.
v2: Readd the accidentally lost line for @filename.
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
|
|
... and I immediately regret that I've killed the return value
for igt_debugfs_init, since we have callers which need to work
without the forcewake stuff, e.g. the reg dumper needs to work
without i915 loaded.
Put this new helper to good use in the mmio code and the pm_pc8
testcase.
Cc: Paulo Zanoni <paulo.r.zanoni@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
|
|
Again issues with an enum, this time intel_pipe_crc_source. The
typedefs seem to work better here though.
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>
|
|
(Almost) no one cared anyway.
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
|