Age | Commit message (Collapse) | Author |
|
Let's just steal the "crc" namespace and add this by default to
igt_pipe_crc_collect_crc() instead of adding more calls to other
tests. If tests want special waits on just some of their collect_crc()
calls, they can use another name instead of "crc".
This is very useful when developing, especially when the CRC we get is
wrong: we want to look at the screen to see what's going on before we
can think about how to fix the problem. So let's add this to the lib
instead of adding this to every single test I need to debug.
v2: Add some documentation (Daniel).
Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
|
|
Avoid having to escape certain characters in documentation comments by
not allowing docbook markup tags. Markdown formatting in documentation
comments is still supported.
Signed-off-by: Thomas Wood <thomas.wood@intel.com>
|
|
Add rules to fix unused-result warnings when compiling with
_FORTIFY_SOURCE defined and apply them to the library and tests.
Acked-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Signed-off-by: Thomas Wood <thomas.wood@intel.com>
|
|
It is theoretically possible to hit these in the wild, so only warn
about them. Dropping the test is probably too much since these caught
some real bugs in the past.
Signed-off-by: Daniel Vetter <daniel.vetter@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>
|
|
On CHV we sometimes see not just one but two bad CRCs. No real idea
what would cause that, but let's just throw away the second CRC as
well to gain some stability for the tests.
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.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>
|
|
Signed-off-by: Thomas Wood <thomas.wood@intel.com>
|
|
If at first we don't succeed, try again. (For as long as the errno says
to at least!)
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
|
|
This just improves the language about the exact failure to reduce
confusion.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
|
|
Except in igt_core since that would lead to some hilarious recursions.
v2: Don't fflush any more, spotted by Chris.
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: Damien Lespiau <damien.lespiau@intel.com>
|
|
This is what we read when the CRC logic in in a powered down well. We
really don't want that to happen.
In theory, it's possible 0xffffffff to be a valid CRC value, so I don't
assert here.
Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
|
|
If IGT_NO_FORCEWAKE is set, skip the forcewake open. Useful when you
want to poke at register without otherwise disturbing the GPU.
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
|
|
Remove the igt_assert() from the debugfs mount. It will fail if debugfs
is already mounted. With the assert in place it's very annying to use
igt without i915 loaded (eg. to dump BIOS configured registers).
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
|
|
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
|
|
Signed-off-by: Thomas Wood <thomas.wood@intel.com>
Acked-by: Damien Lespiau <damien.lespiau@intel.com>
|
|
The subsequet code expects the read() to not have filled the entire
buffer, and yet we allow it to do so. Reduce the size passed to read()
by 1 to make the code sane.
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
|
|
The assert in igt_set_stop_rings() is a bit bogus. Suppsoedly it was
meant to assure that the caller always restores the rings to running
state after stopping them. But in its current form it will trigger
any time someone calls the function and the rings were already stopped.
So you can't even restore the rings to running state w/o the assert
triggering.
Fix it up so that it'll ignore the current ring state when we're trying
to restore the rings back to running state.
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
|
|
Multiple tests are introducing hangs by fidding with i915_ring_stop
debugfs entry.
Signed-off-by: Mika Kuoppala <mika.kuoppala@intel.com>
|
|
For 1 function and 2 types we kinda don't need separate files.
Especially now that igt_kms is much more focused on the actual modeset
stuff with all the framebuffer helpers extracted to igt_fb.
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
|
|
Occasionally useful to read documentation ...
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
|
|
I've left unistd.h in it - it's not strictly required but most users
of drmtest.h want it for the open helpers, and then you kinda need to
close that file descriptor again ...
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
|
|
Brought a few missing headers to light in ioctl_wrappers.h, too.
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
|
|
Should help in alleviating the header mess we have atm.
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>
|
|
Allows us to remove every so little bit of boilerplate from
tests, once it's all rolled out.
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>
|
|
This way all debugfs library code is in one place, ready for some api
documentation care.
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
|
|
In this case, we also take care of starting/stopping the CRC collection.
Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
|
|
Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
|
|
It's what callers expect - pipe_crc_new is the function where
we pass a potential failure back to callers.
Reviewed-by: Damien Lespiau <damien.lespiau@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
|
|
No need to duplicate this all over the place.
Reviewed-by: Damien Lespiau <damien.lespiau@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
|
|
Use the correct fd in the assert().
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
|
|
No one actually cares, everyone expects it to just work.
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
|
|
This is basically a "drop cache" interface to the igt_debugfs
facilities. Also, update existing users.
Signed-off-by: Oscar Mateo <oscar.mateo@intel.com>
Cc: Damien Lespiau <damien.lespiau@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
|
|
Most callers didn't bother checking, so just move the asserts into
the function itself.
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
|
|
No need to sprinkle this all over:
- exit handlers will only be registered once
- they're always called when exiting, so no need to explictly call
them.
This allows us to hide all the pipe crc cleanup in the library.
Cc: Damien Lespiau <damien.lespiau@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
|
|
Makes stuff work on DP ports on gmch platforms automatically.
Cc: Damien Lespiau <damien.lespiau@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
|
|
Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
|