summaryrefslogtreecommitdiff
path: root/tests/kms_cursor_legacy.c
AgeCommit message (Collapse)Author
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>
2016-07-26kms_cursor_legacy: Add test for unrelated cursor updates.Maarten Lankhorst
Add a test that first shows the cursor on the first display, then shows it on the second display. This exposes the watermark issues on SKL. Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
2016-07-26kms_cursor_legacy: Add a wider variety of tests.Maarten Lankhorst
Add -varying-size, where we change the size of the cursor between 64x64 to maxw x maxh, atomic-transitions, which alternates between a full-screen sprite plane and a full-screen primary plane, toggle, which toggles cursor visibility and make sure cursor moves between updates. This is a visual indicator of the tests working as intended. Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
2016-07-26kms_cursor_legacy: Make sure BAT runs when pipe A cannot be used.Maarten Lankhorst
This can happen on CHV, where you only have a output on pipe C. Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
2016-07-26kms_cursor_legacy: Use igt_display for modesets.Maarten Lankhorst
This lets us pick a nice testing pattern while the test runs and makes sure that the cursor updates don't get nooped. It also tests the atomic modeset path, if available. Also make sure cursorX-vs-flipX has 2 separate connected outputs, else the test is worthless. Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
2016-07-26kms_cursor_legacy: Use igt_display_t instead of handrolling everything.Maarten Lankhorst
No real changes yet, only replaced output validation with for_each_valid_output_on_pipe. Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
2016-07-26kms_cursor_legacy: Enable tests for !intel drivers.Maarten Lankhorst
Apart from gem_create nothing depends on i915, so use the dumb api instead. Suggested-by: Chris Wilson <chris@chris-wilson.co.uk> Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
2016-07-26kms_cursor_legacy: Reorganize test executionMaarten Lankhorst
Rename single-A-bo to pipe-A-single-bo, single-all-bo to pipe-all-single-bo, and ensure that test requirements are met. Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com> Acked-by: Chris Wilson <chris@chris-wilson.co.uk>
2016-07-03igt/gem_exec_gttfill: Reduce overhead in setting up filler batchesChris Wilson
Since all the batches start with the same content, we can reuse the same buf to fill them. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2016-06-24igt/kms_cursor_legacy: Check that cursor updates do not stall flipsChris Wilson
A similar expectation as to the current test that flips do not stall cursor updates. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2016-06-23Silence compiler warnings for expected and handled error conditionsChris Wilson
Silly compiler emitting warnings that just cause people to break code attempting to silence the compiler. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>