summaryrefslogtreecommitdiff
path: root/tests
AgeCommit message (Collapse)AuthorFilesLines
2014-10-02tests: Sprinkle missing igt_exit() where needed.prtsDaniel Vetter18-25/+18
Yay for breaking piles of tests. Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
2014-09-30lib: add a function to indicate activityThomas Wood3-4/+5
Signed-off-by: Thomas Wood <thomas.wood@intel.com>
2014-09-30tests/sysfs_l3_parity: fix warnings in test enumerationThomas Wood1-3/+3
Source drm_lib.sh before skipping the test to ensure that subtest enumeration is always handled correctly. Signed-off-by: Thomas Wood <thomas.wood@intel.com>
2014-09-30test/kms, pm: use drm_open_any_masterImre Deak19-19/+19
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-30tests/pm_rpm: factor out drm_open_any_masterImre Deak1-5/+1
Signed-off-by: Imre Deak <imre.deak@intel.com>
2014-09-29tests/gem_wait: argument validation testsDaniel Vetter1-0/+36
Shockingly we don't check for 0 flags! Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
2014-09-29tests/gem_wait_render_timeout: Convert to subtestsDaniel Vetter3-6/+19
I want to add a bunch of api tests besides the functional "render-timeout" testcase. Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
2014-09-29tests/gem_wait_render_timeout: Drop local structsDaniel Vetter1-13/+2
We're long past the point where libdrm has these. Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
2014-09-29lib/igt_core: make single/simple tests use igt_exitTim Gore1-1/+1
Currently tests that use igt_simple_main will simply call "exit()" if they pass, making it difficult to ensure that any required cleanup is done. At present this is not an issue, but it will be when I submit a patch to turn off the lowmemorykiller for all tests. Signed-off-by: Tim Gore <tim.gore@intel.com> [danvet: Also update api docs.] Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
2014-09-26kms_cursor_crc: Remove two unused local variablesDamien Lespiau1-2/+0
Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
2014-09-26igt/gem_userptr_blits: Test interruptible create-destroyChris Wilson1-10/+24
In order to exercise https://bugs.freedesktop.org/show_bug.cgi?id=84207 we need to interrupt the mmu_notifier_register with a signal. This is likely to be quite difficult, but let's just try running the create-destroy test in an interruptible loop for 5s. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-09-26igt/gem_concurrent_blit: Only read back a few GTT valuesChris Wilson1-7/+6
Due to the nature of the test, we can be reasonably sure that it is either all copied or not. So we can sacrificing testing the entire buffer for the expected value in order to speed up the test by only testing along the diagonal. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=84354 Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-09-24tests/kms_psr_sink_crc: Use optionsDaniel Vetter1-6/+24
Env variables are a bit more annoying since much harder to discover. With options you can just see what they do with --help. Cc: Rodrigo Vivi <rodrigo.vivi@intel.com> Reviewed-by: Rodrigo Vivi <rodrigo.vivi@intel.com> Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
2014-09-19igt/gem_reloc_vs_gpu: Fix reloc.presumed_offset valueChris Wilson1-52/+15
Since the last patched value does not match the presumed relocation value we submit to the kernel, it occasionally makes mistakes. Also note that the libdrm interface makes the same presumptive mistake, and would easily be broken by a threaded environment. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=77793 Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-09-19tests/drm_import_export: Add subtest for primeDaniel Vetter1-28/+62
Cc: Rafal Sapala <rafal.a.sapala@intel.com> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2014-09-18tests: Add drm_import_exportDaniel Vetter4-0/+149
Multithreaded test to validate the (lack of) locking in the flink/open code in libdrm-intel. Based on a testcase from Rafel Sapala. Cc: Rafal Sapala <rafal.a.sapala@intel.com> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2014-09-18tests/kms_cursor_crc: Add basic non-square cursor testingVille Syrjälä1-30/+100
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-09-16igt/pm_rps: Fix STORE_DWORD for pre-gen8Chris Wilson1-3/+2
gen8 actually changed the command layout, not just extended the relocation value. Oh well. References: https://bugs.freedesktop.org/show_bug.cgi?id=83915 Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-09-12igt/kms_render: Iterate only through the formatsChris Wilson1-1/+1
When testing each format, iterate through the formats and not randomly through the modes. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=83788 Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-09-12igt/gem_userptr_blits: GTT mmaping a userptr requires llcChris Wilson1-0/+3
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=83790 Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-09-12igt/pm_rps: Fix the batch count for emitting the flushChris Wilson1-1/+1
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=81858#c2 Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-09-11tests: Kill pm_psrRodrigo Vivi2-87/+0
kms_psr_sink_crc check psr activity, residency and exit for screen updates. So this test is useless. Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
2014-09-11tests/kms_psr_sink_crc: Wait 2 vblanks before grabing the new crc.Rodrigo Vivi1-1/+4
Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
2014-09-11tests/kms_psr_sink_crc: Fix blt submissionRodrigo Vivi1-0/+1
Putting back a missing dword. Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
2014-09-11tests/kms_psr_sink_crc: Check color ref CRCRodrigo Vivi1-0/+47
Black screen is forbidden on this test. So let's fail if sink crc shows it is back. Also there are many cases where we know for shure it should be all green, so let's check for them. Instead of checking colors we could print with sw using cairo and check if we have identical crc like cursor testcases. However with PSR the chance of artifacts is low and chance of getting blank screen or unchanged screen is high. So even drawing on sw and comparing both CRCs we can have the same result. However the risk is that screen never changed. So the safest way is to compare if screen changed and check the green color when we know it should be green or not green. v2: Hardcoded green was simply wrong because green CRC can change depending on display.Split R, G and B on CRC and bitewise them with mask to verify it is green. Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
2014-09-11tests/kms_psr_sink_crc: Fix all testcases.Rodrigo Vivi1-168/+101
In order to get all test cases fixed and the matrix planes-operations working it was needed to use the common new igt kms functions for all cases. Previously only sprite testcase was using it. Fixed the fb colors in a way to make tests more clear and be impossible to see black screen during the tests. Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
2014-09-11tests/kms_psr_sink_crc: Start splitting tests in test_planes and operations.Rodrigo Vivi1-40/+68
This will allow us to test input/write oprations on any kind of plane. At this point PLANE_ONOF is just the new name of TEST_SPRITE and PLANE_MOVE is the one for TEST_CURSOR_MOVE. They will be extended and fixed on the following patche(s). v2: fix conflict after changing previous patch Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
2014-09-11tests/kms_psr_sink_crc: Cleaning up tests a bitRodrigo Vivi1-67/+0
This is needed to be able to split tests in a matrix that tests different input/write methods and operations for different type of planes. Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
2014-09-11tests/kms_psr_sink_crc: Removing context tests.Rodrigo Vivi1-66/+3
This tests are unecessary. Mainly now with the software tracking for PSR. Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
2014-09-11tests/kms_psr_sink_crc: Adding test debug optionsRodrigo Vivi1-4/+25
Just to make life easier and be eable to easily test with PSR disabled to know exactly what to expect when running it for real v3: Use igt_debug helpers and add env option for running with psr disabled on this test without have to recompile like v1 or changing igt infrastructure like v2. I tried to add --disable-psr or local --dry-run but than it fails to print subtests so this was the safest way. Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
2014-09-11tests/kms_psr_sink_crc: Fix edp_psr debugfs interfaceRodrigo Vivi1-10/+17
Tests were broken on platforms that doesn't have psr or on new kernel that contains new interface. A lot more need to be done to get these tests really useful, but for now lets avoid it breaking tests framework. v2: Doesn't duplicate kernel's HAS_PSR. skip based on debugfs output. Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
2014-09-11tests/kms_sink_crc_basic: Wait 2 vblanks before grabing the new crc.Rodrigo Vivi1-5/+11
Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
2014-09-11tests/kms_sink_crc_basic: Simplify test by using igt_kms functionsRodrigo Vivi1-93/+82
v2: sink CRC R, G and B might change depending on display. So let's split the colors and bitwise them. Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
2014-09-09igt/gem_ppgtt: Create secondary contexts and mmChris Wilson1-5/+32
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-09-09test: Exercise full ppgtt switching between multiple fdChris Wilson3-0/+210
Load up both rings with lots of fighting between multiple contexts. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-09-08igt/gem_cpu_reloc: Terminate the bad batchChris Wilson1-0/+3
gen2 will read the batch up until it reaches the end as defined by the MI_BATCH_BUFFER_END command. Play nice and make sure that it does end on a MI_BB_END. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-09-08igt/kms_flip_tiling: Use the associated pipe for the outputChris Wilson1-2/+2
This stops us from using an illegal pipe, such as pipe 0 for LVDS on PNV. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=82280 Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-09-08igt/gem_mmap_gtt: Check coherency between GTT and CPU mmappings with LLCChris Wilson1-0/+27
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-09-06igt/kms_universal_plane: Only test existing planesChris Wilson1-1/+3
Only attempt to test the number of planes that exist on the device so as not to trigger spurious failures. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=82233 Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-09-06igt/drv_missed_irq_hang: Increase busy loadChris Wilson1-6/+9
The test relies on having to wait upon the GPU at some point and so simulating a missed interrupt. If there is insufficient load on the GPU, we can complete the task before we even wait. References: https://bugs.freedesktop.org/show_bug.cgi?id=71334 Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-09-05tests/kms_3d: skip if connectors cannot be forcedThomas Wood1-1/+2
Signed-off-by: Thomas Wood <thomas.wood@intel.com>
2014-09-05tests: add kms_3d testThomas Wood4-0/+123
Add a test to verify creation and use of 3D stereo modes. v2: update for API changes Signed-off-by: Thomas Wood <thomas.wood@intel.com>
2014-09-05lib: move create_stereo_fb from testdisplay to igt_fbThomas Wood1-115/+3
Move create_stereo_fb from testdisplay to igt_create_stereo_fb in igt_fb so that it can be used in other tests. v2: update for new igt_create_fb API add parameters for format and tiling remove some old debug code Signed-off-by: Thomas Wood <thomas.wood@intel.com>
2014-09-05lib: Add MI_LOAD_REGISTER_IMMMika Kuoppala3-7/+3
Signed-off-by: Mika Kuoppala <mika.kuoppala@intel.com>
2014-09-03igt/gem_concurrent_blit: Move igt_require() out of childrenChris Wilson1-6/+21
Otherwise the test infrastructure throws a fit. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=83420 Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-09-03igt/gem_gtt_hog: Convert opencoded fork()/wait() over to igt_fork()Chris Wilson1-17/+4
No reason not to use the common infrastructure here. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-09-03gem_workarounds: intel_wa_registers is now prefixed with i915Damien Lespiau1-1/+1
Signed-off-by: Damien Lespiau <damien.lespiau@intel.com> Reviewed-by: Arun Siluvery <arun.siluvery@linux.intel.com> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2014-08-31igt/gem_concurrent_blit: Use the preallocated dummy bo for temporary copiesChris Wilson1-30/+19
Use the existing allocation, saves having to make fresh allocations in the innermost loop - trimming code and potential failure paths. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-08-30batch: Specify number of relocations to accommodateChris Wilson38-139/+121
Since relocations are variable size, depending upon generation, it is easier to handle the resizing of the batch request inside the BEGIN_BATCH macro. This still leaves us with having to resize commands in a few places - which still need adaption for gen8+. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-08-29igt/gem_seqno_wrap: Use debugfs singletonChris Wilson1-19/+3
This has the added advantage of automounting debugfs for us. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>