mirror of
https://github.com/tiagovignatti/intel-gpu-tools.git
synced 2025-06-12 02:16:17 +00:00
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>
This commit is contained in:
parent
43da3e706b
commit
304c874b58
@ -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");
|
||||
|
@ -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_kms_get_base_edid(), 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);
|
||||
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);
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user