public inbox for igt-dev@lists.freedesktop.org
 help / color / mirror / Atom feed
* [igt-dev] [PATCH i-g-t] tests/kms_hdmi_inject: document how the test works
@ 2019-05-20 14:59 Simon Ser
  2019-05-21 10:36 ` [igt-dev] ✗ Fi.CI.BAT: failure for tests/kms_hdmi_inject: document how the test works (rev2) Patchwork
                   ` (3 more replies)
  0 siblings, 4 replies; 6+ messages in thread
From: Simon Ser @ 2019-05-20 14:59 UTC (permalink / raw)
  To: igt-dev

It's not immediately obvious what injection and ELDs are, and what is tested.

This commit adds a few comments to help readers understand this test. In case
the test breaks, this could help.

Signed-off-by: Simon Ser <simon.ser@intel.com>
---

Suggestions wrt. more things to add and rewords are welcome!

I also noticed that there were already functions to generate audio-capable
EDIDs in IGT. Future work includes:

- Unifying kmstest_edid_add_audio and igt_edid (same for 4k helpers)
- Make the injection tests work on DisplayPort
- Test more EDIDs (e.g. more formats/sample sizes combinations)
- Also run tests with the same EDIDs with the Chamelium

 tests/kms_hdmi_inject.c | 19 +++++++++++++++++++
 1 file changed, 19 insertions(+)

diff --git a/tests/kms_hdmi_inject.c b/tests/kms_hdmi_inject.c
index 699bad5b73e2..a24061042c20 100644
--- a/tests/kms_hdmi_inject.c
+++ b/tests/kms_hdmi_inject.c
@@ -30,6 +30,22 @@

 IGT_TEST_DESCRIPTION("Tests 4K and audio HDMI injection.");

+/**
+ * This collection of tests performs EDID and status injection tests. Injection
+ * forces a given EDID and status on a connector. The kernel will parse the
+ * forced EDID and we will check whether correct metadata is exposed to
+ * userspace.
+ *
+ * Currently, this can be used to test:
+ *
+ * - 4K modes exposed via KMS
+ * - Audio capabilities of the monitor exposed via ALSA. EDID-Like Data (ELD)
+ *   entries in /proc/asound are verified.
+ *
+ * Injection is performed on a disconnected connector.
+ */
+
+/** get_connector: get the first disconnected HDMI connector */
 static drmModeConnector *
 get_connector(int drm_fd, drmModeRes *res)
 {
@@ -118,6 +134,7 @@ hdmi_inject_4k(int drm_fd, drmModeConnector *connector)
 	free(edid);
 }

+/** eld_entry_is_igt: checks whether an ELD entry is mapped to the IGT EDID */
 static bool
 eld_entry_is_igt(const char* path)
 {
@@ -154,6 +171,8 @@ eld_entry_is_igt(const char* path)
 	return false;
 }

+/** eld_is_valid: check whether ALSA has detected the audio-capable IGT EDID by
+ * parsing ELD entries */
 static bool
 eld_is_valid(void)
 {
--
2.21.0

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

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

end of thread, other threads:[~2019-05-24 13:55 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-05-20 14:59 [igt-dev] [PATCH i-g-t] tests/kms_hdmi_inject: document how the test works Simon Ser
2019-05-21 10:36 ` [igt-dev] ✗ Fi.CI.BAT: failure for tests/kms_hdmi_inject: document how the test works (rev2) Patchwork
2019-05-21 10:48   ` Ser, Simon
2019-05-23  8:28 ` [igt-dev] ✓ Fi.CI.BAT: success for tests/kms_hdmi_inject: document how the test works (rev3) Patchwork
2019-05-24  2:12 ` [igt-dev] ✓ Fi.CI.IGT: " Patchwork
2019-05-24 13:55 ` [igt-dev] [PATCH i-g-t] tests/kms_hdmi_inject: document how the test works Arkadiusz Hiler

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox