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 /tests/kms_force_connector.c | |
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>
Diffstat (limited to 'tests/kms_force_connector.c')
-rw-r--r-- | tests/kms_force_connector.c | 31 |
1 files changed, 12 insertions, 19 deletions
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); |