22 Commits

Author SHA1 Message Date
Thomas Wood
3dce57a699 tests/kms_force_connector: reset connectors and edid on exit
Signed-off-by: Thomas Wood <thomas.wood@intel.com>
2015-11-11 14:52:44 +00:00
Thomas Wood
a8f6357430 tests/kms_force_connector: clear forced edid in reset
Signed-off-by: Thomas Wood <thomas.wood@intel.com>
2015-11-11 14:50:53 +00:00
Thomas Wood
5652985a54 tests/kms_force_connector: use comparison macros
Use the comparison macros to make debug output clearer.

v2: fix incorrect comparison

Signed-off-by: Thomas Wood <thomas.wood@intel.com>
2015-11-11 14:50:53 +00:00
Thomas Wood
d014339009 tests/kms_force_connector: add an option to reset connector force states
v2: add missing igt_exit call and fix reset_connectors definition

Signed-off-by: Thomas Wood <thomas.wood@intel.com>
2015-11-11 14:49:46 +00:00
Thomas Wood
01e1fca582 tests/kms_force_connector: skip if the required connector is connected
Signed-off-by: Thomas Wood <thomas.wood@intel.com>
2015-11-11 14:21:12 +00:00
Thomas Wood
5570060d33 tests/kms_force_connector: free the display struct when no longer needed
Signed-off-by: Thomas Wood <thomas.wood@intel.com>
2015-11-11 14:21:12 +00:00
Thomas Wood
24b7bbc726 tests: remove unnecessary igt_exit calls
Signed-off-by: Thomas Wood <thomas.wood@intel.com>
2015-11-11 14:20:55 +00:00
Micah Fedke
c81d293aed convert drm_open_any*() calls to drm_open_driver*(DRIVER_INTEL) calls with cocci
Apply the new API to all call sites within the test suite using the following
semantic patch:

// Semantic patch for replacing drm_open_any* with arch-specific drm_open_driver* calls
@@
identifier i =~ "\bdrm_open_any\b";
@@
- i()
+ drm_open_driver(DRIVER_INTEL)

@@
identifier i =~ "\bdrm_open_any_master\b";
@@
- i()
+ drm_open_driver_master(DRIVER_INTEL)

@@
identifier i =~ "\bdrm_open_any_render\b";
@@
- i()
+ drm_open_driver_render(DRIVER_INTEL)

@@
identifier i =~ "\b__drm_open_any\b";
@@
- i()
+ __drm_open_driver(DRIVER_INTEL)

Signed-off-by: Micah Fedke <micah.fedke@collabora.co.uk>
Signed-off-by: Thomas Wood <thomas.wood@intel.com>
2015-09-11 14:39:43 +01:00
Thomas Wood
804e11f40d lib: add a single include header
Add a header that includes all the headers for the library. This allows
reorganisation of the library without affecting programs using it and
also simplifies the headers that need to be included to use the library.

Signed-off-by: Thomas Wood <thomas.wood@intel.com>
2015-08-21 09:37:10 +01:00
Thomas Wood
8d82e5b5ef lib: remove igt_edid.h
This has been replaced by igt_kms_get_base_edid().

Signed-off-by: Thomas Wood <thomas.wood@intel.com>
2014-12-04 16:07:55 +00:00
Thomas Wood
304c874b58 tests: use base edid
Use the base edid for testing, which includes several different display
modes.

Signed-off-by: Thomas Wood <thomas.wood@intel.com>
2014-12-04 16:07:55 +00:00
Thomas Wood
43da3e706b tests/kms_force_connector: split into subtests
v2: fix the initial mode count

Signed-off-by: Thomas Wood <thomas.wood@intel.com>
2014-12-04 16:07:55 +00:00
Thomas Wood
b2ac2642a9 tests: add more test descriptions
Add more test descriptions based on exiting comments.

Signed-off-by: Thomas Wood <thomas.wood@intel.com>
2014-12-04 16:07:55 +00:00
Thomas Wood
06de0e7f29 tests/kms_force_connector: fix assertion when VGA is already connected
Compare the number of modes available when the edid is reset with the
number before the edid was overridden.

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=82230
Signed-off-by: Thomas Wood <thomas.wood@intel.com>
2014-10-17 15:34:44 +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
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
Daniel Vetter
33f0884f3c lib/igt_kms: set_vt_graphics_mode is a low-level helper
So give it a kmstest_ prefix and shuffle it around a bit.

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2014-08-12 19:36:53 +02:00
Daniel Vetter
5a98fe9d4a lib: Add argc/argv to igt_simple_init
There's a pile of ideas around to add generally useful options like
--debug to all igt tests. Or unify the runtime behaviour between
simple and subtest tests a bit more.

The first step to get there is to add argc/argv to igt_simple_init so
that we can get at the argument list.

Cc: Tim Gore <tim.gore@intel.com>
Cc: Thomas Wood <thomas.wood@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2014-07-14 15:03:59 +02:00
Thomas Wood
b81020526f lib: allow the edid to be reset
Signed-off-by: Thomas Wood <thomas.wood@intel.com>
2014-07-11 11:47:46 +01:00
Thomas Wood
13cd79c128 lib: add the ability to set an EDID data block on a connector
Add a function to set an EDID data block on a connector and include a
set of generic EDID blocks for testing.

Signed-off-by: Thomas Wood <thomas.wood@intel.com>
2014-07-11 11:47:46 +01:00
Thomas Wood
37ffb22d3c lib: add function to change connector states
Add an API function and a test program to force a particular state on a
connector.

v2: mask the correct part of the minor number to get the card number (Chris
    Wilson)

Signed-off-by: Thomas Wood <thomas.wood@intel.com>
2014-07-11 11:47:46 +01:00