Age | Commit message (Collapse) | Author |
|
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
|
|
Clear all the ioctl structs to zero before use as valgrind does not our
ioctls and so complains about undefined bytes being passed to syscalls.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
|
|
SIGTERM is the normal signal to use when instructing a process to exit.
The only difference is that an unhandled SIGQUIT is meant to generate a
coredump, which is not what we want, but in practice I encountered an
issue where SIGTERM seemed to be deliverable more reliably than SIGQUIT
(in tests using multiple signal helpers).
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
|
|
Increase the maximum number of exit handlers since some tests now
require more that the previous limit.
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=81320
Signed-off-by: Thomas Wood <thomas.wood@intel.com>
|
|
People use it way too often, and it upsets the test library. The only
valid places to use this is of igt infrastructure self-tests where you
need to check something _without_ all the other abi use checks
igt_fail and friends do. For those tests just #define an internal
assert to hide it.
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
|
|
Without the () gtkdoc won't recognize them as function references.
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
|
|
There's a pile of ideas around to add generally useful options like
--debug to all igt tests. Or unify the runtime behaviour between
simple and subtest tests a bit more.
The first step to get there is to add argc/argv to igt_simple_init so
that we can get at the argument list.
Cc: Tim Gore <tim.gore@intel.com>
Cc: Thomas Wood <thomas.wood@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
|
|
Damien dodged this ...
Also run the script while at it.
v2: Don't just capture identifiers for pipe, but also expressions.
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
|
|
Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
|
|
Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
|
|
Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
|
|
Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
|
|
So one doesn't have to write the plane type all the time.
Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
|
|
Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
|
|
I've noticed some spam in the userptr list ...
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
|
|
Signed-off-by: Thomas Wood <thomas.wood@intel.com>
|
|
igt_enable_connectors forces connectors to be enabled where doing so is
known to work well. igt_reset_connectors resets the force state on all
connectors.
|
|
Add a function to set an EDID data block on a connector and include a
set of generic EDID blocks for testing.
Signed-off-by: Thomas Wood <thomas.wood@intel.com>
|
|
Add an API function and a test program to force a particular state on a
connector.
v2: mask the correct part of the minor number to get the card number (Chris
Wilson)
Signed-off-by: Thomas Wood <thomas.wood@intel.com>
|
|
When waiting for the forked tests, we can respond quicker to a failure
(such as oom) by waiting for any child to exit rather than waiting for
each child in order. Then when we see that a test failed, we can kill
all other children before aborting.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
|
|
Just like the it was done for the requirement message, display the errno
message only if errno is set, and display it at the end of the assert
message.
Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
|
|
Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
|
|
The errno message was a bit in the middle here, it makes more sense to
group the messages about why the test requirement wasn't met together.
Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
|
|
Textually the same so no harm was done and no warnings
from compiler either.
Signed-off-by: Mika Kuoppala <mika.kuoppala@intel.com>
|
|
Get CRCs of a full red and a full blue surface as reference.
Create a big framebuffer that is twice width and twice height as the
current display mode.
Fill the top left quarter with red, bottom right quarter with blue
Check the scanned out image with the CRTC at position (0, 0) of the
framebuffer and it should be the same CRC as the full red fb
Check the scanned out image with the CRTC at position (hdisplay,
vdisplay) and it should be the same CRC as the full blue fb
v2: Fix a few things here and there (Damien)
Cc: Lei Liu <lei.a.liu@intel.com>
Cc: Yi Sun <yi.sun@intel.com>
Signed-off-by: Lei Liu <lei.a.liu@intel.com>
Signed-off-by: Yi Sun <yi.sun@intel.com>
Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
|
|
Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
|
|
This is what we read when the CRC logic in in a powered down well. We
really don't want that to happen.
In theory, it's possible 0xffffffff to be a valid CRC value, so I don't
assert here.
Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
|
|
So the next commit won't trigger a drmModeSetCrtc() if the primary plane
doesn't have any update needing it.
This shouldn't be a problem at the moment as we don't allow the primary
plane to be of a different size than the CRTC viewport, but it will most
likely change in the future and we don't want to have that bug there.
Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
|
|
There hasn't been a libdrm release containing the universal plane
definitions yet, so add them to igt_kms to allow compilation to succeed
in the meantime.
Signed-off-by: Matt Roper <matthew.d.roper@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
|
|
None of our hardware can support this today, but we'd like to be able to
write tests that check that the kernel returns the proper error code
when userspace tries it anyway.
Signed-off-by: Matt Roper <matthew.d.roper@intel.com>
Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
|
|
Add support for universal planes. This involves revamping the existing
plane handling a bit to allow primary & cursor planes to come from the
DRM plane list, rather than always being manually added.
v2: Don't drop fixed ordering of internal plane list. Primary will
always be index 0, cursor will always be last in internal plane
list.
Signed-off-by: Matt Roper <matthew.d.roper@intel.com>
Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
|
|
Add a new public API that will attempt a display commit, but will return
an error code upon failure rather than failing the IGT test. This is
intended to allow igt tests to verify that the expected error codes are
returned to userspace when invalid requests are issued.
Note that with non-atomic programming, a single commit operation has
several potential failure points internally; the first non-zero error
code encountered will be returned immediately and no further programming
will be performed by the commit. It is the caller's responsibility to
return to a sane state.
Signed-off-by: Matt Roper <matthew.d.roper@intel.com>
Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
|
|
Add a new commit interface, igt_display_commit2(), that allows tests to
specify which programming API should be used to perform hardware
updates. COMMIT_LEGACY is the only option for now, but universal
and atomic interfaces will be added as additional options in the future.
igt_display_commit() remains unchanged for existing tests that wish to
place the hardware in a specific state, but that don't care which API is
used to achieve that state. The legacy API will be used by default for
now, but in the future we may decide to make the default API
configurable via an environment variable.
Signed-off-by: Matt Roper <matthew.d.roper@intel.com>
Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
|
|
The need to wait for a vblank after programming is due to the way we
actually program the hardware. Move need_wait_for_vblank out of the
pipe and into a local variable in preparation for future programming
styles (e.g., atomic pageflip) that will need different logic.
Signed-off-by: Matt Roper <matthew.d.roper@intel.com>
Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
|
|
The "need" flags on igt_pipe simply mirror the fb_changed field of the
primary/cursor planes. Drop them and just use fb_changed instead.
Signed-off-by: Matt Roper <matthew.d.roper@intel.com>
Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
|
|
This reinstates the #includes for lib/debug.h since without that the
shader debugger fails to build. You need to manually enable it with
./autogen.sh --enable-shader-debugger and the fail only happens when
running a clean build with
$ git clean -dfx && ./autogen.sh --enable-shader-debugger && make
I have no idea what breaks, but this restores the build.
Reported by Ben Widawsky.
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
|
|
Signed-off-by: Thomas Wood <thomas.wood@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
|
|
Add the call to memset that was accidentally removed in:
commit 1e9e1baba389fe498be12390ceeeacb1d141a5cf
Author: Daniel Vetter <daniel.vetter@ffwll.ch>
Date: Thu Mar 13 17:20:05 2014 +0100
lib/igt_kms: rip out custom verbose loggin support
Instead just piggy-pack on top of igt_log.
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Signed-off-by: Thomas Wood <thomas.wood@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
|
|
registers
intel_poller can be used to poll various display registers
(IIR,scanline/pixel/flip/frame counter, live address, etc.).
It can be used to determine eg. at which scanline or pixel count certain
events occur.
v2: s/intel_poller/intel_display_poller/
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
|
|
Add generic tools to poke at IOSF sideband. The user needs to
manually specify SB port as well as the register.
TODO: Maybe add symbolic names for the units? Would avoid having
to trawl the docs for the magic hex value.
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
|
|
If IGT_NO_FORCEWAKE is set, skip the forcewake open. Useful when you
want to poke at register without otherwise disturbing the GPU.
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
|
|
Remove the igt_assert() from the debugfs mount. It will fail if debugfs
is already mounted. With the assert in place it's very annying to use
igt without i915 loaded (eg. to dump BIOS configured registers).
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
|
|
And also pimp the spatch file itself with usage hints.
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
|
|
I've yet again totally screwed things up (this time automated with
cocci even, but not yet pushed luckily). So finally add a new version
for easier conversion and adjust the cocci script.
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
|
|
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
|
|
abort should only be used for internal library checks - using
abort() we get a "crash" result, using igt_fail we get "fail"
in piglit.
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
|
|
Also update old hunks to match on igt logging instead of fprintf.
v2: Don't forget about perror.
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
|
|
These should go to stdout instead. The next patch will clean this up
with cocci, so no change from fprintf(stdout, to printf( here.
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
|
|
Small start but useful to collect refactorings/simplifications for
common igt patterns. Please add more if you stumble over some so that
we can occasionally run this to clean up the tests.
I haven't figured out yet how to do the assert_cmpint->assert_eq
transformation.
Run this with
spatch --sp-file lib/igt.cocci --in-place tests/*.c
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
|
|
Suggested by Chris Wilson. Not yet rolled out since I'm trying to use
cocci for this.
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
|