Age | Commit message (Collapse) | Author |
|
Signed-off-by: Robert Foss <robert.foss@collabora.com>
Reviewed-by: Eric Engestrom <eric.engestrom@imgtec.com>
|
|
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
|
|
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
|
|
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
|
|
A simple helper that checks whether or not the given connector has the
"Broadcast RGB" prop, and if so sets it to the given mode. Required for
working with the Chamelium since the Chamelium EDIDs enable limited
color ranges by default on i915 and break frame dump comparisons/CRCs.
Cc: Tomeu Vizoso <tomeu@tomeuvizoso.net>
Signed-off-by: Lyude <lyude@redhat.com>
|
|
A simple helper for getting the igt_output_t struct corresponding to the
given DRM connector id.
Cc: Tomeu Vizoso <tomeu@tomeuvizoso.net>
Signed-off-by: Lyude <lyude@redhat.com>
|
|
This adds some basic helpers for connecting to udev and watching for
sysfs hotplug events.
Cc: Tomeu Vizoso <tomeu@tomeuvizoso.net>
Signed-off-by: Lyude <lyude@redhat.com>
Changes since v1:
- Remove unused arg from documentation
Changes since v2:
- Make udev_monitor explicit so that we can use this for detecting FSMs
from the Chamelium in rpc calls
|
|
The default autoresume delay is about 5 seconds. It's possible on a
system that's not very fast this might not be a long enough time, since
an asynchronous hotplug event we scheduled on the chamelium that was
intended to happen during suspend could happen before we actually manage
to suspend. So, add a function that allows us to increase the autoresume
time to ensure this never happens during suspend/resume tests with the
chamelium.
Cc: Tomeu Vizoso <tomeu@tomeuvizoso.net>
Signed-off-by: Lyude <lyude@redhat.com>
Changes since v1:
- Use igt_require, not assert
|
|
The pipe may be reset when doing a modeset in a fork,
changing it back after the fork exited caused the output
not to be updated.
This resulted in a -EINVAL when doing atomic commit.
Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
|
|
This reverts commit ac1d818ba12f9893a7aa481a7c050e7833dbed34.
Just one declaration of kms_pipe_to_index(). It was not missing after
all.
|
|
Signed-off-by: Robert Foss <robert.foss@collabora.com>
Reviewed-by: Petri Latvala <petri.latvala@intel.com>
|
|
Avoid double free's by setting the free'd pointer to NULL after
free.
Signed-off-by: Robert Foss <robert.foss@collabora.com>
Reviewed-by: Petri Latvala <petri.latvala@intel.com>
|
|
buf array may overflow with when writing '\0' if
MAX_LINE_LEN bytes are read during read().
Signed-off-by: Robert Foss <robert.foss@collabora.com>
Reviewed-by: Petri Latvala <petri.latvala@intel.com>
|
|
Add missing declaration for kmstest_pipe_to_index to header.
Signed-off-by: Robert Foss <robert.foss@collabora.com>
Reviewed-by: Petri Latvala <petri.latvala@intel.com>
|
|
Add missing descriptive igt_assert_t calls to calloc'd memory.
Signed-off-by: Robert Foss <robert.foss@collabora.com>
Reviewed-by: Petri Latvala <petri.latvala@intel.com>
|
|
WC mmaps have fewer coherency issues than GTT mmaps, important for timely
closure.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
|
|
Testcase for plane visibility after atomic modesets. The idea of the test
is the following:
- draw a blue screen with high resolution
- enable a yellow plane, visible, in lower-left corner
- set a new lower resolution mode (1024x768) that makes plane invisible
- check from debugfs 'i915_display_info' that the plane is invisible
- switch back to higher resolution mode
- check from debugfs 'i915_display_info' that the plane is visible again
- repeat number of iterations, default 64
v2: allow test to be run on non-Intel drivers (Daniel)
moved test for plane visibility to as helper function (Daniel)
moved get_vblank() function to be part of helper functions (Daniel)
rename 'tiling' parameter as 'modifier' (Daniel)
select a mode from a list so that the plane should be invisible.
use default 1024x768 mode only as a fallback if decent mode has not
been found (Daniel)
add tiling MODE_NONE (Daniel)
v3: draw as many overlay planes as the platform supports + cursor plane
on top of each other on lower-left corner
skip the test if i915_display_info file is not available
test plane visibility with igt_assert_plane_visibility() function
drop option for multiple test iterations (Daniel Vetter)
v4: switch 'for_each_connected_output()' to
'for_each_valid_output_on_pipe()'
skip Y and Yf tiling for generations older than 9 (Maarten)
Cc: Daniel Stone <daniel@fooishbar.org>
Cc: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
Reviewed-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
Signed-off-by: Mika Kahola <mika.kahola@intel.com>
|
|
This time add an explicit variable force_reprobe, which is set to true
on initial probe and might be set again (in a future patch) after a
hpd event.
Acked-by: Chris Wilson <chris@chris-wilson.co.uk>
Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
|
|
This reverts commit 20258f2353a266f8fe19e7392eb282e58dd87f6a.
This completely breaks igt running on bare hardware where it is required
that igt probes the connectors before use.
Cc: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
|
|
The fbcon imposes unpredictable latencies on tests - each drmIoctl has
been observed to trigger two 650us calls to console_unlock() as it
flushes printk buffer for the DRM_DEBUG around the ioctl. This makes
tests such as gem_wait fail as they expect the ioctl to be spent on the
operation under test not clogged up by the console.
References: https://bugs.freedesktop.org/show_bug.cgi?id=99130
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
|
|
None of the tests depend on it any longer, so it's time to kill. :)
Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
|
|
Exploratory test into behaviour when reusing bo between batches.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
|
|
Add a few subtests that check that lossless compressed render targets
are properly displayed. Also test a few error conditions.
Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>
Cc: Ben Widawsky <ben@bwidawsk.net>
Signed-off-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
Acked-by: Ben Widawsky <ben@bwidawsk.net>
|
|
After the fence is signaled, the status feed reports whether or not the
request completed successfully. We set this to -EIO if a hang was
detected.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
|
|
This is a simple macro for executing a block of code at the beginning of
intel-gpu-tools, before any tests have been ran. Useful for
initialization of global resources used in IGT libraries.
Signed-off-by: Lyude <lyude@redhat.com>
Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
Changes since v1:
- Add the line number into the name of the constructor function so that
multiple constructors may be used per-file.
|
|
Signed-off-by: Ander Conselvan de Oliveira <ander.conselvan.de.oliveira@intel.com>
Reviewed-by: Petri Latvala <petri.latvala@intel.com>
|
|
Copy the include/drm/i915_pciids.h file from following kernel commit,
which includes Geminilake PCI IDs.
commit 8363e3c3947d0e22955f94a6a87e4f17ce5087b4
Author: Ander Conselvan de Oliveira <ander.conselvan.de.oliveira@intel.com>
Date: Thu Nov 10 17:23:08 2016 +0200
drm/i915/glk: Add Geminilake PCI IDs
Signed-off-by: Ander Conselvan de Oliveira <ander.conselvan.de.oliveira@intel.com>
Reviewed-by: Petri Latvala <petri.latvala@intel.com>
|
|
The opposite direction of to_user_pointer() is from_user_pointer().
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
|
|
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
|
|
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
|
|
Add to_user_pointer() helper function which helps cast
pointers properly when being used with ioctls.
Signed-off-by: Robert Foss <robert.foss@collabora.com>
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
|
|
GCC likes to complain that every function here dies in an assert and
doesn't return, which is very true but not one we wish to optimise for.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
|
|
i915 may not be the only, nor the first, vtcon framebuffer device - we
need to check them all!
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
|
|
"Live" selftesting of i915.ko happens during device probing which eats
the error code and does not propagate it back to module loading.
Workaround this by writing the error code back to the module parameter
and probing it after a "successful" install.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
|
|
mount("/sys/kernel/debug") will return an error if something is already
mounted there. So let's check for that before calling mount(). This
allows many of the tools (eg. intel_reg) to work even when no drm
drivers are loaded since the earlier "/sys/kernel/debug/dri" & co.
path checks will fail in that case and we will fall back to attempting
to mount debugfs ourselves.
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
|
|
whilst we may be passing around file descriptions, using fence or
timeline as appropriate is more descriptive.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
|
|
It takes a sw_sync_timeline and returns a fence (it is a factory), so
call it sw_sync_timeline_create_fence() for better self-documentation.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
|
|
Improvements to self-documentating API that matches the rest of sw_sync.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
|
|
igt likes to return kernel-esque negative errno where we can, and
indicate that we expect to operate on a sync_fence, otherwise it is
merely a grandiose poll().
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
|
|
Common practice for igt when providing tests for new features in
unreleased kernels is to include a complete set of uABI stubs. Lack of
such compatability breaks compilation on current distributions' kernel
headers.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
|
|
Since we're not modifying these anywhere, let's make them const so as to
not break code doing comparisons against compile-time CRCs.
Signed-off-by: Lyude <lyude@redhat.com>
Tested-by: Robert Foss <robert.foss@collabora.com>
|
|
kmod already does the err = -errno for us.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
|
|
The plan is to use this api in i915-perf tests so this adds the
corresponding stub in case libdrm was built with libdrm_intel disabled.
Signed-off-by: Robert Bragg <robert@sixbynine.org>
Reviewed-by: Matthew Auld <matthew.auld@intel.com>
|
|
The kernel has now a new debugfs ABI that can also allow capturing frame
CRCs for drivers other than i915.
Add alternative codepaths so the new ABI is used if the kernel is recent
enough, and fall back to the legacy ABI if not.
Signed-off-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
Reviewed-by: Robert Foss <robert.foss@collabora.com>
|
|
Add igt_require_sw_sync to provide tests to skip if sw_sync support isn't
available on the host machine.
Signed-off-by: Robert Foss <robert.foss@collabora.com>
Reviewed-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
|
|
Base functions to help testing the Sync File Framework (explicit fencing
mechanism ported from Android).
These functions allow you to create, use and destroy timelines and fences.
Signed-off-by: Robert Foss <robert.foss@collabora.com>
Signed-off-by: Gustavo Padovan <gustavo.padovan@collabora.co.uk>
Reviewed-by: Eric Engestrom <eric@engestrom.ch>
Reviewed-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
|
|
Many GPUs have more then 3 pipes available, so hard limiting this to
I915_MAX_PIPES prevents us from using anything that relies on
igt_display_init() on non-intel systems (since we end up writing out of
bounds and seg faulting). Fix this by dynamically allocating
igt_display->pipes using the number of pipes we've detected on the GPU.
Signed-off-by: Lyude <lyude@redhat.com>
Reviewed-by: Abdiel Janulgue <abdiel.janulgue@linux.intel.com>
|
|
The filter needs to skip the embedded test number as well.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
|
|
Order the tests by an embedded test number from the parameter string.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
|
|
Spotted-by: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
|