summaryrefslogtreecommitdiff
path: root/tests/kms_pipe_crc_basic.c
AgeCommit message (Collapse)Author
2019-02-27tests/kms_pipe_crc_basic: Only test a single output per pipe.Maarten Lankhorst
Instead of iterating over all outputs, use igt_get_single_output_for_pipe to only test a single output. Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com> Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
2019-02-27tests/kms_pipe_crc_basic: Use for_each_pipe_static().Maarten Lankhorst
Instead of duplicating for_each_pipe_static functionality, use the actual macro, and the same for kmstest_pipe_name. Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com> Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
2018-12-10lib/kms: Enable outputs by default in igt_require_displayDaniel Vetter
More testing, automatically when using the high-level kms helpers! Cc: Maarten Lankhorst <maarten.lankhorst@linux.intel.com> Reviewed-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com> Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
2018-10-03lib/kms: Handle no connectors for igt_enable_connectors()Chris Wilson
Take the device fd from the caller as to which card we should try and enable connectors for (or else we may not enable the right connectors for the test!) and fail gracefully if there is no kms support on the device. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Reviewed-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
2018-10-01igt: Require a display (KMS enabled) for KMS testsChris Wilson
Simple rule of thumb, if a kms_* test calls igt_display_init() in its global fixture, skip the entire test if the driver has disabled KMS. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Acked-by: Antonio Argenziano <antonio.argenziano@intel.com>
2018-08-02kms_pipe_crc_basic: Skip when hitting -EIOMaarten Lankhorst
-EIO is returned when the crtc is not active, in which case we skip the test because the parsing of the parameter in crtc-0/crc/control is not done. Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com> Reported-by: Chris Wilson <chris@chris-wilson.co.uk> Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
2018-08-02tests/kms_pipe_crc_basic: expect setting bad source to fail, v2.Mahesh Kumar
Now crc-core framework verifies the source string passed by the user. So setting bad-source will fail. Expect file write to fail in bad-source subtest of kms_pipe_crc_basic. Signed-off-by: Mahesh Kumar <mahesh1.kumar@intel.com> Reviewed-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com> #v1 Changes since v1: - Allow bad-source to succeed with current and future behavior. (mlankhorst) - Test that errno is set to EINVAL. Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com> [mlankhorst: Modified test to work with both behaviors, as long as errno is set to EINVAL] Reviewed-by: Mahesh Kumar <mahesh1.kumar@intel.com>
2018-03-14tests/kms_pipe_crc_basic: Remove legacy crc testsMaarten Lankhorst
Commit 8c6b709d96cb9 ("drm/i915: Use new CRC debugfs API") has been in the kernel for more than a year. In commit 6d16875736b9f ("lib/igt_debugfs: Remove support for legacy CRC api.") we've removed support for the legacy CRC testing and we're about to remove the last remnants from the kernel, so it's time to remove the last tests for legacy CRC as well. Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com> Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2017-10-18tests: Clean up igt_skip_on_simulation() usesArkadiusz Hiler
General update to reflect current state of things. Signed-off-by: Arkadiusz Hiler <arkadiusz.hiler@intel.com> Acked-by: Radoslaw Szwichtenberg <radoslaw.szwichtenberg@intel.com> Acked-by: Petri Latvala <petri.latvala@intel.com>
2017-06-20igt/kms_pipe_crc_basic: Skip test before system suspendGabriel Krisman Bertazi
Do a dummy crc read such that if there are no valid outputs for the pipe, it skip the test before doing a system suspend. Signed-off-by: Gabriel Krisman Bertazi <krisman@collabora.co.uk> Reviewed-by: Petri Latvala <petri.latvala@intel.com>
2017-06-20igt/kms_pipe_crc_basic: Print pipe name when skippingGabriel Krisman Bertazi
Signed-off-by: Gabriel Krisman Bertazi <krisman@collabora.co.uk> Reviewed-by: Petri Latvala <petri.latvala@intel.com>
2017-03-29igt/kms_pipe_crc_basic: Use a fast hangChris Wilson
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>
2017-03-25igt/kms_pipe_crc_basic: Fix assertion for bad commandsChris Wilson
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2017-03-24lib/debugfs: Phase out igt_debugfs_fopen()Chris Wilson
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>
2017-03-21Restore "lib: Open debugfs files for the given DRM device"Chris Wilson
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>
2017-03-21Revert "lib: Open debugfs files for the given DRM device"Tomeu Vizoso
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>
2017-03-21igt/kms_pipe_crc_basic: Don't assert on errno after successTomeu Vizoso
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>
2017-03-21lib: Open debugfs files for the given DRM deviceTomeu Vizoso
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>
2017-03-13igt/kms_pipe_crc_basic: Tighten timings for CRC readbackChris Wilson
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>
2017-03-13igt/kms_pipe_crc_basic: Skip test before hang injectionChris Wilson
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>
2017-01-05kms_pipe_crc_basic: Stop looking at output->validMaarten Lankhorst
Use the proper iterator macros to prevent ever having an invalid config. Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
2016-12-14lib/debugfs: Support new generic ABI for CRC captureTomeu Vizoso
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>
2016-10-13lib/igt_aux: Add support for various system suspend/resume optionsImre Deak
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>
2016-09-13igt/gem_busy: Prevent banning when running multiple hang testsChris Wilson
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2016-04-20tests/kms_pipe_crc_basic: Don't suspend the machine if the pipe is not present.marius vlad
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>
2016-04-09igt/kms_pipe_crc_basic: Replace stop_rings with igt_hang_ringChris Wilson
We can inject a real GPU hang for greater effect! Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2016-01-08tests/kms_pipe_crc_basic: Use igt_assert_eq() to see the failing frame countsVille Syrjälä
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>
2016-01-08tests/kms_pipe_crc_basic: Add tests for O_NONBLOCK CRC readsVille Syrjälä
v2: Rebased due to __attribute__((warn_unused_result)) Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
2016-01-08lib: Add igt_pipe_crc_new_nonblock()Ville Syrjälä
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>
2015-10-23tests/kms_pipe_crc_basic: Skip invalid pipe/port combosVille Syrjälä
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>
2015-09-11convert drm_open_any*() calls to drm_open_driver*(DRIVER_INTEL) calls with cocciMicah Fedke
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>
2015-08-21lib: add a single include headerThomas Wood
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>
2015-03-23tests: Remove usage of igt_crc_equal and _non_nullDaniel Vetter
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>
2015-03-23lib/debugfs: Add igt_assert_crc_equalDaniel Vetter
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>
2015-03-12tiling: Convert framebuffer helpers to use fb modifiersTvrtko Ursulin
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>
2015-02-13lib/igt_gt: Document and consolidateDaniel Vetter
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>
2014-11-24lib/igt_debugfs: Don't setup crc in _newDaniel Vetter
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>
2014-09-30test/kms, pm: use drm_open_any_masterImre Deak
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>
2014-08-29igt: Prettify igt_assert_eq() failure messagesChris Wilson
This just improves the language about the exact failure to reduce confusion. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-08-21kms_pipe_crc_basic: Adjust to the new igt_create.*fb() APIDamien Lespiau
Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
2014-08-12lib/igt_kms: set_vt_graphics_mode is a low-level helperDaniel Vetter
So give it a kmstest_ prefix and shuffle it around a bit. Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2014-08-12lib/igt_kms: Unify pipe name helpersDaniel Vetter
And add api doc while at it. Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2014-07-11tests: enable extra connectors in kms_flip and kms_pipe_crc_basicThomas Wood
Signed-off-by: Thomas Wood <thomas.wood@intel.com>
2014-07-07kms_pipe_crc_basic: Add a bit a debugging outputDamien Lespiau
Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
2014-07-07kms_pipe_crc_basic: Make the number of CRCs a parameterDamien Lespiau
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>
2014-07-07kms_pipe_crc_basic: Cycle between 2 differently colored bufferDamien Lespiau
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>
2014-07-07kms_pipe_crc_basic: Split the main test function a bit moreDamien Lespiau
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>
2014-05-22tests/kms_pipe_crc_basic: Add gpu hang testsDaniel Vetter
Currently pipe CRC support is broken after gpu hangs. This tests for this bug. Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2014-05-22tests/kms_pipe_crc_basic: Add suspend testsDaniel Vetter
Currently broken ... Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2014-05-14tests: sprinkle igt loggingDaniel Vetter
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>