summaryrefslogtreecommitdiff
path: root/tests/kms_cursor_legacy.c
AgeCommit message (Collapse)Author
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>
2016-06-22igt/kms_cursor_legacy: Replace synchronous pageflipChris Wilson
Aparently we never supported that mode of operation. Maybe in the future we will, but for now just use the vblank wait to align ourselves with the vblank. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2016-06-22igt/kms_cursor_legacy: Detect pageflip errorsChris Wilson
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2016-06-22igt/kms_cursor_legacy: Add a rudimentary test to detect stalled cursorsChris Wilson
A common problem when trying to unify legacy and atomic is the breaking of existing non-blocking, asynchronous userspace. The most trivial example is a cursor that stalls for a pageflip. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2016-06-07igt/kms_cursor_legacy: wrap __builtin_ia32_pause inside cpu_relaxTomeu Vizoso
So that we can add an alternative implementation for the other arches. This is basically what the kernel does. Signed-off-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
2016-06-04igt/kms_cursor_legacy: Add background RT threadsChris Wilson
Saturate the CPUs with background RT threads to soak up any spare CPU not taken by testing threads. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2016-05-25igt/kms_cursor_legacy: Fixup !fixtureChris Wilson
igt_fixture and its byzantine requirements Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2016-05-25igt/kms_cursor_legacy: Stress each CRTC individually as wellChris Wilson
Just to compare handling of plane->mutexes Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2016-05-24igt/kms_cursor_legacy: Show basic stats of iterations per childChris Wilson
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2016-05-24igt/kms_cursor_legacy: Add uncontended cursor updatesChris Wilson
Looking at the uncontended cases reveals a major contention cliff. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2016-05-24igt/kms_cursor_legacy: Give each child a different CRTC access patternChris Wilson
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2016-05-23test: Add legacy cursor stress testChris Wilson
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>