Age | Commit message (Collapse) | Author |
|
Add debug prints for the reference and captured CRCs when comparing them
and dumping them, which can be useful to get an idea of what is going on
(e.g. specific noise on display cables often only changes one of the
values that compose the CRC).
It's also useful to associate a test debug output with the dumped
pictures (that have the CRC in their name).
Signed-off-by: Paul Kocialkowski <paul.kocialkowski@bootlin.com>
Reviewed-by: Maxime Ripard <maxime.ripard@bootlin.com>
Reviewed-by: Lyude Paul <lyude@redhat.com>
|
|
Remaining tests that have been overlooked and don't need any
invasive changes to limit the skipping to only the relevant parts.
v2: [A rebase gone wrong]
v3: Move the misplaced hunk to the right patch (Antonio).
v4: Rebase, kms_content_protection is new.
v5: Rebase - need to adjust kms_lease.c too.
Reviewed-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com> (v3)
Cc: Antonio Argenziano <antonio.argenziano@intel.com>
Cc: Chris Wilson <chris@chris-wilson.co.uk>
Acked-By: Antonio Argenziano <antonio.argenziano@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
|
|
If KMS is not available, drmModeGetResoures() reports NULL and so we
cannot use this device to find the chamelium connector.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Reviewed-by: José Roberto de Souza <jose.souza@intel.com>
|
|
An hanging batch is nothing more than a spinning batch that never gets
stopped, so re-use the routines implemented in dummyload.c.
v2: Let caller decide spin loop size
v3: Only use loose loops for hangs (Chris)
v4: No requires
v5: Free the spinner
v6: Chamelium exists.
Signed-off-by: Antonio Argenziano <antonio.argenziano@intel.com> #v3
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Reviewed-by: Antonio Argenziano <antonio.argenziano@intel.com>
|
|
In commit ebd6eb69f57b ("Make igtrc configuration common, with
configurable suspend/resume delay") .igtrc handling was moved to
igt_core from igt_chamelium. That made everything in IGT depend on
GLIB by accident.
In short, igt_core.h declared a variable of type GKeyFile*, requiring
glib.h. Everything that tried to #include igt_core.h required glib.h
to be available, by use of GLIB_CFLAGS. This "worked" so far because
CAIRO_CFLAGS contained GLIB_CFLAGS.
As the variable is only used by other stuff in lib/, stuff it in its
own header file to leave igt_core.h without a dependency to glib.h.
Also add a couple of missing #ifdef HAVE_GLIBs around.
Reported-by: Felipe De Jesus Ruiz Garcia <felipe.de.jesus.ruiz.garcia@intel.com>
Signed-off-by: Petri Latvala <petri.latvala@intel.com>
Reviewed-by: Arkadiusz Hiler <arkadiusz.hiler@intel.com>
|
|
Just a bit of OCD, I like it when connections within library modules
are a bit more obvious. igt.h is ok for tests, but let's use individual
include lines for libraries consistently.
Also order standard includes before igt ones.
v2: Rebase.
Acked-by: Jani Nikula <jani.nikula@intel.com>
Acked-by: Arkadiusz Hiler <arkadiusz.hiler@intel.com>
Acked-by: Petri Latvala <petri.latvala@intel.com>
Acked-by: Daniel Stone <daniels@collabora.com>
Acked-by: Radoslaw Szwichtenberg <radoslaw.szwichtenberg@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
|
|
This adds support for VGA frame comparison testing with the reference
generated from cairo. The retrieved frame from the chamelium is first
cropped, as it contains the blanking intervals, through a dedicated
helper. Another helper function asserts that the analog frame
matches or dump it to png if not.
Signed-off-by: Paul Kocialkowski <paul.kocialkowski@linux.intel.com>
Reviewed-by: Lyude <lyude@redhat.com>
|
|
This adds support for dumping both the frame capture from the chamelium
and the reference frame generated by cairo when the captured crc does
not match the crc calculated from the reference, using common helpers.
Getting a dump of the frames is quite useful in order to compare them.
Signed-off-by: Paul Kocialkowski <paul.kocialkowski@linux.intel.com>
Reviewed-by: Lyude <lyude@redhat.com>
|
|
This introduces CRC calculation for reference frames, instead of using
hardcoded values for them. The rendering of reference frames may differ
from machine to machine, especially due to font rendering, and the
frame itself may change with subsequent IGT changes.
These differences would cause the CRC checks to fail on different
setups. This allows them to pass regardless of the setup.
Signed-off-by: Paul Kocialkowski <paul.kocialkowski@linux.intel.com>
Reviewed-by: Lyude <lyude@redhat.com>
|
|
This removes the igt_write_fb_to_png function (that was unused thus far)
and exports the igt_get_cairo_surface function to grab the matching
cairo surface. Writing to a png is now handled by the common frame
handling code in lib/igt_frame.
This also fixes how the surface is retreived in chamelium code,
which avoids destroying it too early.
Signed-off-by: Paul Kocialkowski <paul.kocialkowski@linux.intel.com>
Reviewed-by: Lyude <lyude@redhat.com>
|
|
This adds support for configurable suspend/resume delay and takes the
occasion to move igtrc configuation from igt_chamelium to igt_core.
This way, suspend/resume delay configuration can be used for all tests.
Signed-off-by: Paul Kocialkowski <paul.kocialkowski@linux.intel.com>
Reviewed-by: Lyude Paul <lyude@redhat.com>
|
|
Since most tests are already doing a reset, there is no need to
duplicate it at init time. This removes that duplicate reset and adds
a call to reset_state where in-test resets where not done previously.
Signed-off-by: Paul Kocialkowski <paul.kocialkowski@linux.intel.com>
Reviewed-by: Lyude Paul <lyude@redhat.com>
|
|
This adds support for the newly-introduced ScheduleHpdToggle XMLRPC
method of the Chamelium's interface and makes use of it instead of
starting pulses with an asynchronous call, suspending and dealing with
the result at resume.
The XMLRPC library does not guarantee that the call will be made before
caring for its outcome and this is in fact what was happening:
the call was being delayed until resume time, as can be seen from the
Chamelium's logs. The quite generous timeout for HPD event detection
would then catch the toggle, that was sent after resume.
This is especially useful for testing HPD during suspend/resume.
Signed-off-by: Paul Kocialkowski <paul.kocialkowski@linux.intel.com>
Reviewed-by: Lyude Paul <lyude@redhat.com>
|
|
The pixman_image_create_bits function expects bytes per pixels as fifth
argument, not bits per pixels.
This divides the PIXMAN_FORMAT_BPP macro's result by 8 to get it in
bytes per pixels instead of bits per pixels.
Signed-off-by: Paul Kocialkowski <paul.kocialkowski@linux.intel.com>
Reviewed-by: Lyude Paul <lyude@redhat.com>
|
|
For the purpose of testing things such as hotplugging and bad monitors,
the ChromeOS team ended up designing a neat little device known as the
Chamelium. More information on this can be found here:
https://www.chromium.org/chromium-os/testing/chamelium
This adds support for a couple of things to intel-gpu-tools:
- igt library functions for connecting to udev and monitoring it for
hotplug events, loosely based off of the unfinished hotplugging
implementation in testdisplay
- Library functions for controlling the chamelium in tests using
xmlrpc. A couple of RPC calls were ommitted here, mainly because they
didn't seem very useful for our needs (yet)
- A set of functions for doing CRC checks and frame comparisons in
tests
- A set of basic tests using the Chamelium library.
Cc: Tomeu Vizoso <tomeu@tomeuvizoso.net>
Signed-off-by: Lyude <lyude@redhat.com>
Changes since v1:
- Don't try to guess connector mappings, have the user specify them
manually using a configuration file
- Open DRM fd using DRIVER_ANY, not DRIVER_INTEL
- Lower the hotplug timeout a little bit, since 30 seconds was leftover
from debugging these tests anyway
- Don't try to keep track of the original state of the chamelium ports,
and just leave them plugged in after each run. This makes more sense
to me, since I'd imagine in automated testing setups using chameliums
that all of the extra monitors will probably be provided by the
Chamelium to begin with, so keeping them plugged in would make sure
tests running afterwards that require >1 monitor don't get skipped.
- Add wait_for_connector() to the chamelium tests. After some more
testing, I found that depending on the system some tests would throw
false negatives due to us not waiting long enough for the system to
detect that we connected something to it. This mainly happened with
VGA connectors, since their lack of HPD makes them take significantly
longer for the hardware to notice. wait_for_connector() fixes this by
continually reprobing the status of the desired connector (without
relying on a hpd event happening, since that might never come) until
we get what we want, or we time out and fail.
- Use kmstest_get_property() for retrieving EDIDs instead of doing it by
hand
- Don't hardcode PIPE_A for bringing up the display, use kmstest to find
an appropriate CRTC to use.
Changes since v2:
- Fix incorrect usage of the list helpers when recording new EDIDs
- Add missing documentation
- Make sure documentation actually appears
- Since we finally got video capture working, add CRC functions and fix
the ones we couldn't actually test before
- In the exit handler, reset the xmlrpc env so we can properly reset the
Chamelium even after an RPC error
- Make sure compiling without Chamelium support still works
Changes since v3:
- Change the config file name from .igt_chamelium_rc to .igtrc
- Remove chamelium global context
- Get rid of define_common_connector_tests()
- Get rid of connector list, expose connectors as opaque objects and
provide helpers for accessing their attributes
- Get rid of configure.ac option for Chamelium
- Add tests for CRC functions
- Add frame dumping functions + tests
- Add FSM handling to chamelium_rpc()
- Use LIBUDEV_LIBS in automake, not UDEV_LIBS
- Documentation fixes
- Improve debugging output some more
- Remove skip_without_suspend_support, we no longer need to check for
suspend support before calling things
- Remove unnessecary malloc() checks with igt_assert()
- Don't use igt_require in chamelium_init, leave it up to the caller
whether or not to abort when failing to initialize the chamelium
- Use igt_assert_eq for making assertions about connector's statuses
- Define suspend/resume delay for tests as constant
|