summaryrefslogtreecommitdiff
path: root/tests/kms_cursor_crc.c
AgeCommit message (Collapse)Author
2017-01-05kms_cursor_crc: 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-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>
2015-10-16kms_cursor_crc: Add test for unthrottled cursor movementMatt Roper
We've had bugs in the past that caused cursor updates to be synced to vblank, resulting in sluggish cursor movement. Add a test to try to make sure we don't regress and reintroduce these bugs. Cc: kalyan.kondapally@intel.com Signed-off-by: Matt Roper <matthew.d.roper@intel.com> Signed-off-by: Thomas Wood <thomas.wood@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-05-11kms_cursor_crc: Move comment to the appropriate placeDamien Lespiau
Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
2015-03-23tests/kms_cursor_crc: Add dpms and suspend testsDaniel Vetter
There was some confusion about whether we restore cursors correctly after dpms and suspend/resume. Apparently we still do! 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-23lib/core: add interactive debug point to igt_failDaniel Vetter
Useful for inspecting the screen state in kms tests when they fail. Also move the screen clearing in kms_cursor_crc to the bottom. 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-03-06igt.cocci: Replace igt_assert() with igt_assert_CMP() where possibleMatt Roper
The integer comparison macros give us better error output by including the actual values that failed the comparison. Signed-off-by: Matt Roper <matthew.d.roper@intel.com> Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
2015-02-10kms_cursor_crc: Kernel now checks for integer overflowMatt Roper
As of kernel commit commit a679064a7e9e8799177a64a31668a34a1bc6a4f1 Author: Matt Roper <matthew.d.roper@intel.com> Date: Fri Jan 30 16:22:37 2015 -0800 drm/i915: Switch planes from transitional helpers to full atomic helpers the kernel now checks for cursor coordinates that would result in integer overflow and returns -ERANGE, similar to the checking that was already done for other plane types. We update kms_cursor_crc here to reflect this small behavior change: * Check for success at extreme boundary conditions INT_MAX-{width,height} rather than INT_MAX * Add new check for success at SHRT_MAX; if the driver were to internally use short values and overflow, we could have the cursor reappear on the screen. * Add a test for failure with proper error code at INT_MAX-{width,height}+1 Signed-off-by: Matt Roper <matthew.d.roper@intel.com>
2014-12-09tests/kms_cursor_crc: Restore the valid pipe/connector combo checkVille Syrjälä
The valid pipe/connector combo check was lost in commit 57259d714d3fe1170cf931af72648219856a9918 Author: Daniel Vetter <daniel.vetter@ffwll.ch> Date: Mon Nov 24 16:08:32 2014 +0100 lib/igt_debugfs: Don't setup crc in _new Restore it to make the test again useful on CHV. Cc: Daniel Vetter <daniel.vetter@ffwll.ch> Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
2014-12-09kms_cursor_crc: Remove value to 'return' in a void functionDamien Lespiau
Signed-off-by: Damien Lespiau <damien.lespiau@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-11-06docs: add some test descriptionsThomas Wood
Signed-off-by: Thomas Wood <thomas.wood@intel.com>
2014-10-17tests/kms_cursor_crc: HSW/BDW only have square cursorsPaulo Zanoni
When I look at cursor_size_ok() (from the Kernel's intel_display.c), I see that only 845g and i865g support non-square cursors, so SKIP the tests on HSW/BDW instead of failing them. This problem happened because support for non-square cursors was being developed for HSW/BDW, but it ended up not being merged due to a small problem and priority changes. Let's make those tests SKIP until we have proper support on the Kernel: after that, we can revert this patch. v2: Improve commit message. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=84268 Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
2014-09-30lib: add a function to indicate activityThomas Wood
Signed-off-by: Thomas Wood <thomas.wood@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-09-26kms_cursor_crc: Remove two unused local variablesDamien Lespiau
Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
2014-09-18tests/kms_cursor_crc: Add basic non-square cursor testingVille Syrjälä
To minimally verify that non-square cursors work on the platforms where they're supported perform the tests first with WxH cursor and then repeat with WxH/3 cursor. Signed-off-by: Ville Syrjälä <ville.syrjala@linux.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_cursor_crc: Use I915_TILING_NONE to create fbsDamien 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-08-12tests/kms_cursor_crc: Align opening {Daniel Vetter
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2014-07-11lib/igt.cocci: Add stanza for for_each_pipeDaniel Vetter
Damien dodged this ... Also run the script while at it. v2: Don't just capture identifiers for pipe, but also expressions. Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2014-07-04tests/kms_cursor_crc: Call drmModeMoveCursor() directlyMatt Roper
We're calling drmModeSetCursor() to change the cursor image and never actually doing a display commit (aside from when we display the cursor), so call the move ioctl directly rather than igt_plane_set_position() to ensure the changes actually take effect. Signed-off-by: Matt Roper <matthew.d.roper@intel.com> Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
2014-07-04tests/kms_cursor_crc: Combine data_t and test_data_tMatt Roper
If a subtest fails, cleanup_crtc() never gets called and then the test_data_t structure for the test is lost, including the CRC file descriptor that we never got a chance to release; this causes all subsequent tests to fail with -EBUSY at igt_pipe_crc_new(). The split between permanent data_t and temporary test_data_t doesn't seem to serve a purpose, so just combine the fields from both into data_t. This will prevent us from losing the CRC filedescriptor so that we can properly close and reopen it after a failed test. Signed-off-by: Matt Roper <matthew.d.roper@intel.com> Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
2014-06-02kms_cursor_crc: Test cursor size change ioctlAntti Koskipaa
Now that we support cursor changes other than 64x64, a bug was found where the size change was only applied at cursor enable time, rather than at every update. Add a testcase for that. Signed-off-by: Antti Koskipaa <antti.koskipaa@linux.intel.com> 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>
2014-04-25kms_cursor_crc: Fix the test on platforms where the pipe->port mapping has ↵Ville Syrjälä
restrictions On gen2 for instance the LVDS port can only be fed from pipe B. Check whether the combinations is valid before trying to run the test. Also clean up the state back to PIPE_ANY properly so that following tests can again go through all the combinations. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=75131 Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
2014-04-25kms_cursor_crc: Wrap igt_require() in igt_fixtureVille Syrjälä
igt_require() must be within a fixture or subtest. Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
2014-04-25kms_cursor_crc: Replace snprintf()+%s with just %dVille Syrjälä
There's no point in first printing the int to temp string using %d and then printing that out with %s. Just stick the %d into the final string. Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
2014-04-25kms_cursor_crc: Allow the test to run without cursor cap supportVille Syrjälä
Assume that only 64x64 cursor size is supported if the cursor size caps aren't supported by the kernel. This allows the test to run on older kernels. Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
2014-04-25kms_cursor_crc: Wrap cursor fb creating into igt_fixtureVille Syrjälä
We don't want to attempt creating the cursor fb when enumerating subtests. So wrap it into igt_fixture. Also destroy the cursor fb after the tests. Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
2014-04-25kms_cursor_crc: Simplify the pipe_crc messVille Syrjälä
Instead of allocating an array of igt_pipe_ctc_t objects, just allocate one and stick it into test_data. Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
2014-04-25kms_cursor_crc: Add background pictureAntti Koskipaa
This gives the cursor something to be on, instead of just a black background. Slows the test down only one second over six minutes. Signed-off-by: Antti Koskipaa <antti.koskipaa@linux.intel.com>
2014-04-25kms_cursor_crc: Add random cursor placement testAntti Koskipaa
Signed-off-by: Antti Koskipaa <antti.koskipaa@linux.intel.com>
2014-04-25kms_cursor_crc: Add moving cursor testAntti Koskipaa
Signed-off-by: Antti Koskipaa <antti.koskipaa@linux.intel.com>
2014-04-25kms_cursor_crc: Add reference software renderingAntti Koskipaa
This patch first render the cursor with hardware rendering and then with software, acquiring the CRC in both cases so they can be properly compared. Say goodbye to crc_must_match variable. Signed-off-by: Antti Koskipaa <antti.koskipaa@linux.intel.com>
2014-04-25kms_cursor_crc: Separate onscreen and offscreen testsAntti Koskipaa
Also remove onscreen boolean from parameter list. All test-related data should be put into test_data from now. Signed-off-by: Antti Koskipaa <antti.koskipaa@linux.intel.com>
2014-04-25kms_cursor_crc: Use a function pointer to call testAntti Koskipaa
More tests are coming, and this allows us to not repeat the boilerplate code in run_test() for each subtest. Signed-off-by: Antti Koskipaa <antti.koskipaa@linux.intel.com>
2014-04-25kms_cursor_crc: Move cursor enable and disable calls where they belongAntti Koskipaa
We can't have the hw cursor enabled during software render tests. Signed-off-by: Antti Koskipaa <antti.koskipaa@linux.intel.com> [vsyrjala: collect the crc before disalbing the cursor] Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
2014-04-25kms_cursor_crc: Remove some test cases and change cursor to colorAntti Koskipaa
Currently this test is quite useless, since it only checks for valid CRCs when the correct output from a test is a completely black screen (invisible or visible but black cursor, or cursor is offscreen) and disables the check when anything visible is onscreen. This patch changes the cursor to a colorful one and removes the test cases that become redundant because of this change. The cursor is designed to be asymmetrical such that future tests involving rotation, mirroring, etc. produce different CRCs and failures can be detected. This (temporarily) disables CRC testing until the next patch which will add software rendering of the cursor and the CRC generation. Signed-off-by: Antti Koskipaa <antti.koskipaa@linux.intel.com>
2014-03-26lib/igt_fb: switch to igt_ prefix from kmstest_Daniel Vetter
Shorter and more in line with our general igt_ prefix for everything which isn't somehow intel or i915-gem or otherwise hw specific - these helpers here are all fully generic framebuffer handling functions based on kms + cairo. Well, the actual buffer alloc is done with i915 gem, but meh ;-) Two special cases: - bpp_depth_to_drm_format and drm_format_to_bpp completely lacked prefixes, so just add igt_. - write_fb was a bit misleading given that we have gem_write for uploading to buffers. Rename that to write_fb_to_png to make it crystal clear what this thing does even without looking at docs. Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2014-03-26lib/igt_kms: s/kmstest_create_fb2/kmstest_create_fb/Daniel Vetter
Simplify the name since the old _fb function is now gone. Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2014-03-26lib: remove kmstest_create_fbDaniel Vetter
Use the new-style function using drm fourcc codes instead everywhere. To easily use thew fourcc based interface also expose bpp_depth_to_drm_format from the library. Finally include drm_fourcc.h from the igt_kms.h header since pretty much everyone needs this now. Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2014-03-22lib: more unecessary header removalDaniel Vetter
This time big with media_fill.h Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2014-03-22tests/kms_cursor_crc: Fix up breakageDaniel Vetter
I've accidentally broken the new cursor size extensions, but it wasn't quite correct before already: Variables which are set in igt_fixtures _must_ be outside of the stackframe of the igt_fixture block. Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>