Age | Commit message (Collapse) | Author |
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
With PLANE1 and PIPE CRC sources the test will work on all currently
shipping (and planed fwiw) platforms.
Also add all the other new sources for non-ivb/hsw chips.
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
|
|
Let's add a new test that sets a mode, wait for a few vblanks (3) and
then make sure we read 3 identical CRCs.
Some subtests check for various parsing errors.
In the process, improve the debugfs helpers to deal with CRCs.
Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
|
|
Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
|
|
Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
|
|
Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
|