[Intel-gfx] [PATCH i-g-t 1/3] tests/kms_force_connector: Fixes

Daniel Vetter daniel.vetter at ffwll.ch
Tue Dec 1 00:08:04 PST 2015


Two things:
- Somehow the kernel's mode list changed with our EDID. No idea
  whether that's the right thing here since I'm not really an EDID
  expert. But then again the testcase wants to check that the
  injection works, not validate the kernel's parser.

- We need to disable the forcing _before_ we reprobe to check whether
  everything is back to normal: With the EDID gone but the connection
  still force to on the kernel will fall back to a default low-res
  mode list, making the testcase fail.

Signed-off-by: Daniel Vetter <daniel.vetter at intel.com>
---
 tests/kms_force_connector.c | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/tests/kms_force_connector.c b/tests/kms_force_connector.c
index 838a3b0ae2e6..5f3f4a5400f5 100644
--- a/tests/kms_force_connector.c
+++ b/tests/kms_force_connector.c
@@ -153,20 +153,22 @@ int main(int argc, char **argv)
 		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);
+		CHECK_MODE(temp->modes[4], 800, 600, 56);
+		CHECK_MODE(temp->modes[5], 848, 480, 60);
+		CHECK_MODE(temp->modes[6], 640, 480, 60);
 
 		drmModeFreeConnector(temp);
 
 		/* remove edid */
 		kmstest_force_edid(drm_fd, vga_connector, NULL, 0);
+		kmstest_force_connector(drm_fd, vga_connector,
+					FORCE_CONNECTOR_UNSPECIFIED);
 		temp = drmModeGetConnector(drm_fd, vga_connector->connector_id);
 		/* the connector should now have the same number of modes that
 		 * it started with */
 		igt_assert_eq(temp->count_modes, start_n_modes);
 		drmModeFreeConnector(temp);
 
-		kmstest_force_connector(drm_fd, vga_connector,
-					FORCE_CONNECTOR_UNSPECIFIED);
 	}
 
 	igt_fixture {
-- 
2.1.0



More information about the Intel-gfx mailing list