public inbox for intel-gfx@lists.freedesktop.org
 help / color / mirror / Atom feed
* [PATCH i-g-t 1/3] tests/kms_force_connector: Fixes
@ 2015-12-01 10:24 Daniel Vetter
  2015-12-01 10:24 ` [PATCH i-g-t 2/3] lib/kms+tests: Use cached connector state Daniel Vetter
                   ` (2 more replies)
  0 siblings, 3 replies; 12+ messages in thread
From: Daniel Vetter @ 2015-12-01 10:24 UTC (permalink / raw)
  To: Intel Graphics Development; +Cc: Daniel Vetter, Thomas Wood, Daniel Vetter

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.

v2: Only check the preferred mode for more future-proofing (Thomas).

Cc: Thomas Wood <thomas.wood@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
---
 tests/kms_force_connector.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/tests/kms_force_connector.c b/tests/kms_force_connector.c
index 838a3b0ae2e6..99a5649ec0c3 100644
--- a/tests/kms_force_connector.c
+++ b/tests/kms_force_connector.c
@@ -150,10 +150,8 @@ int main(int argc, char **argv)
 					   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);
+		/* Don't check non-preferred modes to avoid to tight coupling
+		 * with the in-kernel EDID parser. */
 
 		drmModeFreeConnector(temp);
 
-- 
2.1.0

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply related	[flat|nested] 12+ messages in thread
* [PATCH i-g-t 1/3] tests/kms_force_connector: Fixes
@ 2015-12-01  8:08 Daniel Vetter
  2015-12-01 10:11 ` Thomas Wood
  0 siblings, 1 reply; 12+ messages in thread
From: Daniel Vetter @ 2015-12-01  8:08 UTC (permalink / raw)
  To: Intel Graphics Development; +Cc: Daniel Vetter, Daniel Vetter

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@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

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply related	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2015-12-04  9:51 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-12-01 10:24 [PATCH i-g-t 1/3] tests/kms_force_connector: Fixes Daniel Vetter
2015-12-01 10:24 ` [PATCH i-g-t 2/3] lib/kms+tests: Use cached connector state Daniel Vetter
2015-12-01 10:24 ` [PATCH i-g-t 3/3] tests/kms_force_connector: Include in BAT set Daniel Vetter
2015-12-01 10:33   ` Thomas Wood
2015-12-01 13:39     ` Daniel Vetter
2015-12-01 11:12 ` [PATCH i-g-t 1/3] tests/kms_force_connector: Fixes Jani Nikula
2015-12-01 13:38   ` Daniel Vetter
2015-12-02 11:50     ` Jani Nikula
2015-12-04  9:51       ` Daniel Vetter
  -- strict thread matches above, loose matches on Subject: below --
2015-12-01  8:08 Daniel Vetter
2015-12-01 10:11 ` Thomas Wood
2015-12-01 10:19   ` Daniel Vetter

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox