linux-renesas-soc.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/3] kms-tests: Small fixes and enhancements
@ 2020-08-06  2:27 Laurent Pinchart
  2020-08-06  2:28 ` [PATCH 1/3] tests: crc: Fix AtomicRequest usage Laurent Pinchart
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Laurent Pinchart @ 2020-08-06  2:27 UTC (permalink / raw)
  To: linux-renesas-soc; +Cc: Kieran Bingham

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(-)

-- 
Regards,

Laurent Pinchart


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

* [PATCH 1/3] tests: crc: Fix AtomicRequest usage
  2020-08-06  2:27 [PATCH 0/3] kms-tests: Small fixes and enhancements Laurent Pinchart
@ 2020-08-06  2:28 ` Laurent Pinchart
  2020-08-06  2:28 ` [PATCH 2/3] tests: formats: Add progress reporting Laurent Pinchart
  2020-08-06  2:28 ` [PATCH 3/3] tests: formats: Improve error reporting Laurent Pinchart
  2 siblings, 0 replies; 4+ messages in thread
From: Laurent Pinchart @ 2020-08-06  2:28 UTC (permalink / raw)
  To: linux-renesas-soc; +Cc: Kieran Bingham

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.

Fixes: 3cd7e6814cea ("kmstest.py: Fix CRTC disabling")
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
---
 tests/kms-test-crc.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tests/kms-test-crc.py b/tests/kms-test-crc.py
index d936d1d4fb90..dcdfcd4abb71 100755
--- a/tests/kms-test-crc.py
+++ b/tests/kms-test-crc.py
@@ -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:
-- 
Regards,

Laurent Pinchart


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

* [PATCH 2/3] tests: formats: Add progress reporting
  2020-08-06  2:27 [PATCH 0/3] kms-tests: Small fixes and enhancements Laurent Pinchart
  2020-08-06  2:28 ` [PATCH 1/3] tests: crc: Fix AtomicRequest usage Laurent Pinchart
@ 2020-08-06  2:28 ` Laurent Pinchart
  2020-08-06  2:28 ` [PATCH 3/3] tests: formats: Improve error reporting Laurent Pinchart
  2 siblings, 0 replies; 4+ messages in thread
From: Laurent Pinchart @ 2020-08-06  2:28 UTC (permalink / raw)
  To: linux-renesas-soc; +Cc: Kieran Bingham

Improve the formats test by adding progress reporting, as the test is
long.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
---
 tests/kms-test-formats.py | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/tests/kms-test-formats.py b/tests/kms-test-formats.py
index 77c9fe775a7c..93075561a843 100755
--- a/tests/kms-test-formats.py
+++ b/tests/kms-test-formats.py
@@ -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:
-- 
Regards,

Laurent Pinchart


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

* [PATCH 3/3] tests: formats: Improve error reporting
  2020-08-06  2:27 [PATCH 0/3] kms-tests: Small fixes and enhancements Laurent Pinchart
  2020-08-06  2:28 ` [PATCH 1/3] tests: crc: Fix AtomicRequest usage Laurent Pinchart
  2020-08-06  2:28 ` [PATCH 2/3] tests: formats: Add progress reporting Laurent Pinchart
@ 2020-08-06  2:28 ` Laurent Pinchart
  2 siblings, 0 replies; 4+ messages in thread
From: Laurent Pinchart @ 2020-08-06  2:28 UTC (permalink / raw)
  To: linux-renesas-soc; +Cc: Kieran Bingham

Improve the formats test by counting the number of formats that failed
and reporting failures appropriately.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
---
 tests/kms-test-formats.py | 13 +++++++++++--
 1 file changed, 11 insertions(+), 2 deletions(-)

diff --git a/tests/kms-test-formats.py b/tests/kms-test-formats.py
index 93075561a843..86f16511f1ea 100755
--- a/tests/kms-test-formats.py
+++ b/tests/kms-test-formats.py
@@ -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()
-- 
Regards,

Laurent Pinchart


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

end of thread, other threads:[~2020-08-06  2:29 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-08-06  2:27 [PATCH 0/3] kms-tests: Small fixes and enhancements Laurent Pinchart
2020-08-06  2:28 ` [PATCH 1/3] tests: crc: Fix AtomicRequest usage Laurent Pinchart
2020-08-06  2:28 ` [PATCH 2/3] tests: formats: Add progress reporting Laurent Pinchart
2020-08-06  2:28 ` [PATCH 3/3] tests: formats: Improve error reporting Laurent Pinchart

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).