1471 Commits

Author SHA1 Message Date
Damien Lespiau
303fe742fc skl_ddb_allocation: Make 'end' exclusive in the DDB allocation entry
Ville suggested that we should use the same semantics as C arrays to
reduce the number of those pesky +1/-1 in the allocation code.

Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
2014-10-15 22:49:24 +01:00
Damien Lespiau
f951943055 skl_ddb_allocation: Add checks on the DDB entries
Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
2014-10-15 22:49:24 +01:00
Damien Lespiau
69a465d22a skl_ddb_allocation: Add a standalone version of the DDB allocator
This is useful to debug the allocation algorithm.

Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
2014-10-15 22:49:24 +01:00
Thomas Wood
e11b7100c9 tests/kms_force_connect: skip if a VGA connector is not available
v2: rename "connector" to "vga_connector" to improve the skip message
    (Chris Wilson)

Suggested-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
Signed-off-by: Thomas Wood <thomas.wood@intel.com>
2014-10-15 11:01:37 +01:00
Thomas Wood
5209ec142d tests/kms_force_connector: ensure igt_exit is called at exit
Since commit 5782eca (lib/igt_core.c: disable lowmemorykiller during
tests), igt_exit needs to be called before the test exits.

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=84771
Cc: Tim Gore <tim.gore@intel.com>
Signed-off-by: Thomas Wood <thomas.wood@intel.com>
2014-10-15 11:01:37 +01:00
Rodrigo Vivi
5c7d54eae5 tests/pm_rc6_residency: Split RC6p and RC6pp.
sysfs interface for rc6 has been changed to only expose deep RC6 file to the platorms
that really support them, aka SNB and IVB.

So let's split this test and only test RC6p and RC6pp on these platforms.

Reference: https://bugs.freedesktop.org/show_bug.cgi?id=84886
Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
2014-10-14 10:22:21 -07:00
Paulo Zanoni
e7abb63516 tests/pm_rpm: use igt_assert_eq() on COMPARE()
A few weeks ago we were hitting this assertion, and the _eq macro is
more useful when you're debugging.

Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
2014-10-14 15:18:07 -03:00
Paulo Zanoni
97715d5f0f tests/pm_rpm: fix some compilation warnings
warning: ignoring return value of ‘write’, declared with attribute
 warn_unused_result [-Wunused-result]

Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
2014-10-14 15:17:49 -03:00
Paulo Zanoni
7308e3a92b tests/pm_rpm: reduce the number of rounds on the stress tests
With the current Kernel, it takes more than 10 minutes to run
modeset-stress-extra-wait on BYT with eDP, and we don't really want
IGT subtests that take more than 10 minutes to run: QA reports them as
bugs.

Since, as far as I remember, any of these RPM race condition bugs we
had could always be triggered with just 4-5 rounds of testing, let's
tune down the number of rounds we test:

Before:
	rounds = (--quick option used) ? 10 : 50;

After:
	rounds = (--quick option used) ? 10 : 40;
	rounds = (wait_flags & WAIT_EXTRA) ? rounds / 2 : rounds;

This should make all subtests be way above the 10m limit.

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=84897
Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
2014-10-14 15:17:32 -03:00
Chris Wilson
8aa7fdaee8 igt/gem_bad_reloc: Handle real offset being 0
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-10-14 10:13:05 +01:00
Chris Wilson
cd5ed45296 igt/gem_negative_reloc: Execute a BLT operation with a negative reloc
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-10-14 10:07:37 +01:00
Rodrigo Vivi
a0b5c6d2ee Revert "tests/kms_sink_crc_basic: Wait 2 vblanks before grabing the new crc."
This reverts
     commit d92fbc23138b1014e8574daf29dbb06b8c81aa7a.
     Author: Rodrigo Vivi <rodrigo.vivi@intel.com>
     Date:   Tue Sep 9 12:25:47 2014 -0400

         tests/kms_sink_crc_basic: Wait 2 vblanks before grabing the new crc.

Sink CRC is fixed on kernel to wait as many vblanks as needed. It was fixed b
     commit ad9dc91b6e21266bfc6f466db4b95e10211f31ee
     Author: Rodrigo Vivi <rodrigo.vivi@gmail.com>
     Date:   Tue Sep 16 19:18:12 2014 -0400

         drm/i915: Fix Sink CRC

This this fix in place we don't need this extra 2 vblanks on test case itself

Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
2014-10-10 08:18:28 -07:00
Rodrigo Vivi
9c8ee51be2 Revert "tests/kms_psr_sink_crc: Wait 2 vblanks before grabing the new crc."
This reverts
     commit d190a1f9668680c7a429110c91f8faa27949b220.
     Author: Rodrigo Vivi <rodrigo.vivi@intel.com>
     Date:   Wed Sep 3 21:26:29 2014 -0400

     	     tests/kms_psr_sink_crc: Wait 2 vblanks before grabing the new crc.

Sink CRC is fixed on kernel to wait as many vblanks as needed. It was fixed by:
     commit ad9dc91b6e21266bfc6f466db4b95e10211f31ee
     Author: Rodrigo Vivi <rodrigo.vivi@gmail.com>
     Date:   Tue Sep 16 19:18:12 2014 -0400

         drm/i915: Fix Sink CRC

This this fix in place we don't need this extra 2 vblanks on test case itself.

Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
2014-10-10 08:14:32 -07:00
Chris Wilson
c7551bf7cc igt/kms_flip/nonblocking_read: Demonstrate that O_NONBLOCK is a myth
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-10-08 10:44:57 +01:00
Damien Lespiau
d4c1bb7aab gem_wait: Use PRIu64 in format string
../../tests/gem_wait.c: In function ‘render_timeout’:
../../tests/gem_wait.c:182:3: warning: format ‘%llu’ expects argument of type
‘long long unsigned int’, but argument 3 has type ‘uint64_t’ [-Wformat=]

   igt_info("Finished with %llu time remaining\n", timeout);

Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
2014-10-06 18:58:03 +01:00
Damien Lespiau
6b964c93f7 gem_seqno_wrap: Remove unused variable
Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
2014-10-06 18:51:37 +01:00
Daniel Vetter
5c0139c304 tests/gem_wait: Don't close drmfd in subtest
I didn't notice this on the machine I developed it since the original
wait testcase fails there. Oops.

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2014-10-06 08:32:49 +02:00
Daniel Vetter
4306538d1d tests: Sprinkle missing igt_exit() where needed.
Yay for breaking piles of tests.

This regression has been introduced with

commit 5782eca1e19e85a04ad402fa4094aa1b5f9c53ce
Author: Tim Gore <tim.gore@intel.com>
Date:   Wed Oct 1 13:25:20 2014 +0100

    lib/igt_core.c: disable lowmemorykiller during tests

Cc: Tim Gore <tim.gore@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
2014-10-02 11:34:55 +02:00
Thomas Wood
6a8d33c2bb lib: add a function to indicate activity
Signed-off-by: Thomas Wood <thomas.wood@intel.com>
2014-09-30 17:54:12 +01:00
Thomas Wood
c2d5519906 tests/sysfs_l3_parity: fix warnings in test enumeration
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-30 17:54:02 +01:00
Imre Deak
c256af5d44 test/kms, pm: use drm_open_any_master
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-30 16:46:28 +03:00
Imre Deak
bfda78cd33 tests/pm_rpm: factor out drm_open_any_master
Signed-off-by: Imre Deak <imre.deak@intel.com>
2014-09-30 16:44:50 +03:00
Daniel Vetter
0eaa18061b tests/gem_wait: argument validation tests
Shockingly we don't check for 0 flags!

Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
2014-09-29 15:33:07 +02:00
Daniel Vetter
e4753d2d96 tests/gem_wait_render_timeout: Convert to subtests
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-29 15:33:07 +02:00
Daniel Vetter
5da8b8db02 tests/gem_wait_render_timeout: Drop local structs
We're long past the point where libdrm has these.

Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
2014-09-29 15:33:07 +02:00
Tim Gore
f33fa71481 lib/igt_core: make single/simple tests use igt_exit
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-29 16:57:49 +02:00
Damien Lespiau
32a0308e2d kms_cursor_crc: Remove two unused local variables
Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
2014-09-26 16:48:02 +01:00
Chris Wilson
f2775039b1 igt/gem_userptr_blits: Test interruptible create-destroy
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-26 10:29:22 +01:00
Chris Wilson
3e766b8255 igt/gem_concurrent_blit: Only read back a few GTT values
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-26 07:58:11 +01:00
Daniel Vetter
3205a9167f tests/kms_psr_sink_crc: Use options
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-24 14:36:57 +02:00
Chris Wilson
4b81e9ca7d igt/gem_reloc_vs_gpu: Fix reloc.presumed_offset value
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-19 16:44:13 +01:00
Daniel Vetter
c3eca6f7d3 tests/drm_import_export: Add subtest for prime
Cc: Rafal Sapala <rafal.a.sapala@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2014-09-19 09:32:14 +02:00
Daniel Vetter
a018d60f63 tests: Add drm_import_export
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-18 17:36:58 +02:00
Ville Syrjälä
25c55d3fc2 tests/kms_cursor_crc: Add basic non-square cursor testing
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-18 12:56:56 +03:00
Chris Wilson
1244fc6b9b igt/pm_rps: Fix STORE_DWORD for pre-gen8
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-16 08:19:08 +01:00
Chris Wilson
f81d8eba4f igt/kms_render: Iterate only through the formats
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-12 09:12:42 +01:00
Chris Wilson
855dc6284d igt/gem_userptr_blits: GTT mmaping a userptr requires llc
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=83790
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-09-12 09:10:01 +01:00
Chris Wilson
3a1751ef34 igt/pm_rps: Fix the batch count for emitting the flush
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=81858#c2
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-09-12 06:47:20 +01:00
Rodrigo Vivi
62f4d56676 tests: Kill pm_psr
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-11 11:42:13 -04:00
Rodrigo Vivi
d190a1f966 tests/kms_psr_sink_crc: Wait 2 vblanks before grabing the new crc.
Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
2014-09-11 11:42:12 -04:00
Rodrigo Vivi
1447d83e8e tests/kms_psr_sink_crc: Fix blt submission
Putting back a missing dword.

Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
2014-09-11 11:42:12 -04:00
Rodrigo Vivi
25aa69d0a0 tests/kms_psr_sink_crc: Check color ref CRC
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-11 11:42:12 -04:00
Rodrigo Vivi
d4e6a51970 tests/kms_psr_sink_crc: Fix all testcases.
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-11 11:42:12 -04:00
Rodrigo Vivi
99efdc0cdb tests/kms_psr_sink_crc: Start splitting tests in test_planes and operations.
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-11 11:42:12 -04:00
Rodrigo Vivi
52b0e78a94 tests/kms_psr_sink_crc: Cleaning up tests a bit
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-11 11:42:12 -04:00
Rodrigo Vivi
fb004a6b02 tests/kms_psr_sink_crc: Removing context tests.
This tests are unecessary. Mainly now with the software tracking for PSR.

Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
2014-09-11 11:42:12 -04:00
Rodrigo Vivi
1ab044518a tests/kms_psr_sink_crc: Adding test debug options
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-11 11:42:12 -04:00
Rodrigo Vivi
e90847f57a tests/kms_psr_sink_crc: Fix edp_psr debugfs interface
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-11 11:42:12 -04:00
Rodrigo Vivi
d92fbc2313 tests/kms_sink_crc_basic: Wait 2 vblanks before grabing the new crc.
Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
2014-09-11 11:41:52 -04:00
Rodrigo Vivi
1d7b062621 tests/kms_sink_crc_basic: Simplify test by using igt_kms functions
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-11 11:37:21 -04:00