summaryrefslogtreecommitdiff
path: root/tests/kms_cursor_legacy.c
AgeCommit message (Collapse)Author
2019-04-30tests/kms_cursor_legacy: Don't stop cursor_vs_flip earlyArkadiusz Hiler
The test is doing multiple iterations (50). Each iteration tries to squeeze target number of cursor updates in half a second worth of flips. If we don't hit the target in any given iteration we bail out early. Because of that we don't have the data on the number of iterations that have failed and/or succeeded any given run, which makes hunting down this elusive issue hard. Let's change that so we always go through all the iterations and fail at the end printing out the number of iterations we haven't met the target. Each failed iteration also logs how many cursor updates it has managed to do. Since our target is generated run-time and is also load sensitive, let's bump the log level of message containing our target to "info" so we can compare those values across both passes and failures. Cc: Anusha Srivatsa <anusha.srivatsa@intel.com> Cc: Martin Peres <martin.peres@linux.intel.com> Cc: Maarten Lankhorst <maarten.lankhorst@linux.intel.com> Signed-off-by: Arkadiusz Hiler <arkadiusz.hiler@intel.com> Reviewed-by: Martin Peres <martin.peres@linux.intel.com>
2019-04-18lib/igt_dummyload: Get rid of 'batch' on spinner accessorsMika Kuoppala
There is no guarantee that spinners are and will be implemented using batches. As we have igt_spin_t, manipulate it through igt_spin_* functions consistently and hide the batch nature. Cc: Chris Wilson <chris@chris-wilson.co.uk> Signed-off-by: Mika Kuoppala <mika.kuoppala@linux.intel.com> Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
2019-03-22tests/kms_cursor_legacy: Fix assertion failure due to vblank mismatchNischala Yelchuri
For the !modeset case, after a pageflip is performed on both crtc's, vblank counter is advanced by 1 when compared to its original value. For the modeset case, when pageflips and modesets are interleaved, vblank counter does not always advance by 1 as nonblocking modeset could fail, in which case we do not need vblank_matches. v2: Remove the assert statement instead of changing the condition Cc: Maarten Lankhorst <maarten.lankhorst@intel.com> Signed-off-by: Nischala Yelchuri <nischala.yelchuri@intel.com> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=105454 Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
2019-03-02tests/kms_cursor_legacy: Add missing munmapNischala Yelchuri
Added munmap and replaced hard-coded values with PAGE_SIZE macro. Cc: Easwar Hariharan <easwar.hariharan@intel.com> Cc: Ashutosh Dixit <ashutosh.dixit@intel.com> Signed-off-by: Nischala Yelchuri <nischala.yelchuri@intel.com> Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
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-14tests: Replace calls to igt_pipe_crc_drain + get_single with ↵Maarten Lankhorst
igt_pipe_crc_get_current() This is a more race free of accomplishing the same. Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com> Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2018-07-06lib: Convert spin batch constructor to a factoryChris Wilson
In order to make adding more options easier, expose the full set of options to the caller. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Cc: Tvrtko Ursulin <tvrtko.ursulin@intel.com> Cc: Petri Latvala <petri.latvala@intel.com> Reviewed-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
2018-02-12lib/igt_debugfs: Add igt_pipe_crc_get_single and igt_pipe_crc_drain, v4.Maarten Lankhorst
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>
2018-01-02tests/kms_cursor_legacy: Rework the 2x-*-vs-cursor-* tests.Maarten Lankhorst
Using the fancy new DRM_CAP_CRTC_IN_VBLANK_EVENT cap I can finally make this test the work I originally intended to. For the !modeset case that means performing a pageflip on both crtc's, then requeueing as soon as the event is delivered and then check the vblank counter against the original value, it should be advanced by 1. The modeset case is slightly more complicated, ideally it's handled the same, but if we can't perform a modeset and pageflip at the same time, fall back to queueing both in a single commit, in which case we can say nothing about the vblank counter. There is a small race between flip_done and hw_done, so make flip_nonblocking retry for a second when encountering -EBUSY. Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=101634 Reviewed-by: Mika Kahola <mika.kahola@intel.com>
2018-01-02tests/kms_cursor_legacy: Perform lazy cleanup between testsMaarten Lankhorst
Instead of assuming each subtest cleans up after itself, assume it fails and doesn't. Now that igt_kms can clean up stale events, we can just force each subtest to only clean up its framebuffers, which isn't harmful if it failed. The nonblocking modeset test is removed, this was a workaround only needed for intel because it supported nonblocking commit only for the !modeset case, this has been fixed. Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com> Reviewed-by: Mika Kahola <mika.kahola@intel.com>
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-10-03lib/igt_kms: Change output->pending_crtc_idx_mask to output->pending_pipeMaarten Lankhorst
igt_output_set_pipe with PIPE_ANY used to mean that we bind the output to any pipe, but this is now a deprecated alias for PIPE_NONE, and means the output will be unbound. Because of this it's better to change output->pending_crtc_idx_mask to an enum pipe, because only a single choice may be given for a pipe. Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com> Reviewed-by: Mika Kahola <mika.kahola@intel.com>
2017-10-02tests: Stop looking at plane private membersMaarten Lankhorst
Most of these tests have no reason to look at those members, so try other ways of getting the information. Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com> Reviewed-by: Mika Kahola <mika.kahola@intel.com>
2017-09-22igt/kms_cursor_legacy: Use common spinbatchChris Wilson
Remove the local recursive spinner in favour of igt_spin_t. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
2017-09-20tests/kms_cursor_legacy: Do not start collecting CRC after making FB busyMaarten Lankhorst
Collecting CRC may force a modeset, which is a bad idea after we just forced a hang. The hang is intended to make sure the page flip doesn't complete before the cursor, making sure that works. Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=102259 Cc: Marta Lofstedt <marta.lofstedt@intel.com> Tested-by: Marta Lofstedt <marta.lofstedt@intel.com> Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com> [mlankhorst: Prevent overflow when collecting crcs, based on Villes feedback]
2017-09-08build: remove _GNU_SOURCE from source filesDaniel Vetter
We are, the build system takes care of that. Reviewed-by: Eric Anholt <eric@anholt.net> Acked-by: Jani Nikula <jani.nikula@intel.com> Acked-by: Arkadiusz Hiler <arkadiusz.hiler@intel.com> Acked-by: Petri Latvala <petri.latvala@intel.com> Acked-by: Daniel Stone <daniels@collabora.com> Acked-by: Radoslaw Szwichtenberg <radoslaw.szwichtenberg@intel.com> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2017-08-14lib/kms: Add for_each_pipe_staticDaniel Vetter
for_each_pipe cannot be used for enumerating testcases, so provide something that can. Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch> Reviewed-by: Petri Latvala <petri.latvala@intel.com>
2017-08-07tests/kms_cursor_legacy: use 'enum pipe' type instead of 'int'Gustavo Padovan
Signed-off-by: Gustavo Padovan <gustavo.padovan@collabora.com> Reviewed-by: Arkadiusz Hiler <arkadiusz.hiler@intel.com>
2017-06-16tests: Rename I915_MAX_PIPES to IGT_MAX_PIPESLeo (Sunpeng) Li
Name should not be driver-specific. Signed-off-by: Leo (Sunpeng) Li <sunpeng.li@amd.com> Reviewed-by: Arkadiusz Hiler <arkadiusz.hiler@intel.com>
2017-06-09Revert "kms_cursor_legacy: Add a burner thread to make basic-busy-* pass."Chris Wilson
This reverts commit 7c8703fb02b248c2bcf9756bba8812bcfe7ed5d3. If we expect it to fail until we find a solution, let the hw fail and continue to track the known failure in CI/bugs. Cc: Martin Peres <martin.peres@linux.intel.com> Acked-by: Martin Peres <martin.peres@linux.intel.com>
2017-06-07kms_cursor_legacy: Add a burner thread to make basic-busy-* pass.Maarten Lankhorst
This appears to be required on SNB, or else we miss a lot of interrupts. Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
2017-05-09tests/kms_cursor_legacy: Fix failing tests harderMaarten Lankhorst
Also allow the initial vblank evasion to fail. This was the most likely cause of the test failure, so be sure to fix it too. Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
2017-05-09tests/kms_cursor_legacy: Increase tolerance for failing ↵Maarten Lankhorst
flip-before/after-cursor. Run the test 25 times and fail if we miss too many vblanks. CI receives too many false positives so we have to fix it. Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
2017-04-27igt/kms_cursor_legacy: Mark up busy tests as requiring a GPUChris Wilson
If we can't use the GPU to make a framebuffer busy, skip the test. 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-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-15tests/kms_cursor_legacy: make_busy() before get_vblank()Ville Syrjälä
VLV is a sloth and so doing anything extra between the first and last get_vblank() is likely to increase the chance of failing the test. Let's move the make_busy() stuff to happen before the first get_vblank() to reduce the amount of work done there. These tests are still failing quite often on my VLV, but that is mostly caused by igt_kms's tendency to still re-read all the connector properties and whatnot as part of the commit operation. I suspect that fixing that would eliminate most of the spurious failures. Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
2017-01-31tests/kms_cursor_legacy: Add support for dynamic number of planesRobert Foss
Add changes reflecting the new support for dynamic number of planes per pipe. Signed-off-by: Robert Foss <robert.foss@collabora.com> Reviewed-by: Mika Kahola <mika.kahola@intel.com>
2017-01-23kms_cursor_legacy: Allow for an extra vblank wait in atomic-transitions testsMaarten Lankhorst
This is required for ILK style watermark programming, which currently inserts an extra vblank wait. This allows the tests to pass on those platforms. Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
2017-01-18kms_cursor_legacy: Use cursor movement instead of hiding for 2x testsMaarten Lankhorst
This forces the cursor fastpath to be used. While at it, add -atomic versions of the test to compare legacy pageflip vs atomic. The nonblocking modeset test is changed slightly, due to cdclk changes the page flip may be stalled so it's not useful to test it. Just test that a queued page flip + nonblocking modeset works as intended and there is no kernel spew. Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
2017-01-17kms_cursor_legacy: Make the 2x tests slightly more useful.Maarten Lankhorst
Trying to run as many cursor updates during a nonblocking modeset won't work, because both crtc's might be involved in the modeset. Instead try to run as many cursor updates on both crtc's at the same time, while trying to queue page flips in between. Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
2017-01-16kms_cursor_legacy: fallback to xrgb if argb for sprite plane is unavailableMaarten Lankhorst
This fixes the test on older platforms that don't have ARGB support. Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
2017-01-03kms_cursor_legacy: Eliminate cursor update variations.Maarten Lankhorst
Nail the cursor update thread to a single cpu, and run a idle busy loop on the same cpu. This will force it to the highest cpu speed, which will eliminate cpu speed variations and allows the test to pass. Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
2016-12-27kms_cursor_legacy: Remove extra /2.Maarten Lankhorst
Kept in the previous commit by accident. Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
2016-12-27kms_cursor_legacy: Run cursor updates only for a quarter of the time.Maarten Lankhorst
Because in the ideal case we currently wait 50% of the time for every frame, on some machines cpu scaling gets in the way when we idle a lot and will cause the machine to throttle to a lower cpu speed. This causes a failure because we may end up missing vblanks. Work around this by only running for 1/4th of the time at max speed, even on low cpu speeds it will be less likely to run into issues then. Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
2016-12-22kms_cursor_legacy: Reduce runtime of cursor-vs-flip.Maarten Lankhorst
This was running for 150 seconds before, reduce it to 25. Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
2016-12-21kms_cursor_legacy: Make tests less strict.Maarten Lankhorst
Some tests may wait a vblank on master. Instead of failing the tests, allow them to succeed if 1 vblank passed. Also no longer warn if a page flip is missed, change it to info instead. As long as no more than 25% of the vblanks are missed the tests will pass. Also fix nonblocking modeset vs cursor, which needs an array of cursor argument. This was a nice buffer overrun before. Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
2016-12-08tests/kms_cursor_legacy: Change crc tests to use cursor movement instead of ↵Maarten Lankhorst
cursor hiding This way the tests will pass with the legacy cursor hack. Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
2016-11-21kms_cursor_legacy: Add nonblocking modeset vs cursor update test.Maarten Lankhorst
In case of a nonblocking modeset, the cursor update should block for the modeset to finish. Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
2016-10-06kms_cursor_legacy: Split out the busy crc test.Maarten Lankhorst
It's more readable like this, and with the ifs it was a completely separate test anyway. Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
2016-10-05igt/kms_cursor_legacy: Deduplicate make_busy()Chris Wilson
make_busy() already existed! Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2016-10-05kms_cursor_legacy: Add cursor update vs busy page flip test.Maarten Lankhorst
This is a test for the issue exposed by 97888, we perform a busy bo update followed by a cursor update. The page flip and cursor update should complete without hanging, and the new fb should not be flipped yet as a result of the cursor update. Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
2016-10-04igt/kms_cursor_legacy: Check that a busy flip doesn't block the cursorChris Wilson
Suggested-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2016-09-13igt/kms_cursor_legacy: Reduce flip/cursor ordering to basicsChris Wilson
The essence of the basic test is that neither the cursor nor the nonblocking flip stall the application of the next. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2016-09-08kms_cursor_legacy: Add cursor crc tests.Maarten Lankhorst
On skylake there's a add_all_affected_planes call that will make atomic commit use the old cursor state. Add a test that first does a page flip then cursor update to expose the issue. The test currently fails on the vblank wait, but that's a common issue affecting all the tests. Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
2016-08-24igt/kms_cursor_legacy: Reduce scope of basic-cursor-vs-flipChris Wilson
Since we are experiencing too much noise in BAT from what just looks like scheduling delays in inspecting the vblank, reduce the basic test to the fundamentla: check that the cursor ioctl following the nonblocking flip/modeset occurs within the same vblank. Hopefully, CI + debug builds are fast enough to do get-vblank; flip; cursor; get-vblank within a single vblank period. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Cc: Imre Deak <imre.deak@intel.com> Cc: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
2016-08-23igt/kms_cursor_legacy: Add missing newlineChris Wilson
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2016-08-11kms_cursor_legacy: Try vrefresh amount of flips in cursor-vs-flipMaarten Lankhorst
When vrefresh is 30 the tests run for twice as long, set it to vrefresh to make the tests just as long anywhere Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
2016-08-11kms_cursor_legacy: Add tests for nonblocking modesets vs legacy cursorMaarten Lankhorst
This probably won't pass by design on platforms that need to reallocate global resources like watermarks on gen9+, but it's a good test anyway. Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>