summaryrefslogtreecommitdiff
path: root/tests
AgeCommit message (Collapse)Author
2015-12-02tests/core_setmaster_vs_auth: add test description macroThomas Wood
Signed-off-by: Thomas Wood <thomas.wood@intel.com>
2015-12-02tests/core_setmaster_vs_auth: use igt_simple_mainThomas Wood
This test has no subtests, so should use igt_simple_main. Signed-off-by: Thomas Wood <thomas.wood@intel.com>
2015-12-02tests/gem_request_retire: add test descriptionThomas Wood
Cc: Tvrtko Ursulin <tvrtko.ursulin@intel.com> Signed-off-by: Thomas Wood <thomas.wood@intel.com>
2015-12-02tests: fix ddx_intel_after_fbdev to use intel_regJani Nikula
intel_reg_dumper is gone, replaced by 'intel_reg dump'. Signed-off-by: Jani Nikula <jani.nikula@intel.com>
2015-12-01tests: Add core_setmaster_vs_auth.cDaniel Vetter
Embarrasingly I noticed that I need to git add the file when resolving the conflict and manually applying my patch. But then I added the wrong file ... Reported by Thomas Wood. Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
2015-12-01tests/pm_rpm: Don't compare edid blob IDsDaniel Vetter
The kernel is free to allocate blob ids however it wants to. And also to reallocate them whenever it sees fit. The only thing we are allowed to compare is the length and the actual date. Removing this bogus check makes drm-resources-equal on my snb. Cc: Paulo Zanoni <paulo.r.zanoni@intel.com> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=90546 Reviewed-by: Paulo Zanoni <paulo.r.zanoni@intel.com> Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
2015-12-01tests: add core_setmaster_vs_authDaniel Vetter
Tests that master state isn't leaked to new masters by checking that auth magics for the old master don't work any more. Based upon a simple test program provided by Thomas. v2: Use comment Thomas suggested on intel-gfx. Cc: Thomas Hellstrom <thellstrom@vmware.com> Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
2015-12-01tests: Rename drm_auth to core_authDaniel Vetter
It really is a core drm testcase and not a libdrm testcase. While at it also make it generic, since it is. Cc: Daniel Stone <daniels@collabora.com> Acked-by: Daniel Stone <daniels@collabora.com> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2015-11-27tests/pm_rpm tests for set_caching and set_tiling ioctl(s)Marius Vlad
v4: re-bind the gem objects each time before calling disable_all_screens_and_wait(). v3: Use smaller sizes when allocating gem objects for caching tests. v2: use mmap to gtt instead off cpu and various style-changes. Signed-off-by: Marius Vlad <marius.c.vlad@intel.com> Reviewed-by: Imre Deak <imre.deak@intel.com> Signed-off-by: Imre Deak <imre.deak@intel.com>
2015-11-27kms_frontbuffer_tracking: add tilingchange subtestPaulo Zanoni
During the review of a recent FBC patch, Ville pointed a problem that happens when we use the page flip IOCTL to switch between buffers that have different tiling formats. This test should catch the problem introduced by that patch - which was not merged, by the way, so the test should be passing. Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
2015-11-27kms_frontbuffer_tracking: assert the stride changes at stridechange()Paulo Zanoni
We use igt_create_fb(), which decides the stride by itself: there's no guarantee that making a buffer 512 pixels bigger is going to make its stride change. I had a fix for this problem that was supposed to be applied before this patch, but due to a rework request I'm changing the order of the patches, so we should expect to hit this assertion for now. At least the root cause of the problem is clear now. v2: Update the commit message due to the patch order changing. Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
2015-11-27kms_frontbuffer_tracking: expand badstride and stridechangePaulo Zanoni
Make those subtests try to change the stride using multiple APIs so we can catch errors that affect full modesets, fast modesets and page flips. Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
2015-11-27kms_frontbuffer_tracking: move flip_type to struct test_modePaulo Zanoni
Handle it just like we handle t->format. IMHO, it's better. Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
2015-11-27kms_frontbuffer_tracking: do page flips using the planes APIPaulo Zanoni
Add a new FLIP_PLANES enum so we can do "page flips" using it too. The goal is to exercise the fast modeset paths on the Kernel. Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
2015-11-27lib/igt_fb: also pass the stride to igt_create_fb_with_bo_size()Paulo Zanoni
If the caller is going to specify a custom size, it's likely that he will also specify a custom stride. The automatic stride picked by create_bo_for_fb() is too huge for tiled buffers, so if the caller wants smaller buffers, then he'll need a smaller stride too, otherwise the Kernel will reject the addfb IOCTL due to stride * height being bigger than the size. I want to make tests/kms_frontbuffer_tracking use igt_create_fb_with_bo_size() so I can provide smaller buffers that will fit into the CFB. I'm also planning to make all frontbuffers with the same width/height/format have the same stride and size regardless of tiling method so I can exercise specific code paths. Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
2015-11-27igt/gem_cs_prefetch: Convert to intel_require_memory()Chris Wilson
Replace the open-coded memory check with intel_require_memory. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2015-11-25igt/drm_read: Clear O_NONBLOCK between testsChris Wilson
Ensure that O_NONBLOCK isn't accidentally set when we want a nonblocking file descroptor. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2015-11-25tests/drm_import_export: Always loop with mutex heldMika Kuoppala
We assume that lock is held on start of the loop scope. Some paths continuing inside loop didn't adhere to this assumption, causing segfault on unlocking an already unlocked mutex. Fix this by re-aquiring lock always. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=93013 Cc: Michał Winiarski <michal.winiarski@intel.com> Cc: Thomas Wood <thomas.wood@intel.com> Signed-off-by: Mika Kuoppala <mika.kuoppala@intel.com> Reviewed-by: Michał Winiarski <michal.winiarski@intel.com>
2015-11-25igt/drm_read: Check handling of pagefault on destination bufferChris Wilson
In theory, this should force i915_gem_fault() when we first use the buffer (and not at mmap time) and so prevent a __copy_to_user_inatomic() from writting to the buffer. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2015-11-24igt/gem_request_retire: Provoke context destruction with active VMAsTvrtko Ursulin
Test designed to trigger the WARN_ON(!list_empty(&ppgtt->base.active_list)) in i915_gem_context_clean. v2: Simplify execbuf building and the test itself. Cleanup code. (Chris Wilson) v3: Removed asserts done by the helpers already. (Chris Wilson) Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com> Cc: Chris Wilson <chris@chris-wilson.co.uk> Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
2015-11-17igt/kms_rotation_crc: Add a new subtest to exhaustively test for fence leaks ↵Vivek Kasireddy
(v3) In this subtest, as a first step, MAX_FENCES+1 number of framebuffers are created backed up by objects that have multiple GGTT views (normal and rotated). Next, we have the i915 driver instantiate a normal view followed by a rotated view. We continue doing the above MAX_FENCES + 1 times. v2: - Add a igt_require() to check if there is enough GTT space left for MAX_FENCES+1 framebuffers. (Tvrtko) - Make data2 local to test_plane_rotation_exhaust_fences(). (Tvrtko) - If there is a failure, deallocate all the previously allocated framebuffers before asserting. v3: Close the gem handle if set_tiling or addfb fails. (Tvrtko) Cc: Tvrtko Ursulin <tvrtko.ursulin@intel.com> Signed-off-by: Vivek Kasireddy <vivek.kasireddy@intel.com> Reviewed-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com> Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
2015-11-16tests/kms_3d: Use XRGB8888 instead of ARGB8888Ville Syrjälä
We don't allow ARGB8888 anymore on primary planes on most platforms, so use XRGB8888 instead as the format. Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
2015-11-16tests/kms_3d: Use igt_assert_eq()Ville Syrjälä
Would be nice to see how many stereo modes we managed to extract from the EDID if it doesn't match the expected 13. So use igt_assert_eq() which prints the real count on failure. Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
2015-11-16tests/kms_addfb_basic: Add clobbered-modifier subtestVille Syrjälä
Make sure the kernel doesn't clobber the modifiers when the user didn't pass any. Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
2015-11-16tests/kms_flip: Add a note that the test was skipped when modeset failsVille Syrjälä
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
2015-11-16tests/kms_flip: Modeset pipes in reverse orderVille Syrjälä
To make more multi-pipe tests run on IVB, do the modesets in the reverse order (ie. pipe C first, pipe A last). This way pipe B can't reserve the 2 shared FDI lanes before pipe C is set up. Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
2015-11-16tests/kms_flip: Disable all pipes before each testVille Syrjälä
Currently kms_flip leaks the state of the pipes from one subtest to the next. Meaning a single pipe test can actually have two or more pipes actually up and running, and similarly a two pipe test can have three pipes running. This is particularly nasty on IVB since one of the pipes still running but not actually part of the test maybe have reserved the shared FDI lanes, thus preventing one of the pipes taking part in the test from being enabled. To avoid such problems explicitly disable all pipes before each subtests. v2: Use kmstest_unset_all_crtcs() (Paulo) Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
2015-11-16tests/kms_flip: Use human readable pipe and connector namesVille Syrjälä
Print the pipes and connectors in a human readable form instead of using the integer IDs. Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
2015-11-13tests/gem_exec_nop: Improved test run timeDerek Morton
Reduced the Sleep period to 200mS and reduced the repetition count to 7 to decrease the test run time significantly. v2: Changed uS to us v3: removed the output formatting change as the issue will be addressed in a seperate patch from Thomas Wood. v4: mS -> ms Signed-off-by: Derek Morton <derek.j.morton@intel.com> Signed-off-by: Thomas Wood <thomas.wood@intel.com>
2015-11-12tests/kms_setmode: Handle MST correctly.Maarten Lankhorst
There is a MST encoder for each crtc, and each MST connector will be connected to the encoder bound to that crtc. This breaks the kms_setmode assertion that is only 1 encoder per connector, so make an exception to that rule for displayport. Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
2015-11-12igt/gem_mmap_gtt: Require SET_TILING to work before doing large tiled testsChris Wilson
Older generations are more limited in how much they can fence, and the limits is enforced in the SET_TILING ioctl. So if it reports an EINVAL, we cannot perform the tiled test and may just skip it instead. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2015-11-11igt/gem_concurrent_all: Add testcases that split the copying across ringsChris Wilson
More inter-ring concurrency tests. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2015-11-11tests/kms_force_connector: reset connectors and edid on exitThomas Wood
Signed-off-by: Thomas Wood <thomas.wood@intel.com>
2015-11-11tests/kms_force_connector: clear forced edid in resetThomas Wood
Signed-off-by: Thomas Wood <thomas.wood@intel.com>
2015-11-11tests/kms_force_connector: use comparison macrosThomas Wood
Use the comparison macros to make debug output clearer. v2: fix incorrect comparison Signed-off-by: Thomas Wood <thomas.wood@intel.com>
2015-11-11tests/kms_force_connector: add an option to reset connector force statesThomas Wood
v2: add missing igt_exit call and fix reset_connectors definition Signed-off-by: Thomas Wood <thomas.wood@intel.com>
2015-11-11tests/kms_force_connector: skip if the required connector is connectedThomas Wood
Signed-off-by: Thomas Wood <thomas.wood@intel.com>
2015-11-11tests/kms_force_connector: free the display struct when no longer neededThomas Wood
Signed-off-by: Thomas Wood <thomas.wood@intel.com>
2015-11-11tests/kms_fbc_crc: ensure context is initialized correctlyThomas Wood
Initialization was included in commit a976d7e (tests/kms_fbc_crc: refactor context handling code), but won't be executed since it is declared before the first label within a switch statement. kms_fbc_crc.c:178:2: warning: ‘context’ may be used uninitialized in this function [-Wmaybe-uninitialized] rendercopy(batch, context, ^ kms_fbc_crc.c:271:22: note: ‘context’ was declared here drm_intel_context *context = NULL; ^ Cc: Paulo Zanoni <paulo.r.zanoni@intel.com> Signed-off-by: Thomas Wood <thomas.wood@intel.com> Reviewed-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
2015-11-11tests: remove duplicate struct member initializersThomas Wood
Signed-off-by: Thomas Wood <thomas.wood@intel.com>
2015-11-11tests: remove unnecessary igt_exit callsThomas Wood
Signed-off-by: Thomas Wood <thomas.wood@intel.com>
2015-11-11Add missing noreturn attribute to various functionsThomas Wood
Signed-off-by: Thomas Wood <thomas.wood@intel.com>
2015-11-03kms_atomic: Add basic atomic modesetting testsDaniel Stone
Add tests for KMS atomic modesetting, to exercise the basic interface and test failure/corner cases. Should ensure coherency between the legacy and atomic interfaces. v2: New patch. v3: Disable connector checking for now, as it was causing GPU hangs on newer kernels. v4: Rebase. v5: Use do_ioctl or do_ioctl_err consistently. Use igt_assert_*() helper macros rather than igt_assert() directly. Move assertions into helper/check functions. Define atomic commit helper. v6: Use do_ioctl_err, and define macros to move errors to actual callsite, rather than helper functions. Co-authored-by: Micah Fedke <micah.fedke@collabora.com> Signed-off-by: Daniel Stone <daniels@collabora.com>
2015-11-03tests/core_prop_blob: Add multiple blobs per connectionDaniel Stone
This should hit the bug fixed in: commit 8731b269f01e16193390c7276e70530366b8d626 Author: Maneet Singh <mmaneetsingh@nvidia.com> Date: Thu Oct 8 10:10:24 2015 -0400 drm: Correct arguments to list_tail_add in create blob ioctl Arguments passed to list_add_tail were reversed resulting in deletion of old blob property everytime the new one is added. Fixes commit e2f5d2ea479b9b2619965d43db70939589afe43a Author: Daniel Stone <daniels@collabora.com> Date: Fri May 22 13:34:51 2015 +0100 drm/mode: Add user blob-creation ioctl Signed-off-by: Maneet Singh <mmaneetsingh@nvidia.com> [seanpaul tweaked commit subject a little] Signed-off-by: Sean Paul <seanpaul@chromium.org> Cc: stable@kernel.org # v4.2 Reviewed-by: Daniel Stone <daniels@collabora.com> Reviewed-by: Jani Nikula <jani.nikula@intel.com> Signed-off-by: Dave Airlie <airlied@gmail.com> which was introduced with the initial blob support in: commit e2f5d2ea479b9b2619965d43db70939589afe43a Author: Daniel Stone <daniels@collabora.com> Date: Fri May 22 13:34:51 2015 +0100 drm/mode: Add user blob-creation ioctl Add an ioctl which allows users to create blob properties from supplied data. Currently this only supports modes, creating a drm_display_mode from the userspace drm_mode_modeinfo. v2: Removed size/type checks. Rebased on new patches to allow error propagation from create_blob, as well as avoiding double-allocation. Signed-off-by: Daniel Stone <daniels@collabora.com> Reviewed-by: Maarten Lankhorst <maarten.lankhorst@intel.com> Tested-by: Sean Paul <seanpaul@chromium.org> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch> Signed-off-by: Daniel Stone <daniels@collabora.com>
2015-11-03tests: Run igt.cocciDaniel Stone
Signed-off-by: Daniel Stone <daniels@collabora.com>
2015-11-03igt/gem_userptr_blits: Correct the number of objects requiredChris Wilson
Since we allocate 2 times count number of objects, that is the number of objects we should be using when checking for sufficient RAM to use for the test. References: https://bugs.freedesktop.org/show_bug.cgi?id=92799 Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2015-10-30igt/kms_rotation_crc: Add a subtest to validate Y-tiled obj + Y fb modifier (v3)Vivek Kasireddy
The main goal of this subtest is to trigger the following warning in the function i915_gem_object_get_fence(): if (WARN_ON(!obj->map_and_fenceable)) To trigger this warning, the subtest first creates a Y-tiled object and an associated framebuffer with the Y-fb modifier. Furthermore, to prevent the map_and_fenceable from being set, we make sure that the object does not have a normal VMA by refraining from rendering to the object and by setting the rotation property upfront before calling commit. v2: Do not call paint_squares and just use one output. v3: Convert an if condition to igt_require and move the plane rotation requirement further up before the fb allocation. Cc: Tvrtko Ursulin <tvrtko.ursulin@intel.com> Signed-off-by: Vivek Kasireddy <vivek.kasireddy@intel.com> Reviewed-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2015-10-23kms_frontbuffer_tracking: remove opt.only_featurePaulo Zanoni
That option is not needed anymore since: commit 982934625ac67234c6d85c6cf29a5a487e54d4f0 Author: Thomas Wood <thomas.wood@intel.com> Date: Wed Sep 16 14:36:24 2015 +0100 lib: allow wildcard matching when specifying subtests In fact, using "--run-subtest 'fbc-*'" is better than using --fbc-only due to how SKIPs are handled. In the former, only the tests matching the expression are tried, so the number of SKIPs only contains the number of tests on the specified pattern that were skipped. If you used --fbc-only, all the non-fbc tests would count as SKIPs, so it would be harder to know which of the tests marked as skipped were actual FBC tests. Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
2015-10-23kms_frontbuffer_tracking: add stridechange subtestPaulo Zanoni
This is a corner case not exercised by the other subtests. The test is expected to pass both with the current Kernel tree and with the patches that are on the mailing list. The patches currently on the mailing list change how the CFB is allocated, and this subtest is designed to make sure everything still works as expected. Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
2015-10-23kms_frontbuffer_tracking: add flag to not assert feature statusPaulo Zanoni
This will be used by the stridechange subtest. Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>