summaryrefslogtreecommitdiff
path: root/tests
AgeCommit message (Collapse)Author
2015-05-05tests/kms_fbc_crc: remove redundant information from data_tPaulo Zanoni
While it is nice to have shorter names for the most-accessed variables, it makes the code more difficult to read since it's not clear to the code reader whether that "gem_handle" is from some FB or something else. The reader also has to audit the code to see if, for example, the value of data->handle[0] stays consistent with data->fb[0].gem_handle all the tame or if at some point the value is replaced with something else. So remove the redundant information, making it explicit that we're using the gem handles and FB IDs of the framebuffers all the time. Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
2015-05-05tests/kms_fbc_crc: use igt_pipe_crc_collect_crc()Paulo Zanoni
Instead of its hardcoded implementation. Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
2015-05-05tests/kms_fbc_crc: add wait_for_fbc_enabled()Paulo Zanoni
The code has a common pattern of "wait 300ms, then check if FBC is enabled". Most of the time FBC is enabled in either 50ms or 0ms, so introduce wait_for_fbc_enabled(), which can return much earlier if FBC is actually enabled before the 300ms timeout. Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
2015-05-05lib: add igt_wait()Paulo Zanoni
Just a little helper for code that needs to wait for a certain condition to happen. It has the nice advantage that it can survive the signal helper. Despite the callers added in this patch, there is another that will go in a separate patch, and another in a new IGT test file that I plan to push later. v2: Check COND again before returning in case we hit the timeout. Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
2015-05-05tests/gen7_forcewake_mt: use local mmio variableJani Nikula
igfx_get_mmio() uses the global mmio variable by accident. Use a local variable instead. The intention is to rename the global variable later on, so shadowing it here does not matter. Signed-off-by: Jani Nikula <jani.nikula@intel.com>
2015-05-05tests: add drm_auth tests for generic DRM-auth-magic testingDavid Herrmann
This adds tests/drm_auth.c which tests for drmGetMagic() and drmAuthMagic() deficiencies. Signed-off-by: David Herrmann <dh.herrmann@gmail.com> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2015-05-04igt/gem_ctx_exec: Add lrc lite restore subtestMichel Thierry
Exercise lite-restore (re-submit a context that is currently running), by queueing several small batchbuffers. This test helps to validate WaIdleLiteRestore. Signed-off-by: Michel Thierry <michel.thierry@intel.com>
2015-05-03igt/gem_exec_lut_handle: Force slow relocation pathChris Wilson
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2015-05-01kms_rotation_crc: Do not leak framebuffers during test durationTvrtko Ursulin
Test used to call prepare_crtc twice in the plane loop and leaked two framebuffers per [subtest]x[pipe]x[plane]. What the loops really wants to do, instead of second invocation of prepare_crtc, is to just turn on the display with the unrotated fb to verify that the plane property has been restored by the VT transition from previous to graphics mode. To enable that factor out code which does that from prepare_crtc into commit_crtc and call it instead. Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com> Cc: Sonika Jindal <sonika.jindal@intel.com> Signed-off-by: Thomas Wood <thomas.wood@intel.com>
2015-04-27igt/gem_exec_big: Check 64bit relocation valuesChris Wilson
On gen8, we should check that the full 64bit relocation value is correct, and we should be sure to poison the relocation offset between runs. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2015-04-27tests/gem_mmap_gtt: Use PAGE_SIZE instead of hard coded valueJoonas Lahtinen
Now that there is PAGE_SIZE define, use it. Signed-off-by: Joonas Lahtinen <joonas.lahtinen@linux.intel.com> Signed-off-by: Thomas Wood <thomas.wood@intel.com>
2015-04-27kms_rotation_crc: Use main test for negative casesTvrtko Ursulin
Saves a good amount of code duplication by supporting expected failures from the main loop. Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com> Cc: Sonika Jindal <sonika.jindal@intel.com> Reviewed-by: Sonika Jindal <sonika.jindal@intel.com> Signed-off-by: Thomas Wood <thomas.wood@intel.com>
2015-04-27kms_rotation_crc: No need to square the buffer in paintTvrtko Ursulin
Now that size is calculated in a single place and correct geometry passed in, paint squares does not need to concern itself with it. Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com> Cc: Sonika Jindal <sonika.jindal@intel.com> Reviewed-by: Sonika Jindal <sonika.jindal@intel.com> Signed-off-by: Thomas Wood <thomas.wood@intel.com>
2015-04-27kms_rotation_crc: Consolidate plane and cursor code pathsTvrtko Ursulin
There can only be one, either a plane or a cursor, in each subtest so there is no need for two framebuffer varilables and also some codepaths can be unified. Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com> Cc: Sonika Jindal <sonika.jindal@intel.com> Reviewed-by: Sonika Jindal <sonika.jindal@intel.com> Signed-off-by: Thomas Wood <thomas.wood@intel.com>
2015-04-27kms_rotation_crc: Negative test does not need to render anythingTvrtko Ursulin
Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com> Cc: Sonika Jindal <sonika.jindal@intel.com> Reviewed-by: Sonika Jindal <sonika.jindal@intel.com> Signed-off-by: Thomas Wood <thomas.wood@intel.com>
2015-04-27kms_rotation_crc: Remove unused variable in negative testTvrtko Ursulin
Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com> Cc: Sonika Jindal <sonika.jindal@intel.com> Reviewed-by: Sonika Jindal <sonika.jindal@intel.com> Signed-off-by: Thomas Wood <thomas.wood@intel.com>
2015-04-27kms_rotation_crc: Framebuffer used for initial modeset does not need to be ↵Tvrtko Ursulin
painted It is just there to light up the display using the full modeset. Also renamed it from fb_full to fb_modeset to be more descriptive. Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com> Cc: Sonika Jindal <sonika.jindal@intel.com> Reviewed-by: Sonika Jindal <sonika.jindal@intel.com> Signed-off-by: Thomas Wood <thomas.wood@intel.com>
2015-04-27kms_rotation_crc: Local framebuffers do not need to be globalTvrtko Ursulin
Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com> Cc: Sonika Jindal <sonika.jindal@intel.com> Reviewed-by: Sonika Jindal <sonika.jindal@intel.com> Signed-off-by: Thomas Wood <thomas.wood@intel.com>
2015-04-26igt/gem_pwrite: Check that mmap(wc) succeedsChris Wilson
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2015-04-26igt/gem_pwrite: Delete unused mmap(wc) for the big CPU testChris Wilson
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2015-04-26igt/gem_pwrite: Also test surfaces larger than the GTTChris Wilson
Go big or go home! Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2015-04-26igt/gem_pwrite: Test handling of larger than mappable buffersChris Wilson
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2015-04-22kms_rotation_crc: Adding test for 90/270 rotationSonika Jindal
Adding 90/270 rotation testcase for primary and sprite planes. v2: Added position test for sprite. Checking for gen > 9 for 90/270. Some cleanup and rebase. v3: Added test for unsupported tiling and unsupported pixel format for 90/270 v4: Added the legacy commit to initiate modeset in the negative test(Tvrtko) Signed-off-by: Sonika Jindal <sonika.jindal@intel.com> Reviewed-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com> Signed-off-by: Thomas Wood <thomas.wood@intel.com>
2015-04-22tests/Android.mk : skip kms_legacy_colorkey if no cairoTim Gore
test kms_legacy_colorkey depends on cairo, so add it to the list of test not to build unless "ANDROID_HAS_CAIRO" is set. Signed-off-by: Tim Gore <tim.gore@intel.com> Signed-off-by: Thomas Wood <thomas.wood@intel.com>
2015-04-20tests/tools_test: Find tools in source or installed locationsMike Mason
Signed-off-by: Mike Mason <michael.w.mason@intel.com> Signed-off-by: Thomas Wood <thomas.wood@intel.com>
2015-04-16tests/kms_psr_sink_crc: Make render size and stride based on modified fb sizeRodrigo Vivi
Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
2015-04-16test/kms_psr_sink_crc: Add dpms off/on tests.Rodrigo Vivi
Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
2015-04-16test/kms_psr_sink_crc: Split plane setup operationsRodrigo Vivi
No functional changes. This reorg will allow to do some operations like dpms off/on with different places to wait for psr to get active. Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
2015-04-16tests/kms_psr_sink_crc: remove timeout option from wait_psr_entry.Rodrigo Vivi
No functional changes. Just making timeout unique for any case. Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
2015-04-16lib/igt_aux: Introduce igt_interactive_debug_manual_check.Rodrigo Vivi
This is an extention of igt_debug_wait_for_keypress that also can have customized message and return key pressed. v2: This is actualy a v2. V1 was an extension of original igt_debug_wait_for_keypress but it was nacked. v3: Make [Y/n] check inside aux function as suggested by Daniel. Also renaming and adding first use case along with the axu function. v4: Simplify function name and make it assert pressed key is different from n/N as suggested by Daniel. Cc: Daniel Vetter <daniel.vetter@ffwll.ch> Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
2015-04-16tests/kms_psr_sink_crc: Add manual mode.Rodrigo Vivi
Sink CRC is the most reliable way to test PSR. However in some platforms apparently auto generated packages force panel to keep calculating CRC invalidating our current sink crc check over debugfs. So, this manual test help us to find possible gaps on this platforms where we cannot trust on sink crc checks. v2: Accept Daniel's suggestions: * Avoid strcpy * don't override assert definition * Make --interactive-debug for every testcases instead using local --manual v3: Sink CRC can be unreliable for other platforms as well so let's skip and warn when we detect the misbehaviour instead hardcoded per platform. Cc: Daniel Vetter <daniel.vetter@ffwll.ch> Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
2015-04-16tests/kms_psr_sink_crc: Make plane_move visible to human eyesRodrigo Vivi
this will allow manual tests when crc isn't available. Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
2015-04-16tests/kms_psr_sink_crc: Make mmaps visible to human eyesRodrigo Vivi
this will allow manual tests when crc isn't available. Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
2015-04-16tests/kms_psr_sink_crc: Make render visible to human eyesRodrigo Vivi
This will allow manual tests when crc isn't available. v2: Remove unused and non-sense buf->size and decrease buf->stride a bit as suggested by Daniel. v3: Fix v2 mistake and get buf->size back with a value that makes more sense. TBD: to be changed for variable size depending on modified fb size on following patch Cc: Daniel Vetter <daniel.vetter@ffwll.ch> Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
2015-04-16tests/kms_psr_sink_crc: Make blt visible to human eyesRodrigo Vivi
This will allow manual tests when crc isn't available. Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
2015-04-16tests: update .gitignoreThomas Wood
Signed-off-by: Thomas Wood <thomas.wood@intel.com>
2015-04-16tests: Add kms_legacy_colorkeyVille Syrjälä
Add a quick test to make sure the legacy set colorkey ioctl only works for sprite planes. v2: Drop igt_fixtures Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
2015-04-14igt/gem_exec_lut_handle: Hide exec latencyChris Wilson
The first test tries to rewrite relocations in an active batch, which is a useful test and measurement. However, the overhead of the exec may dominate and so we want a measurement without that overhead as well. Using a pool of batches should allow for the oldest to idle whilst we setup the next (and so the wait should be non-existent). Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2015-04-14lib: load images from the data directory in igt_paint_imageThomas Wood
Update igt_paint_image so that it can read images from the package data directory. Signed-off-by: Thomas Wood <thomas.wood@intel.com>
2015-04-14lib: use a critical warning when unable to open a data fileThomas Wood
Signed-off-by: Thomas Wood <thomas.wood@intel.com>
2015-04-14i-g-t: Adding panel fitting test casechandra konduru
This patch is adding i-g-t test case to test panel fitting usages. v2: -use new tiled types when calling igt_create_fb (me) Signed-off-by: chandra konduru <chandra.konduru@intel.com> [Thomas: convert test to use igt_simple_main] Signed-off-by: Thomas Wood <thomas.wood@intel.com>
2015-04-14i-g-t: Adding plane scaling test casechandra konduru
This patch is adding i-g-t plane scaling test case to test couple basic display plane scaling usages. Additional test scenarios can be added later. v2: -Added iterative scaling to visually observe scaling (me) v3: -Added a flag to control primary plane scaling (me) v4: -Use new tiled types when calling igt_create_fb (me) Signed-off-by: chandra konduru <chandra.konduru@intel.com> [Thomas: convert test to use igt_simple_main] Signed-off-by: Thomas Wood <thomas.wood@intel.com>
2015-04-14i-g-t: Adding test case to test background color.chandra konduru
Adding i-g-t test case to test display crtc background color. v2: - Added IGT_TEST_DESCRIPTION() (Thomas Wood) - Added to .gitignore (Thomas Wood) - Added additional details to function header (Thomas Wood) - Simplified igt_main (Thomas Wood) v3: - rebased to latest master (me) - took sleep calls out (Daniel) - use new tiled types when calling igt_create_fb (me) Signed-off-by: chandra konduru <chandra.konduru@intel.com> [Thomas: convert test to use igt_simple_main] Signed-off-by: Thomas Wood <thomas.wood@intel.com>
2015-04-14tests/gem_mmap_gtt: add huge BO testJoonas Lahtinen
Add a straightforward test that allocates a BO that is bigger than (by 1 page currently) the mappable aperture, tests mmap access to it by CPU directly and through GTT in sequence. Currently it is expected for the GTT access to gracefully fail as all objects are attempted to get pinned to GTT completely for mmap access. Once the partial view support is merged to kernel, the test should pass for all parts. v2: - Corrected BO domain handling (Chris Wilson) - Check again after GTT access for added paranoia (Chris Wilson) v3: - Avoid flush by using pread (Chris Wilson) - Free gtt_pattern buffer too. v4: - Add more comments (Tvrtko Ursulin) - Use igt_require (Tvrtko Ursulin) v5: - Remove wrong message from igt_require_f (Tvrtko Ursulin) - After digging deeper to it, just igt_assert that the CPU mapping needs to succeed. Cc: Tvrtko Ursulin <tvrtko.ursulin@linux.intel.com> Cc: Chris Wilson <chris@chris-wilson.co.uk> Signed-off-by: Joonas Lahtinen <joonas.lahtinen@linux.intel.com> Reviewed-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com> [Thomas: remove unused label] Signed-off-by: Thomas Wood <thomas.wood@intel.com>
2015-04-14tests/gem_mmap_gtt: clarify BO domain setting functionsJoonas Lahtinen
Add suffix and complementary function for CPU domain. v2: - Change function signatures to be consistent with the rest Signed-off-by: Joonas Lahtinen <joonas.lahtinen@linux.intel.com> Signed-off-by: Thomas Wood <thomas.wood@intel.com>
2015-04-14tests: install the test listThomas Wood
Cc: Joonas Lahtinen <joonas.lahtinen@linux.intel.com> Signed-off-by: Thomas Wood <thomas.wood@intel.com>
2015-04-14tests: create a single combined test listThomas Wood
All tests now respond in a consistent way such that separate lists for tests with and without subtests are no longer necessary. v2: fix other references to the test list Signed-off-by: Thomas Wood <thomas.wood@intel.com>
2015-04-14lib: add a define for test failure exit statusThomas Wood
Signed-off-by: Thomas Wood <thomas.wood@intel.com>
2015-04-13igt/prime_self_import: Ensure driver state is consistent between countsChris Wilson
Similar to gem_flink_race, we need to make sure that when we count objects, the driver is in an identical state. We do this by flushing all work before counting. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=90003 Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2015-04-12igt/gem_flink_race: Explicitly quiesce the GPU before counting objectsChris Wilson
By explicitly quiescing the GPU we force it to a known and ideally identical state when counting objects. In particular, this should make the batch-pool status the same and not cause us to detect a negative leak. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>