linux-renesas-soc.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] tests: planeposition: Test disabling and enabling off-screen planes
@ 2020-08-07 21:20 Laurent Pinchart
  0 siblings, 0 replies; only message in thread
From: Laurent Pinchart @ 2020-08-07 21:20 UTC (permalink / raw)
  To: linux-renesas-soc; +Cc: Kieran Bingham

Add a test to enable an off-screen plane, in addition to the existing
tests that move enabled planes on screen. This new test crashes the DU
driver.

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

diff --git a/tests/kms-test-planeposition.py b/tests/kms-test-planeposition.py
index a7cc11113aa9..0381896f1da8 100755
--- a/tests/kms-test-planeposition.py
+++ b/tests/kms-test-planeposition.py
@@ -103,6 +103,23 @@ class PlanePositionTest(kmstest.KMSTest):
             self.logger.log("Moved overlay plane to %d,%d" % offset)
             time.sleep(3)
 
+        # Disable and re-enable the plane when it is off-screen. The device is
+        # still expected to handle this gracefully.
+        ret = self.atomic_plane_disable(planes[1])
+        if ret < 0:
+            self.fail("off-screen atomic plane disable failed")
+            return
+
+        width = fb.width - 100
+        height = fb.height - 100
+        source = kmstest.Rect(0, 0, width, height)
+        destination = kmstest.Rect(mode.hdisplay, 50, width, height)
+
+        ret = self.atomic_plane_set(planes[1], crtc, source, destination, fb, sync=True)
+        if ret < 0:
+            self.fail("off-scrren atomic plane enable failed")
+            return
+
         self.atomic_crtc_disable(crtc)
         self.success()
 
-- 
Regards,

Laurent Pinchart


^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2020-08-07 21:20 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-08-07 21:20 [PATCH] tests: planeposition: Test disabling and enabling off-screen planes 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).