57 Commits

Author SHA1 Message Date
Paulo Zanoni
7a4ded7b87 kms_frontbuffer_tracking: remove offscreen-{cur,spr} subtests
It doesn't make sense to write on the sprite/cursor plane of the
"offscreen" screen. The pick_target() function was just returning the
offscreen_fb pointer for those cases, so we were not really testing
any cursor or sprite code. So the tests were just the same as
offscreen-pri.

That kills 24 subtests for each feature (72 in total).

Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
2015-06-25 14:53:07 -03:00
Paulo Zanoni
ce3b47bac8 tests/kms_frontbuffer_tracking: add modesetfrombusy test
This test exercies the dev_priv->fb_tracking.busy_bits bug I recently
found and Daniel fixed.

Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
2015-06-25 14:52:26 -03:00
Paulo Zanoni
7eb5f07949 tests/kms_frontbuffer_tracking: rename set_screens_for_test
Rename it to prepare_subtest. This function used to be much smaller
when I decided its name.

Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
2015-06-23 14:44:18 -03:00
Paulo Zanoni
7756e88445 tests/kms_frontbuffer_tracking: simplify flib_subtest fb handling
Get rid of fb2_region, use params->fb directly instead.

Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
2015-06-23 14:43:02 -03:00
Paulo Zanoni
77e1bac6eb tests/kms_frontbuffer_tracking: simplify wait_user() calls
I often add new temoprary wait_user() calls when debugging things, and
having to add "if (opt.step)" is annoying, so let's make the step
level check inside wait_user(). As a bonus, our huge macro is 2 lines
shorter.

Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
2015-06-23 14:41:22 -03:00
Paulo Zanoni
969cb3c575 tests/kms_frontbuffer_tracking: not all eDP panels support sink CRC
And require sink CRC support for PSR, since the pipe CRC is not
exactly useful there.

v2: Check for ENOTTY (Rodrigo).

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=91019
Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
2015-06-23 14:41:01 -03:00
Paulo Zanoni
d8acd24bdb tests: add kms_frontbuffer_tracking
This is a new test that should exercise the frontbuffer tracking
feature of the Kernel in a number of different ways. We use different
drawing methods, we use the primary, cursor and sprite planes, we can
test both on single and dual pipes, also on buffers not associated
with any CRTCs, etc.

We currently have assertions for both FBC and PSR, and we also have a
"nop" test mode that should disable both FBC and PSR, and can be
used for debugging.

This test is also capable of testing both FBC and PSR even if they are
disabled by default on the Kernel: the test knows how to change the
i915.ko parameters and then set them back after testing.

I am getting a significant number of failures when I run this test,
which means we have some work to do on the Kernel.

I also still have a small list of additional subtests that I plan to
add to this test, and those tests are documented on the main function.

v2:
 - Use igt_debugfs_open() (Thomas).
 - Use igt_test_description() (Thomas).
 - Don't check drm_open_any_master()'s result (Thomas).
 - Use igt_require_f() in some cases (Thomas).
 - Standardize some assertions.
 - Use the new module param functions.
 - Check if FBC is supported by the chipset.
 - Add new subtests (multidraw, enum fbs, fbc+psr).
 - Make tests a little shorter.
 - Reorganize which tests ara ran by default.
 - Better comments everywhere.
 - Rebase.

v3:
 - Fix a small typo.
 - Improve the log messages a little bit more.

Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
2015-06-11 10:43:13 -03:00