Age | Commit message (Collapse) | Author |
|
If we listen to the uevents from the kernel, we can detect when the GPU
hangs. This requires us to fork a helper process to do so and send a
signal back to the parent.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
|
|
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Matt Roper <matthew.d.roper@intel.com>
Signed-off-by: Matt Roper <matthew.d.roper@intel.com>
|
|
This is a helper to draw a gradient between 2 colors.
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Matt Roper <matthew.d.roper@intel.com>
Signed-off-by: Matt Roper <matthew.d.roper@intel.com>
|
|
v2: Rename CTM_MATRIX property to CTM
v3: Add support for atomic commits
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Matt Roper <matthew.d.roper@intel.com>
Signed-off-by: Matt Roper <matthew.d.roper@intel.com>
|
|
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Matt Roper <matthew.d.roper@intel.com>
Signed-off-by: Matt Roper <matthew.d.roper@intel.com>
|
|
We wish to delay the first signal from the igt_sigiter_ioctl
sufficiently to skip over the timer_settime() and into the drmIoctl
kernel context before firing. If we fire too early, we will think that
the ioctl doesn't respond to signals and ignore it in future. If we fire
too late, we won't probe the ioctl for signal handling at all. Let's try
measuring the timer_settime() call time as a first approximation.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
|
|
The goal of injecting signals into the ioctl() is to trigger an EINTR.
If we did not succeed on the last pass, we are not going to on the next
or subsequent passes either.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
|
|
In order to keep the dmabuf mmap around whilst we keep the object alive,
we need a file descriptor for each. Check that the VFS supports that
many fd.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
|
|
To simplify and speed up running interruptible tests, use a custom
ioctl() function that control the signaling and detect when we need no
more iterations to trigger an interruption.
We use a realtime timer to inject the signal after a certain delay,
increasing the delay on every loop to try and exercise different code
paths within the function. The first delay is very short such that we
hopefully enter the kernel with a pending signal.
Clients should use
struct igt_sigiter iter = {};
while (igt_sigiter_repeat(&iter, enable_interrupts=true))
do_test()
to automatically repeat the test until we can inject no more signals
into the ioctls. This is condensed into a macro
igt_interruptible(enable_interrupts=true)
do_test();
for convenience.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
|
|
Insted of calling drmIoctl() directly, call igt_ioctl() instead. In the
normal scenario this is function pointer that calls drmIoctl() (so no
penalty), but allows us to divert ioctls into our own routines for
nefarious purposes. One such purpose will be to control interrupt
generation into the ioctl, to be able to detect when we successfully
interrupt the ioctl and when we no longer need more interrupts.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
|
|
... for some cases discussed with Chris on irc. We seem to get them all
right.
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
|
|
Cc: Marius Vlad <marius.c.vlad@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
|
|
Useful for creating common setup code in igt_fixture which is only
needed by a subset of tests. And since I'm a good citizen it comes
with a library testcase/example included.
v2: Make testcase nastier to ensure a subtest group SKIPS when it's
parent is skipping already. I accidentally got this right, but let's
make sure.
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
|
|
These IDs were already part of the kernel since:
kernel commit 985dd4360fdf2533fe48a33a4a2094f2e4718dc0
Author: Imre Deak <imre.deak@intel.com>
Date: Thu Jan 28 16:04:12 2016 +0200
drm/i915/bxt: update list of PCIIDs
Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
Reviewed-by: Arun Siluvery <arun.siluvery@linux.intel.com>
|
|
Use more verbose igt_require(), here assocaited with SET_CACHING, such
that the requirements are explained in the debug/failure log.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
|
|
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
|
|
Now that we started packaging all parameters in one handy struct, pass
them everywhere. This allows us to pass along requirements so that we
can perform the checks inside each indvidual subtest and so not anger
the igt gods.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
|
|
For the long running tests probing error conditions, throwing in the
signal interruptions is a good idea.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
|
|
Becareful in case we try and eat the error state whilst interrupts are
being sent and repeat the write() until we finish uninterrupted.
References: https://bugs.freedesktop.org/show_bug.cgi?id=94573
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
|
|
Co-Author : Marius Vlad <marius.c.vlad@intel.com>
Co-Author : Pratik Vishwakarma <pratik.vishwakarma@intel.com>
So far we have had only two commit styles, COMMIT_LEGACY
and COMMIT_UNIVERSAL. This patch adds another commit style
COMMIT_ATOMIC which makes use of drmModeAtomicCommit()
v2: (Marius)
i)Set CRTC_ID to zero while disabling plane
ii)Modified the log message in igt_atomic_prepare_plane_commit
https://patchwork.freedesktop.org/patch/71945/
v3: (Marius)Set FB_ID to zero while disabling plane
https://patchwork.freedesktop.org/patch/72179/
v4: (Maarten) Corrected the typo in commit message
https://patchwork.freedesktop.org/patch/72598/
v5: Added check for DRM_CLIENT_CAP_ATOMIC in igt_display_init
(Marius)
i)Removed unused props from igt_display_init
ii)Removed unused ret. Changed function to void
iii)Declare the variable before checking if we have
DRM_CLIENT_CAP_ATOMIC.
https://patchwork.freedesktop.org/patch/73505/
v6: (Jani) Corrected typo in commit message
v7: Added is_atomic check for DRM_CLIENT_CAP_ATOMIC in
igt_display_init and igt_atomic_commit
v8: (Matthew Auld) Replaced for loops by for_each_connected_output and
for_each_plane_on_pipe
(Lionel) Populate properties only if the value has changed
Remove the resetting of values in disable case
Note : I've used Maarten's diff patch
v9: (Lionel) Added resetting of rotation property
v10: (Marius) Modified the macro declaration to avoid shadow declaration
warning, also removed one unused variable
Signed-off-by: Mayuresh Gharpure <mayuresh.s.gharpure@intel.com>
Signed-off-by: Pratik Vishwakarma <pratik.vishwakarma@intel.com>
Signed-off-by: Mayuresh Gharpure <mayuresh.s.gharpure@intel.com>
Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
|
|
No users so time to die.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
|
|
No one uses this nor should they as it just gem_get_param() in disguise
and they are better feature queries for whether individual execution
engines are functional.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
|
|
Instead of measuring the wakeup latency of a GEM client, we turn the
tables here and ask what is the wakeup latency of a normal process
competing with GEM. In particular, a realtime process that expects
deterministic latency.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
|
|
Oversight from the exit handler cleanup, spotted by Chris Wilson.
Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
|
|
Checks that
- exit handlers are run only once, even when registered multiple
times.
- run in reverse order
- actually run for all ways a test could exit.
This is prep work to extend exit handlers to also work in a subtest
aware way.
Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
|
|
No longer needed, and also not really a safe idea.
Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
|
|
This was originally added to work around a race, but then that's
broken now. And set_vt_mode generally never results in a test binary
crash, so overkill.
I want to get rid of this interface since I spotted some abuse.
Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
|
|
Use a simpler statically allocated struct for computing the mean as
otherwise we many run out of memeory!
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
|
|
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
|
|
Check that the system operates normally before and after the suspend (as
well as across the suspend). The goal is to isolate the breakage to the
subtest.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
|
|
By looking for a particular error we can avoid actually executing
anything when testing whether the kernel supports an individual ring.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
|
|
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
|
|
When flushing work and idling the GPU, we need to flush all engines,
including the forgotten BSD2.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
|
|
All the tests I wrote always assumed that every connector supported
CRTC 0. This is not the case for BSW and possibly others, so fix the
tests before the CI reports more failures.
Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
|
|
Move it from pm_rpm.c to lib/igt_kms and remove the hardcoded version
from kms_frontbuffer_tracking. I'm also planning to add other callers.
Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
|
|
gen2 tile dimensions are 128x32 for both X and Y tiling
915 tile dimensions are 512x8 for both X and Y tiling
Fix igt_get_fb_tile_size() to return the correct Y tile dimensions
for these platforms. X tile was fine already.
Cc: Paulo Zanoni <paulo.r.zanoni@intel.com>
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
|
|
The debug message in igt_fb_set_size() was copy pasted
from igt_fb_set_position() and not adjusted to say the
right thing. Fix it up.
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
|
|
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
|
|
When performing a dummy-run of rtcwake, hide the output as it doesn't
print anything useful (just when it will wake up).
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
|
|
If we create a cairo surface using a GTT mmaping, then we need to use
the GTT access domain. cairo surfaces created with a blit temporary (for
unfenced surfaces) still use the CPU domain.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
|
|
Include the system("") in the debug output for the assertion failure.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
|
|
Upcoming tests will call it to recover from bad states caused by
hangcheck bugs.the function was renamed to igt_force_gpu_reset to have a
naming closer to other hang-related functions in the same file.
The value written to the debugfs has also been changed to -1; this makes
no differences with the current implementation but copes with upcoming
TDR changes (still under discussion) that should allow the resetting of
a mask of rings.
Signed-off-by: Daniele Ceraolo Spurio <daniele.ceraolospurio@intel.com>
Signed-off-by: Mika Kuoppala <mika.kuoppala@intel.com>
|
|
Allow read-only synchronisation on dmabuf mmaps, useful to allow
concurrent read-read testing between the CPU and GPU.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
|
|
If we want to create more file handles than VFS supports (itself often a
memory limited value), report that we can not create that many objects
via intel_require_memory().
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
|
|
The sync test is supposed to complete in 10s. But some bugs cause it to
run very, very slowly. As a defence against those, terminate the test if
we wait for more than 20s.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
|
|
We intend to use gem_wait() in more tests than gem_wait.c, so move the
simple ioctl wrapper into the core.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
|
|
Move power management related code to a separate library.
Initially this is done only for workarounds that apply to external
components. Modify the users of such workarounds accordingly.
This currently involves HD audio and SATA link power management.
For SATA link PM there's also code to save the previous settings,
to allow for resetting the values after we've finished testing.
Signed-off-by: David Weinehall <david.weinehall@intel.com>
Reviewed-by: Marius Vlad <marius.c.vlad@intel.com>
Signed-off-by: Marius Vlad <marius.c.vlad@intel.com>
|
|
Missed an error whilst rebasing and trying to modify the previous patch
to keep this function intact... Instead, I now have to add this patch to
restore gem_available_aperture_size() and its one usage.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
|
|
For many tests, the relevant aperture is not the ppGTT but the internal
global GTT managed by the kernel. Use this limit appropriately.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
|
|
Added extended wildcard support when specifying --run-subtest.
Wildcard format is as specified in rfc3977 and the uwildmat() implementation
is taken from libinn.
See https://tools.ietf.org/html/rfc3977#section-4 for a description of
allowed wildcard expressions.
v2: Use comma as list separator (Ville Syrjala)
support both ^ and ! as not operators (Dave Gordon)
v3: Updated to use uwildmat() (Dave Gordon)
Signed-off-by: Derek Morton <derek.j.morton@intel.com>
[danvet: Fixup whitespace. Add #include <stdint.h>. Run lint.]
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
|