From 3cd7e6814ceacb53602e97893fb5e5bb7b2b1dcf Mon Sep 17 00:00:00 2001 From: Laurent Pinchart Date: Mon, 17 Jun 2019 19:04:30 +0300 Subject: kmstest.py: Fix CRTC disabling The KMSTest.atomic_crtc_disable() method deactivates a CRTC but doesn't fully disable it, which requires setting the MODE_ID to 0. Furthermore it doesn't de-associate the CRTC from connectors and planes, which causes atomic check failures as a fully disabled CRTC can't be associated with connectors. It can also lead to the next test failing due to resources still being allocated to the CRTC. To fix this, introduce an AtomicRequest class that wraps around pykms.AtomicReq, and stores a copy of all the properties. When the request is committed the properties are added to a global state, which is then used to locate and release connectors and planes associated with the CRTC in KMSTest.atomic_crtc_disable(). Signed-off-by: Laurent Pinchart Reviewed-by: Kieran Bingham --- tests/kms-test-crc.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'tests/kms-test-crc.py') diff --git a/tests/kms-test-crc.py b/tests/kms-test-crc.py index 30d8bea..29147e5 100755 --- a/tests/kms-test-crc.py +++ b/tests/kms-test-crc.py @@ -56,7 +56,7 @@ class CRCTest(kmstest.KMSTest): self.fail("atomic mode set failed with %d" % ret) continue - req = pykms.AtomicReq(self.card) + req = kmstest.AtomicRequest(self.card) offset = 100 for plane in planes: -- cgit v1.2.3