summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2014-08-26lib: Use igt macros moreDaniel Vetter
Stragglers. Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2014-08-26lib/igt_* Use igt macros in igt libariesDaniel Vetter
Except in igt_core since that would lead to some hilarious recursions. v2: Don't fflush any more, spotted by Chris. Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2014-08-26lib/intel_* Use igt checks and macrosDaniel Vetter
Various stuff all over. Most done with the igt.cocci spatch, but with a few fixups by hand. And add igt_core.h includes where needed. Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2014-08-26lib/rendercopy*: Use igt_assertDaniel Vetter
2014-08-26kms_rotation_crc: Calling commit2 instead of legacy commitSonika Jindal
Since planes are universal now, using commit2 so that drmModeSetPlane can be called for primary plane as well instead of drmModeSetCrtc. drmModeSetPlane will update the x,y,w,h for the plane. Cc: Damien Lespiau <damien.lespiau@intel.com> Signed-off-by: Sonika Jindal <sonika.jindal@intel.com> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2014-08-26Merge two subtests for pm_rc6_residency IGT caseWendy Wang
Combine two subtests(rc6_residency_check and rc6_residency_counter) into one subtest(residency_accuracy) Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2014-08-21lib/fb: Assert, instead of silently failing, when creating fbsDamien Lespiau
We were either returning 0, or a negative value cast to an unsigned int for errors and the clients of that API weren't exactly checking anything. We're in luck, we can take shortcuts in a testing library to just assert when an expected error occurs. Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
2014-08-21lib/fb: Replace straight igt_fail() by asserts with debug messagesDamien Lespiau
Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
2014-08-21testdisplay: Make the desired tiling mode an unsigned intDamien Lespiau
We may be able to scan out more tiling formats in the future. Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
2014-08-21pm_rpm: Adjust to the new igt_create*fb() APIDamien Lespiau
Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
2014-08-21pm_lpsp: Adjust to the new igt_create.*fb() APIDamien Lespiau
Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
2014-08-21kms_sink_crc_basic: Adjust to the new igt_create.*fb() APIDamien Lespiau
Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
2014-08-21kms_setmode: Adjust to the igt_create.*fb() APIDamien Lespiau
Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
2014-08-21kms_render: Adjust to the new igt_create.*fb() APIDamien Lespiau
Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
2014-08-21kms_psr_sink_crc: Adjust to the new igt_create.*fb() APIDamien Lespiau
Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
2014-08-21kms_plane: Adjust to the new igt_create.*fb() APIDamien Lespiau
Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
2014-08-21kms_pipe_crc_basic: Adjust to the new igt_create.*fb() APIDamien Lespiau
Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
2014-08-21kms_mmio_vs_cs_flip: Adjust to the new igt_create_.*fb() APIDamien Lespiau
Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
2014-08-21kms_flip_tiling: Adjust to the new igt_create_.*fb() APIDamien Lespiau
Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
2014-08-21kms_flip: Adjust to the new igt_create_fb*() APIDamien Lespiau
Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
2014-08-21kms_fence_pin_leak: Use I915_TILING_X to create fbsDamien Lespiau
Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
2014-08-21kms_fbc_crc: Use I915_TILING_X to create fbsDamien Lespiau
Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
2014-08-21kms_cursor_crc: Use I915_TILING_NONE to create fbsDamien Lespiau
Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
2014-08-21lib: Change the fb creation functions to take fully qualified tiling formatsDamien Lespiau
In the future, we'll need more than X tiling here. So give a full enum instead of bool meaning X-tiled. It's fine to do this change without updating the users just yet as 'true' happens to be I915_TILING_X. Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
2014-08-19tests: Fix seg fault when gem_mmap is run without specifying a subtestMike Mason
gem_mmap seg faults when all tests are run together. This occurs because the new-object subtest closes the gem object, but short-mmap assumes it still exists. Thus gem_mmap__cpu() returns nil for addr and memset() seg faults. This patch makes new-object and short-mmap create and close their own gem objects. Signed-off-by: Mike Mason <michael.w.mason@intel.com> Signed-off-by: Thomas Wood <thomas.wood@intel.com>
2014-08-19scripts: Allow multiple -t and -x regular expressions for run-tests.shMike Mason
Piglit allows multiple -t and -x regular expressions to be given on the command line. This patch enables run-tests.sh to support that as well. Signed-off-by: Mike Mason <michael.w.mason@intel.com> Signed-off-by: Thomas Wood <thomas.wood@intel.com>
2014-08-18intel-gpu-tools: skip kms_flip_event_leak unless we have cairoTim Gore
kms_flip_event_leak depends on cairo, so add it to the list of tests to skip (in Android.mk) if ANDROID_HAS_CAIRO is not set to 1. Signed-off-by: Tim Gore <tim.gore@intel.com> Signed-off-by: Thomas Wood <thomas.wood@intel.com>
2014-08-18Add kms_flip_event_leak to .gitignoreMike Mason
This patch just adds kms_flip_event_leak to tests/.gitignore. Signed-off-by: Mike Mason <michael.w.mason@intel.com> Signed-off-by: Thomas Wood <thomas.wood@intel.com>
2014-08-14tests: check plane rotation is reset after the VT mode is restoredThomas Wood
Make sure the rotation is reset after the VT mode is restored by collecting the unrotated CRC and comparing with the CRC value after VT mode has been restored. The CRC is used to ensure the hardware state is checked, rather than any software state. References: https://bugs.freedesktop.org/show_bug.cgi?id=82236 Signed-off-by: Thomas Wood <thomas.wood@intel.com>
2014-08-14lib: add igt_restore_vt_modeThomas Wood
Add a function to restore the previous VT mode after igt_set_vt_graphics_mode is called. Signed-off-by: Thomas Wood <thomas.wood@intel.com>
2014-08-12lib/igt_kms: doc for the remaining kmstest_ functionsDaniel Vetter
Plus a bit an overview section explaining the split in the library - a few people (everyone except me it seems) didn't really understand it. v2: Fix typo'ed s/kmstest_set_vt_graphics_mode/kmstest_get_pipe_from_crtc_id/ in a doc comment spotted by Imre. Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2014-08-12lib/igt_kms: Simplify return value of kmstest_get_connector_configDaniel Vetter
A plain bool is enough. Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2014-08-12lib/igt_kms: Simplify return value of kmstest_get_connector_default_modeDaniel Vetter
A plain bool is good enough, no need for fancy negative error values. Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2014-08-12lib/igt_kms: Shuffle kmtests_ functionsDaniel Vetter
Group them a bit both in the header and .c file, and make sure they appear in the same order in both. Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
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: doc for type2str functionsDaniel Vetter
Also shuffle things around a bit to make sure the order in the header matches the order in the .c file. Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2014-08-12lib/igt_kms: Clean up the other _name functions/macrosDaniel Vetter
And remove sprite_name, redundant and won't work due to lack of dev_priv. 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-08-12igt/gem_cpu_reloc: Update the memory requirementsChris Wilson
Use intel_check_memory() for accuracy and beautification Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-08-11tests: Add kms_flip_event_leak testVille Syrjälä
kms_flip_event_leak will issue a page flip and close the file descriptor before the flip has finished. This may cause the kernel to leak the page flip event. The test itself won't actually fail but if the kernel notices the leak and WARNs piglit will report a failure. Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
2014-08-08tests/pm_rpm: refactor the modesetting codePaulo Zanoni
Refactor the code so the params for the modesets are always stored and don't have to be recomputed every time. With this, we can get rid of our FB caching structures, and we now also allow the subtests that do special modesets to reuse the parameters used on the default modesets, just changing whatever they want. The biggest win here is that the test case subfunctions get smaller and simpler to read and write. Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
2014-08-08tests/pm_rpm: add disable_or_dpms_all_screens()Paulo Zanoni
And its and_wait() version. The goal is to extract common code patterns into functions/macros, so the code for the test cases gets easier to read and write. Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
2014-08-08tests/pm_rpm: add macros to disable/enable screens and waitPaulo Zanoni
This should make the test case functions better to read and write. Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
2014-08-08tests/pm_rpm: add wait_for_suspended() calls to test_one_planePaulo Zanoni
Make sure we do all operations while really runtime suspended, so we can actually test things. Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
2014-08-07tests/pm_rpm: add subtests for fencesPaulo Zanoni
Daniel thought fences were not surviving runtime PM on DPMS, so we wrote this test to check. The good news is that the test passed, so there's no need for a Kernel patch, at least on the Kernel I tested. Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
2014-08-07igt_kms: add kmstest_unset_all_crtcs()Paulo Zanoni
Both pm_rpm.c and pm_lpsp.c call it "disable_all_screens", but let's give it a name that better describes what the implementation does. v2: Rename to kmstest_unset_all_crtcs (Daniel). Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
2014-08-07tests/pm_rpm: use kmstest_get_property()Paulo Zanoni
So we can reduce the code size. v2: Rebase after the rename to kmstest_get_property. Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
2014-08-07igt_kms: document and export kmstest_get_property()Paulo Zanoni
So we can use it on pm_rpm.c. v2: Rename to kmstest_get_property (Daniel) Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
2014-08-07igt_kms: optionally return the property from get_propertyPaulo Zanoni
So we can use this function on places that also need the property pointer, without having to call drmModeGetProperty() again with the returned id. Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>