57 Commits

Author SHA1 Message Date
Daniel Vetter
071e9ca1ca lib: add igt_main macro
In the past new testcases with subtest often forgot to add the call to
igt_exit at the end of their main() function. That is now caught with
a bit more obnoxious asserts, but it's still a nuissance.

This little igt_main macro takes care of that (and also of calling the
subtest machinery initialization code correctly).

If no one objects I'll roll this out for all the simple cases (i.e.
those tests that don't have additional argv parsing on top of the
subtest machinery).

v2: Roll it out across the board.

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2013-11-01 21:10:59 +01:00
Daniel Vetter
1f0cf2df85 lib: make igt_set_vt_graphics_mode never fail
All tests agree that this is a letal failure, so no point
to pass it back to callers.

Also add some igt_require calls for the drm_fd where I've
noticed that it's missing.

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2013-11-01 21:10:59 +01:00
Daniel Vetter
0369fe19b8 lib: consolidate pipe crc exit handler
No need to sprinkle this all over:
- exit handlers will only be registered once
- they're always called when exiting, so no need to explictly call
  them.

This allows us to hide all the pipe crc cleanup in the library.

Cc: Damien Lespiau <damien.lespiau@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2013-11-01 21:10:59 +01:00
Daniel Vetter
43def94f32 tests/kms_cursor_crc: rework to auto-skip connectors
Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2013-11-01 20:43:16 +01:00
Daniel Vetter
842007154d tests: use "auto" pipe CRC source
Makes stuff work on DP ports on gmch platforms automatically.

Cc: Damien Lespiau <damien.lespiau@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2013-11-01 20:43:15 +01:00
Daniel Vetter
7b8784dccf tests/kms_cursor_crc: Use igt_exit
Otherwise the exit codes are all bogus.

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2013-10-29 07:47:33 +01:00
Ville Syrjälä
08c27e3e38 kms_cursor_crc: Add a cursor test using CRCs
Use the display CRC support to validate cursor plane functionality.
The test will position the cursor plane either fully onscreen,
partially onscreen, or fully offscreen, using either a fully opaque
or fully transparent surface. In each case it then reads the PF CRC
and compares it with the CRC value obtained when the cursor plane
was disabled.

v2: Loop over all connectors and crtcs
    Use igt_wait_for_vblank
    Test more corner cases
    Add some progress indication ala. kms_flip
    Make it work for pf and pipe sources

Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
2013-10-21 20:00:32 +03:00