From fde8e0f027a72e07b36cde9a2be9dbf79b58d780 Mon Sep 17 00:00:00 2001 From: Laurent Pinchart Date: Thu, 7 Dec 2017 20:25:05 +0200 Subject: kmstest.py: Update to the latest kmsxx Python bindings Commit 706a44abb3aa ("Update to latest pybind11") of kmsxx broke the test suite by changing the signature of the AtomicRequest::commit function. Update the test suite accordingly. Signed-off-by: Laurent Pinchart Reviewed-by: Kieran Bingham --- tests/kms-test-allplanes.py | 2 ++ tests/kms-test-modes.py | 1 + tests/kms-test-modeset.py | 1 + tests/kms-test-pageflip.py | 1 + tests/kms-test-planeposition.py | 1 + tests/kmstest.py | 8 ++++---- 6 files changed, 10 insertions(+), 4 deletions(-) (limited to 'tests') diff --git a/tests/kms-test-allplanes.py b/tests/kms-test-allplanes.py index 9e6a18b..f416723 100755 --- a/tests/kms-test-allplanes.py +++ b/tests/kms-test-allplanes.py @@ -80,4 +80,6 @@ class AllPlanesTest(kmstest.KMSTest): else: self.success() + self.atomic_crtc_disable(crtc) + AllPlanesTest().execute() diff --git a/tests/kms-test-modes.py b/tests/kms-test-modes.py index 31128a7..2ca45c4 100755 --- a/tests/kms-test-modes.py +++ b/tests/kms-test-modes.py @@ -24,6 +24,7 @@ class ModesTest(kmstest.KMSTest): self.logger.log("Atomic mode set complete") self.run(4) + self.atomic_crtc_disable(crtc) if self.flips == 0: raise RuntimeError("Page flip not registered") diff --git a/tests/kms-test-modeset.py b/tests/kms-test-modeset.py index e3551f1..f8a78ad 100755 --- a/tests/kms-test-modeset.py +++ b/tests/kms-test-modeset.py @@ -49,6 +49,7 @@ class ModeSetTest(kmstest.KMSTest): self.logger.log("Atomic mode set complete") self.run(5) + self.atomic_crtc_disable(crtc) if self.flips == 0: self.fail("Page flip not registered") diff --git a/tests/kms-test-pageflip.py b/tests/kms-test-pageflip.py index 2ab9b87..2aeaf34 100755 --- a/tests/kms-test-pageflip.py +++ b/tests/kms-test-pageflip.py @@ -100,6 +100,7 @@ class PageFlipTest(kmstest.KMSTest): self.loop.add_timer(10, self.stop_page_flip) self.run(11) + self.atomic_crtc_disable(crtc) if not self.flips: self.fail("No page flip registered") diff --git a/tests/kms-test-planeposition.py b/tests/kms-test-planeposition.py index b42de97..63f745b 100755 --- a/tests/kms-test-planeposition.py +++ b/tests/kms-test-planeposition.py @@ -101,6 +101,7 @@ class PlanePositionTest(kmstest.KMSTest): self.logger.log("Moved overlay plane to %d,%d" % offset) time.sleep(3) + self.atomic_crtc_disable(crtc) self.success() PlanePositionTest().execute() diff --git a/tests/kmstest.py b/tests/kmstest.py index cb0d9a7..62f0376 100755 --- a/tests/kmstest.py +++ b/tests/kmstest.py @@ -183,7 +183,7 @@ class KMSTest(object): if sync: return req.commit_sync(True) else: - return req.commit(self, True) + return req.commit(0, True) def atomic_crtc_mode_set(self, crtc, connector, mode, fb=None, sync=False): """Perform a mode set on the given connector and CRTC. The framebuffer, @@ -213,7 +213,7 @@ class KMSTest(object): if sync: return req.commit_sync(True) else: - return req.commit(self, True) + return req.commit(0, True) def atomic_plane_set(self, plane, crtc, source, destination, fb, sync=False): req = pykms.AtomicReq(self.card) @@ -232,7 +232,7 @@ class KMSTest(object): if sync: return req.commit_sync() else: - return req.commit(self) + return req.commit(0) def atomic_planes_disable(self, sync=True): req = pykms.AtomicReq(self.card) @@ -242,7 +242,7 @@ class KMSTest(object): if sync: return req.commit_sync() else: - return req.commit(self) + return req.commit(0) def __handle_page_flip(self, frame, time): self.flips += 1 -- cgit v1.2.3