diff options
author | Thomas Wood <thomas.wood@intel.com> | 2014-10-08 15:24:36 +0100 |
---|---|---|
committer | Thomas Wood <thomas.wood@intel.com> | 2014-12-04 16:07:55 +0000 |
commit | 304c874b58c0a65dcc5442c50099d048d4fe0633 (patch) | |
tree | 8c34d8e501cd2707c15431aa6a62d0f5aa4ac76b | |
parent | 43da3e706b955751506073e1c0e959209f6c7cf4 (diff) |
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>
-rw-r--r-- | tests/kms_3d.c | 4 | ||||
-rw-r--r-- | tests/kms_force_connector.c | 31 |
2 files changed, 14 insertions, 21 deletions
diff --git a/tests/kms_3d.c b/tests/kms_3d.c index b1712b2b..6b1c1b34 100644 --- a/tests/kms_3d.c +++ b/tests/kms_3d.c @@ -58,7 +58,7 @@ igt_simple_main } igt_require(connector); - kmstest_edid_add_3d(generic_edid[EDID_FHD], EDID_LENGTH, &edid, + kmstest_edid_add_3d(igt_kms_get_base_edid(), EDID_LENGTH, &edid, &length); kmstest_force_edid(drm_fd, connector, edid, length); @@ -75,7 +75,7 @@ igt_simple_main mode_count++; } - igt_assert(mode_count == 13); + igt_assert(mode_count == 15); /* set 3D modes */ igt_info("Testing:\n"); diff --git a/tests/kms_force_connector.c b/tests/kms_force_connector.c index 92332a4d..93f72d77 100644 --- a/tests/kms_force_connector.c +++ b/tests/kms_force_connector.c @@ -30,6 +30,9 @@ IGT_TEST_DESCRIPTION("Check the debugfs force connector/edid features work" " correctly."); +#define CHECK_MODE(m, h, w, r) igt_assert(m.hdisplay == h && m.vdisplay == w \ + && m.vrefresh == r) + igt_main { /* force the VGA output and test that it worked */ @@ -98,25 +101,15 @@ igt_main /* test edid forcing */ kmstest_force_edid(drm_fd, vga_connector, - generic_edid[EDID_FHD], EDID_LENGTH); - temp = drmModeGetConnector(drm_fd, vga_connector->connector_id); - - igt_assert(temp->count_modes == 1); - igt_assert(temp->modes[0].vrefresh == 60 - && temp->modes[0].hdisplay == 1920 - && temp->modes[0].vdisplay == 1080); - - drmModeFreeConnector(temp); - - /* custom edid */ - kmstest_force_edid(drm_fd, vga_connector, - generic_edid[EDID_WSXGA], EDID_LENGTH); - temp = drmModeGetConnector(drm_fd, vga_connector->connector_id); - - igt_assert(temp->count_modes == 1); - igt_assert(temp->modes[0].vrefresh == 60 - && temp->modes[0].hdisplay == 1680 - && temp->modes[0].vdisplay == 1050); + igt_kms_get_base_edid(), EDID_LENGTH); + temp = drmModeGetConnector(drm_fd, + vga_connector->connector_id); + + CHECK_MODE(temp->modes[0], 1920, 1080, 60); + CHECK_MODE(temp->modes[1], 1280, 720, 60); + CHECK_MODE(temp->modes[2], 1024, 768, 60); + CHECK_MODE(temp->modes[3], 800, 600, 60); + CHECK_MODE(temp->modes[4], 640, 480, 60); drmModeFreeConnector(temp); |