linux-renesas-soc.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2] tests: Provide {un,}bind testing
@ 2020-09-16 14:18 Kieran Bingham
  2020-09-17  0:58 ` Laurent Pinchart
  0 siblings, 1 reply; 5+ messages in thread
From: Kieran Bingham @ 2020-09-16 14:18 UTC (permalink / raw)
  To: linux-renesas-soc, Laurent Pinchart; +Cc: Kieran Bingham

Perform unbind-bind testing of the VSP devices to validate
successful removal of the drivers.

Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
---

v2:
 - Semi-colons removed
 - duplicated tests removed.

This is the updated patch, I intend to push to master.

--
Kieran


 tests/vsp-unit-test-0026.sh | 55 +++++++++++++++++++++++++++++++++++++
 1 file changed, 55 insertions(+)
 create mode 100755 tests/vsp-unit-test-0026.sh

diff --git a/tests/vsp-unit-test-0026.sh b/tests/vsp-unit-test-0026.sh
new file mode 100755
index 000000000000..0e013cec881b
--- /dev/null
+++ b/tests/vsp-unit-test-0026.sh
@@ -0,0 +1,55 @@
+#!/bin/sh
+
+#
+# Test unbinding and binding all VSP1 devices, performing a simple
+# copy test to validate the hardware afterwards.
+#
+
+. ./vsp-lib.sh
+
+features="rpf.0 wpf.0"
+
+vsp1_driver=/sys/bus/platform/drivers/vsp1
+vsps=$(cd /sys/bus/platform/devices/; ls | grep vsp)
+
+unbind_vsp() {
+	echo $1 > $vsp1_driver/unbind
+}
+
+bind_vsp() {
+	echo $1 > $vsp1_driver/bind
+}
+
+# Input is directly copied to the output. No change in format or size.
+test_copy() {
+	local format=$1
+	local insize=$2
+
+	test_start "simple hardware validation after unbind/bind cycles"
+
+	pipe_configure rpf-wpf 0 0
+	format_configure rpf-wpf 0 0 $format $insize $format
+
+	vsp_runner rpf.0 &
+	vsp_runner wpf.0
+
+	local result=$(compare_frames)
+
+	test_complete $result
+}
+
+test_main() {
+	local format
+
+	# Unbind and rebind VSPs individually
+	for v in $vsps; do
+		unbind_vsp $v
+		bind_vsp $v
+	done
+
+	# Perform a simple copy test to validate HW is alive
+	test_copy RGB24 128x128
+}
+
+test_init $0 "$features"
+test_run
-- 
2.25.1


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

end of thread, other threads:[~2020-09-17 19:54 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-09-16 14:18 [PATCH v2] tests: Provide {un,}bind testing Kieran Bingham
2020-09-17  0:58 ` Laurent Pinchart
2020-09-17 16:07   ` Kieran Bingham
2020-09-17 16:10     ` Laurent Pinchart
2020-09-17 16:12       ` Kieran Bingham

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