diff options
author | Arkadiusz Hiler <arkadiusz.hiler@intel.com> | 2020-02-25 18:57:18 +0200 |
---|---|---|
committer | Arkadiusz Hiler <arkadiusz.hiler@intel.com> | 2020-03-23 15:47:34 +0200 |
commit | 027e1bc7b76e8d6eb0a83f42b40bb0e863c42a27 (patch) | |
tree | be784181dfaf87e64fbadcf4e0cd485ec23fded4 /lib/igt_chamelium.h | |
parent | 77805a0acc7961b00222915615e34d0358212946 (diff) |
lib/kms: Try to plug all Chamelium ports, abort if it fails
Using chamelium as a display for non-chamelium-aware test is
challenging. The board can be left in multiple different states after
kms_chamelium tests even though we have atexit() handlers and other
measures which try to assure that all ports are plugged in. Sadly this
is not 100% reliable. We also had a few boards hard hanging (happens
very seldom) and requiring manual intervention.
This leads to changes in the testing configuration - we may end up with
any number of connectors plugged in which makes a lot of kms_ tests to
flip between skip and pass depending on a run.
In an attempt to make connectors state less random this patch makes
igt_display_require() chamelium-aware. If chamelium is configured for
given machine we try to reach it and make sure everything is plugged in.
If we fail to do so we abort the execution because the testing
configuration is an unknown.
For machines without a configured chamelium this boils down to a nop.
I have run a bunch of tests and measured how much time we spend in the
Chamelium section of igt_display_require() (n = 1000) with chamelium
configured:
Min: 0.0030s Max: 0.0113s
Avg: 0.0089s Median: 0.0089s
With ~1000 of KMS subtests in a run it's only a mere 9s.
This will however add a bit of extra execution time to test skips
because of doing kmstest_set_vt_graphics_mode() and
igt_display_require() before even checking whether Chamelium is
configured.
v2: do kmstest_set_vt_graphics_mode() before requiring display (Petri)
Fixes: https://gitlab.freedesktop.org/drm/igt-gpu-tools/issues/20
Signed-off-by: Arkadiusz Hiler <arkadiusz.hiler@intel.com>
Reviewed-by: Petri Latvala <petri.latvala@intel.com>
Diffstat (limited to 'lib/igt_chamelium.h')
-rw-r--r-- | lib/igt_chamelium.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/lib/igt_chamelium.h b/lib/igt_chamelium.h index e8377e32..c29741b4 100644 --- a/lib/igt_chamelium.h +++ b/lib/igt_chamelium.h @@ -214,5 +214,6 @@ void chamelium_crop_analog_frame(struct chamelium_frame_dump *dump, int width, void chamelium_destroy_frame_dump(struct chamelium_frame_dump *dump); void chamelium_destroy_audio_file(struct chamelium_audio_file *audio_file); void chamelium_infoframe_destroy(struct chamelium_infoframe *infoframe); +bool chamelium_plug_all(struct chamelium *chamelium); #endif /* IGT_CHAMELIUM_H */ |