All of lore.kernel.org
 help / color / mirror / Atom feed
From: Simon Ser <simon.ser@intel.com>
To: igt-dev@lists.freedesktop.org
Subject: [igt-dev] [PATCH i-g-t 1/3] lib/igt_chamelium: add chamelium_trigger_link_failure
Date: Tue, 13 Aug 2019 17:17:46 +0300	[thread overview]
Message-ID: <20190813141748.18876-2-simon.ser@intel.com> (raw)
In-Reply-To: <20190813141748.18876-1-simon.ser@intel.com>

This new function triggers a link failure on the provided port. Another
function called chamelium_supports_trigger_link_failure has been added to
check whether the Chamelium board supports the new method.

Support for TriggerLinkFailure in Chamelium has been added in [1].

[1]: https://chromium.googlesource.com/chromiumos/platform/chameleon/+/44866c7bc2af44da1f7bac4e782d0ed6d7c1400a

Signed-off-by: Simon Ser <simon.ser@intel.com>
---
 lib/igt_chamelium.c | 15 +++++++++++++++
 lib/igt_chamelium.h |  3 +++
 2 files changed, 18 insertions(+)

diff --git a/lib/igt_chamelium.c b/lib/igt_chamelium.c
index 301e9d214dd1..076ee0578c9c 100644
--- a/lib/igt_chamelium.c
+++ b/lib/igt_chamelium.c
@@ -1124,6 +1124,21 @@ int chamelium_get_captured_frame_count(struct chamelium *chamelium)
 	return ret;
 }
 
+bool chamelium_supports_trigger_link_failure(struct chamelium *chamelium)
+{
+	return chamelium_supports_method(chamelium, "TriggerLinkFailure");
+}
+
+/**
+ * chamelium_trigger_link_failure: trigger a link failure on the provided port.
+ */
+void chamelium_trigger_link_failure(struct chamelium *chamelium,
+				    struct chamelium_port *port)
+{
+	xmlrpc_DECREF(chamelium_rpc(chamelium, port, "TriggerLinkFailure",
+				    "(i)", port->id));
+}
+
 bool chamelium_has_audio_support(struct chamelium *chamelium,
 				 struct chamelium_port *port)
 {
diff --git a/lib/igt_chamelium.h b/lib/igt_chamelium.h
index b6b7eb4436f8..3f6b1b21cbfc 100644
--- a/lib/igt_chamelium.h
+++ b/lib/igt_chamelium.h
@@ -141,6 +141,9 @@ void chamelium_start_capture(struct chamelium *chamelium,
 void chamelium_stop_capture(struct chamelium *chamelium, int frame_count);
 void chamelium_capture(struct chamelium *chamelium, struct chamelium_port *port,
 		       int x, int y, int w, int h, int frame_count);
+bool chamelium_supports_trigger_link_failure(struct chamelium *chamelium);
+void chamelium_trigger_link_failure(struct chamelium *chamelium,
+				    struct chamelium_port *port);
 bool chamelium_has_audio_support(struct chamelium *chamelium,
 				 struct chamelium_port *port);
 void chamelium_get_audio_channel_mapping(struct chamelium *chamelium,
-- 
2.22.0

_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev

  reply	other threads:[~2019-08-13 14:17 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-08-13 14:17 [igt-dev] [PATCH i-g-t 0/3] Chamelium link-status test Simon Ser
2019-08-13 14:17 ` Simon Ser [this message]
2019-08-15  9:59   ` [igt-dev] [PATCH i-g-t 1/3] lib/igt_chamelium: add chamelium_trigger_link_failure Arkadiusz Hiler
2019-08-13 14:17 ` [igt-dev] [PATCH i-g-t 2/3] lib/igt_kms: add support for link-status Simon Ser
2019-08-13 18:31   ` Manasi Navare
2019-08-13 14:17 ` [igt-dev] [PATCH i-g-t 3/3] tests/kms_chamelium: add a link-status test Simon Ser
2019-08-13 18:44   ` Manasi Navare
2019-08-13 15:30 ` [igt-dev] ✓ Fi.CI.BAT: success for Chamelium " Patchwork
2019-08-14  0:58 ` [igt-dev] ✓ Fi.CI.IGT: " Patchwork

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20190813141748.18876-2-simon.ser@intel.com \
    --to=simon.ser@intel.com \
    --cc=igt-dev@lists.freedesktop.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.