kms-tests: Small fixes and enhancements
cover kms-tests: Small fixes and enhancements
Hello,
This small patch series fixes a problem in kms-test-crc.py (patch 1/3), and improves kms-test-formats.py with better progress and error reporting (2/3 and 3/3).
While working on this, I noticed that many formats were skipped in kms-test-formats.py, as they were not supported by kmsxx. This is now fixed, and the patches have been sent to the linux-renesas-soc mailing list in "[PATCH 0/8] kmsxx: Various fixes and improvements".
Another discovery during this work was that fully planar formats are broken in the DU driver. The fix has also been submitted in "[PATCH] drm: rcar-du: Fix pitch handling for fully planar YUV formats".
Laurent Pinchart (3):
tests: crc: Fix AtomicRequest usage
tests: formats: Add progress reporting
tests: formats: Improve error reporting
tests/kms-test-crc.py | 2 +- tests/kms-test-formats.py | 19 ++++++++++++++++--- 2 files changed, 17 insertions(+), 4 deletions(-)
Signature · 3 lines
Regards, Laurent Pinchart
PATCH 1/3 tests: crc: Fix AtomicRequest usage
Commit 3cd7e6814cea ("kmstest.py: Fix CRTC disabling") modified the CRC test to use the kmstest.AtomicRequest class, but failed to pass the correct argument to the constructor. Fix it.
--- tests/kms-test-crc.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
tests/kms-test-crc.py +1 -1
@@ -58,7 +58,7 @@ class CRCTest(kmstest.KMSTest): self.fail("atomic mode set failed with %d" % ret) continue - req = kmstest.AtomicRequest(self.card) + req = kmstest.AtomicRequest(self) offset = 100 for plane in planes:
Signature · 3 lines
Regards, Laurent Pinchart
PATCH 2/3 tests: formats: Add progress reporting
In reply to Laurent PinchartImprove the formats test by adding progress reporting, as the test is long.
--- tests/kms-test-formats.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-)
tests/kms-test-formats.py +5 -1
@@ -40,8 +40,12 @@ class FormatsTest(kmstest.KMSTest): self.logger.log("Testing connector %s, CRTC %u, mode %s" % \ (connector.fullname, crtc.id, mode.name)) - for format in crtc.primary_plane.formats: + num_formats = len(crtc.primary_plane.formats) + for i in range(num_formats): + format = crtc.primary_plane.formats[i] + self.logger.log("Testing format %s" % format) + self.progress(i+1, num_formats) # Create a frame buffer try:
Signature · 3 lines
Regards, Laurent Pinchart
PATCH 3/3 tests: formats: Improve error reporting
In reply to Laurent PinchartImprove the formats test by counting the number of formats that failed and reporting failures appropriately.
--- tests/kms-test-formats.py | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-)
tests/kms-test-formats.py +11 -2
@@ -40,6 +40,8 @@ class FormatsTest(kmstest.KMSTest): self.logger.log("Testing connector %s, CRTC %u, mode %s" % \ (connector.fullname, crtc.id, mode.name)) + failed = 0 + num_formats = len(crtc.primary_plane.formats) for i in range(num_formats): format = crtc.primary_plane.formats[i]
@@ -51,6 +53,8 @@ class FormatsTest(kmstest.KMSTest): try: fb = pykms.DumbFramebuffer(self.card, mode.hdisplay, mode.vdisplay, format) except ValueError: + self.logger.log("Failed to create frame buffer") + failed += 1 continue pykms.draw_test_pattern(fb)
@@ -58,12 +62,17 @@ class FormatsTest(kmstest.KMSTest): # Set the mode with a primary plane ret = self.atomic_crtc_mode_set(crtc, connector, mode, fb) if ret < 0: - self.fail("atomic mode set failed with %d" % ret) + self.logger.log("atomic mode set failed with %d" % ret) + failed += 1 continue self.run(3) self.atomic_crtc_disable(crtc) - self.success() + + if failed: + self.fail("%s/%s formats failed" % (failed, num_formats)) + else: + self.success() FormatsTest().execute()
Signature · 3 lines
Regards, Laurent Pinchart