Age | Commit message (Collapse) | Author |
|
If KMS is not supported on the device, drmModeGetResources() will return
NULL, often this is an indication that we should not attempt to run the
test. Although it would be preferred to use something like
igt_require_display() as the canonical check and assert that
drmModeGetResources() did not hit an error, it is not always practical
as the tests do not utilize the common igt_display abstraction.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Reviewed-by: Arkadiusz Hiler <arkadiusz.hiler@intel.com>
|
|
Take the device fd from the caller as to which card we should try and
enable connectors for (or else we may not enable the right connectors
for the test!) and fail gracefully if there is no kms support on the
device.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Reviewed-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
|
|
Instead of passing around a boatload of integers everywhere let's
just pass around the igt_fb struct. That obviously means we have to
populate it first sufficiently, to which end we'll add a small helper.
Later on the stride/size calculations will consult the already
pre-populated igt_fb and fill in the rest as needed.
This makes the whole thing a lot less error prone as it's impossible
to accidentally pass the arguments in the wrong order when there's
just the one of them, and it's a pointer.
v2: Rebase due to uint64_t size
Cc: Paulo Zanoni <paulo.r.zanoni@intel.com>
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Reviewed-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
|
|
Time intervals as produced by timersub() are normalized to have
the tv_usec in the range 0-999999. That leads to very confusing
looking debug output for negative interval. Eg. an interval
of -0.1 seconds would be represented as tv_sec=-1, tv_usec=900000.
Let's just convert the thing to a float seconds value and print
that so that we'll get less confusing debug output.
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
|
|
This cleans up the tests slightly.
Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
Reviewed-by: Mika Kahola <mika.kahola@intel.com>
Tested-by: Vidya Srinivas <vidya.srinivas@intel.com>
|
|
This will allow support for NV12 in the future, where igt_get_cairo_ctx
will return a RGB image to draw with, which will be converted in
igt_put_cairo_ctx so tests don't have to add special support for NV12.
This is the same as cairo_destroy + checking for errors, but not all
tests use this correctly so it's better to have a single handler for it.
Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
|
|
wf_vblank is redundant with wf_vblank-ts-check, which also performs
a check but runs in the same way.
The -EINVAL vblank tests are reproduced in kms_vblank, as are the
vblank-vs-* tests.
Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>
|
|
There's no need to test this more than once. Add a NOHANG
flag which can be used to specify that a subtest can not
be run when hanging. If it's set on either the subtest or
the mode, the -hang test for this combination will not be
generated.
Changes since v1:
- Merge the patch that renamed HANG to NOHANG.
- Rebase after 'reorganize subtests by type'.
- Allow subtests to specify NOHANG too.
Changes since v2:
- Mark accuracy test with NOHANG, gpu reset disables interrupts,
causing the test to fail.
Changes since v3:
- Rebase on top of subtest split changes.
- Add nohang comment to accuracy test. (Daniel)
Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>
|
|
With the removal of mmio flips, blt and rcs flips are no longer
different from doing busy testing in kms_busy.
Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
Acked-by: Daniel Vetter <daniel.vetter@ffwll.ch>
|
|
Since igt_spin_batch_new() will do a stalling GEM check, it is not
advisable to use it within loops. Perform the igt_require_gem() upfront
and then use __igt_spin_batch_new() inside the test loop.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Reviewed-by: Arkadiusz Hiler <arkadiusz.hiler@intel.com>
|
|
We tried to allow very large buffers (larger than the mappable aperture)
to be flippable by allowing them to be bound into the unmappable region.
Sadly, not all of our hw is capable of utilising the unmappable region for
scanout (and on some older hw, there is only mappable). As such, we have
to allow the very large bo to either succeed in being flipped, or fail
with the expected E2BIG.
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=100917
References: 9d5e393da3f5 ("igt/kms_flip: There's no such thing as bo-too-big")
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Reviewed-by: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
|
|
This reverts commit 7296e09ee7f17e6d564e52cf64ee900670849429.
This commit was accidentally applied twice, the first time in
commit e4ba3b75e6de35483b2edea21ceda145ef0b3311.
Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
CC: Daniel Vetter <daniel.vetter@ffwll.ch> #irc
|
|
General update to reflect current state of things.
Signed-off-by: Arkadiusz Hiler <arkadiusz.hiler@intel.com>
Acked-by: Radoslaw Szwichtenberg <radoslaw.szwichtenberg@intel.com>
Acked-by: Petri Latvala <petri.latvala@intel.com>
|
|
We have it. Daniel Stone said the #ifdef HAVE_CONFIG_H comes from the
X11 transition to the modular build, where in the imake -> modular
build transition config.h wasn't universally available. Now we just
make this a requirement (so yeah Android better generate one too).
v2: Improve commit message a bit.
Reviewed-by: Eric Anholt <eric@anholt.net>
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>
|
|
We queue N low priority hanging batches across the engines
and check that our high priority write over takes them.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Reviewed-by: Michał Winiarski <michal.winiarski@intel.com>
|
|
The goal of these subtests was just to delay a kms operation a little
bit. The goal wasn't to
- spin until the operation was completed. That results in a gpu hang,
and gpu hangs need igt_hang for safety.
- complete it before the operation. That's just pointless.
Fix it by using the timeout support.
This was all broken in the initial conversation:
commit 96ec8cb3b5ec1fc2927d6cff8e09930082301d7e
Author: Abdiel Janulgue <abdiel.janulgue@linux.intel.com>
Date: Sat Oct 29 01:01:05 2016 +0300
igt/kms_flip: Use new igt_spin_batch
Note that part of the damage was removed already in
commit b0081ea9cb7d39234fd0fcc64dd56ed4f5d50b05
Author: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
Date: Wed Aug 9 11:11:52 2017 +0200
tests/kms_flip: Remove $engine-flip-vs-dpms/modeset
But this patch also made things worse, because it remove code that
wasn't dead yet (because it didn't remove all the dpms vs spinning
batch tests).
v2: Augment commit message and use macro for 1s-in-ns.
Cc: Tomeu Vizoso <tomeu.vizoso@collabora.com>
Cc: Abdiel Janulgue <abdiel.janulgue@linux.intel.com>
Cc: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
Reviewed-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
|
|
This is already tested in kms_busy, and without cs flips there's no
point in doing those tests any more.
The removed tests were broken and caused GPU hangs because the spin
batch was not unblocked correctly.
Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>
|
|
Currently the panning tests actually stop panning when they hit the
right edge fo the framebuffer. Let's make them ping-pong across the
fb to make it clear that they are indeed trying to pan around all the
time.
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
|
|
This is explicitly tested in kms_setmode.basic
Suggested-by: Chris Wilson <chris@chris-wilson.co.uk>
Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
|
|
DRM_EVENT_CONTEXT_VERSION is the latest context version supported by
whatever version of libdrm is present. igt was blindly asserting it
supported whatever version that may be, even if it actually didn't.
With libdrm 2.4.78, setting a higher context version than 2 will attempt
to call the page_flip_handler2 vfunc if it was non-NULL, which being a
random chunk of stack memory, it might well have been.
Set the version as 2, which should be bumped only with the appropriate
version checks.
Signed-off-by: Daniel Stone <daniels@collabora.com>
Reviewed-by: Petri Latvala <petri.latvala@intel.com>
|
|
This fixes the following failure in kms_flip:
(kms_flip:12099) CRITICAL: Test assertion failure function calibrate_ts, file kms_flip.c:1190:
(kms_flip:12099) CRITICAL: Failed assertion: poll(&(struct pollfd){drm_fd, POLLIN}, 1, -1) == 1
(kms_flip:12099) CRITICAL: Last errno: 4, Interrupted system call
Stack trace:
#0 [__igt_fail_assert+0xf1]
#1 [run_test_on_crtc_set.constprop.13+0x18f3]
#2 [run_pair+0x31f]
#3 [main+0x463]
#4 [__libc_start_main+0xf0]
#5 [_start+0x29]
#6 [<unknown>+0x29]
Subtest 2x-plain-flip-ts-check-interruptible failed.
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=99651
Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
|
|
If we run the full testsuite, the drm_fd is set to nonblocking - so we
have to explicitly wait using poll rather than rely on a blocking read
for the vblank event.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
|
|
Adjust the description and constants in the timing check to match each other.
Relax the timing constraint to prevent false positives in vblank interval checking.
|
|
Signed-off-by: Abdiel Janulgue <abdiel.janulgue@linux.intel.com>
Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
|
|
v7: Reuse NSEC_PER_SEC defines
v8: Don't wait on the fb, it must be busy. Exit the spin batch
when flip is queued (Chris Wilson)
v10: Adapt to api rename
Cc: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
Reviewed-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
Signed-off-by: Abdiel Janulgue <abdiel.janulgue@linux.intel.com>
|
|
We were passing in two places a framebuffer modifier constant instead of
a tiling constant.
Also adds igt_fb_mod_to_tiling so tests can do that by themselves.
Cc: Tvrtko Ursulin <tursulin@ursulin.net>
Fixes: 8a1a38661f56 ("lib: Add igt_create_bo_with_dimensions")
Signed-off-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
|
|
Since the modeline may differ from actual hardware timings, do not rely
upon it but instead measure the actual and verify that it does not
change across the various flip/vblank configurations.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
|
|
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
|
|
We assert that the interval between a vblank and a flip corresponds with
the computed frametime derived from the modeline. However, historically
the dotclock is unreliable (in error of about 1%) for VBT supplied data
about LVDS panels - the situation looks to be much improved with eDP at
least. The simple fact that we cannot rely on the manufacturer's supplied
modeline causes us to fail the test. So before we claim a driver failure,
do a calibration pass and check for inconsistencies with the modeline.
v2: Refine the failure message when skipping
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
|
|
We have a cantiga that doesn't pass
igt@kms_flip@basic-flip-vs-wf_vblank, and so knowing why is off the
upmost priority! Before the assertions print the values we are about to
test in greater detail.
References: https://bugs.freedesktop.org/show_bug.cgi?id=98352
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
|
|
To have a more accurate idea about any suspend/resume issues we can
perform the s/r until various phases in the s/r sequence. This way we
can isolate the given problem as being a device driver, kernel core or
BIOS related issue. Actual subtests using these new s/r phases will be
added as follow-up.
While at it also add the freeze suspend target, it's something we also
would need to test.
Signed-off-by: Imre Deak <imre.deak@intel.com>
|
|
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
|
|
Since we can now use the entire global GTT for display, we can handle
framebuffers that no longer fit into the mappable aperture. Update the
kms_flip/bo-too-big expectations.
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=97502
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
|
|
Change __wait_for_vblank() to use kmstest_get_vbl_flag() helper function.
Signed-off-by: Robert Foss <robert.foss@collabora.com>
Signed-off-by: Marius Vlad <marius.c.vlad@intel.com>
|
|
Let's make sure the ts vs. seq difference between the current and last
events match.
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
|
|
To aid in diagnosing failures, print out the expected time
difference between the two events.
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
|
|
Include diff.tv_secs in the jitter comparison.
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
|
|
Replace some opencoded numbers with USEC_PER_SEC, and
print the usec_diff with 6 decimal digits to make things
more consistent.
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
|
|
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
|
|
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
|
|
basic-flip-vs-wf_vblank subtest sometimes fails asserting counted frames to
be aproximately equal with the estimated number.
This is a false negative, one of the reasons being the precision lost when
truncating a fractional number.
Fixed this by using floating point arithmetic.
Cc: Jani Nikula <jani.nikula@intel.com>
Cc: Daniel Vetter <daniel.vetter@intel.com>
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=95380 [mvlad]
Signed-off-by: Gabriel Feceoru <gabriel.feceoru@intel.com>
Signed-off-by: Marius Vlad <marius.c.vlad@intel.com>
|
|
So that this test can be run in drivers other than i915.
Signed-off-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
|
|
Because bufmgr is currently a i915-only thing and it's only needed in a
subset of the subtests, require it only in the subtests that actually
need it so that the other subtests aren't skipped without a reason.
Signed-off-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
|
|
Because attempts to create a tiled BO will cause a igt_require call to
fail on drivers that don't support tiling, do so in the subtest that
actually needs it so that other subtests aren't skipped without reason.
Signed-off-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
|
|
Seems like an overkill for a basic test to keep flipping for
a full minute. Dial it down a bit.
Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
Signed-off-by: Marius Vlad <marius.c.vlad@intel.com>
|
|
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
|
|
During suspend tests we can exceed the current 100 frame difference
in sequence numbers. Bump the limit to 150 frames.
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
|
|
igt_kms.c: In function ‘igt_crtc_set_background’:
igt_kms.c:1940:2: warning: format ‘%lu’ expects argument of type ‘long unsigned int’, but argument 5 has type ‘uint64_t’ [-Wformat=]
LOG(display, "%s.%d: crtc_set_background(%lu)\n",
^
intel_firmware_decode.c: In function ‘csr_open’:
intel_firmware_decode.c:169:2: warning: format ‘%zd’ expects argument of type ‘signed size_t’, but argument 3 has type ‘__off_t’ [-Wformat=]
printf("Firmware: %s (%zd bytes)\n", filename, st.st_size);
^
intel_gpu_top.c: In function ‘main’:
intel_gpu_top.c:683:10: warning: format ‘%lu’ expects argument of type ‘long unsigned int’, but argument 3 has type ‘uint64_t’ [-Wformat=]
stats[i] - last_stats[i]);
^
hsw_compute_wrpll.c: In function ‘main’:
hsw_compute_wrpll.c:644:3: warning: format ‘%li’ expects argument of type ‘long int’, but argument 7 has type ‘long long int’ [-Wformat=]
igt_fail_on_f(ref->r2 != r2 || ref->n2 != n2 || ref->p != p,
^
gem_gtt_hog.c: In function ‘__real_main155’:
gem_gtt_hog.c:177:2: warning: format ‘%lu’ expects argument of type ‘long unsigned int’, but argument 4 has type ‘unsigned int’ [-Wformat=]
igt_info("Time to execute %lu children: %7.3fms\n",
^
kms_flip.c: In function ‘run_test_step’:
kms_flip.c:985:3: warning: format ‘%u’ expects argument of type ‘unsigned int’, but argument 10 has type ‘__time_t’ [-Wformat=]
igt_assert_f(end - start > 0.9 * frame_time(o) &&
^
kms_flip.c:985:3: warning: format ‘%u’ expects argument of type ‘unsigned int’, but argument 11 has type ‘__suseconds_t’ [-Wformat=]
kms_frontbuffer_tracking.c: In function ‘setup_sink_crc’:
kms_frontbuffer_tracking.c:1364:3: warning: format ‘%ld’ expects argument of type ‘long int’, but argument 4 has type ‘ssize_t’ [-Wformat=]
igt_info("Unexpected sink CRC error, rc=:%ld errno:%d %s\n",
^
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
|
|
Speeds up testcases except for those where we want to exercise the
probing itself. The only exceptions left where we do a full probe are
- pm_rpm: We use it to make sure the kernel doesn't get things wrong
with power domains, so we really want to exercise the full probe
paths. And there the only place really is the specific validation
done with the data gathered by get_drm_info.
- kmstest_force_ functions: Newer kernels should be better at
re-probing state when the force sysfs fields change, but better safe
than sorry.
v2: I also consolidated the start_n_modes and start_connectors while
at it - move one of the fixup hunks to this patch that accidentally
got misplaced (Thomas).
Cc: Thomas Wood <thomas.wood@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
|
|
If the caller is going to specify a custom size, it's likely that he
will also specify a custom stride. The automatic stride picked by
create_bo_for_fb() is too huge for tiled buffers, so if the caller
wants smaller buffers, then he'll need a smaller stride too, otherwise
the Kernel will reject the addfb IOCTL due to stride * height being
bigger than the size.
I want to make tests/kms_frontbuffer_tracking use
igt_create_fb_with_bo_size() so I can provide smaller buffers that
will fit into the CFB. I'm also planning to make all frontbuffers with
the same width/height/format have the same stride and size regardless
of tiling method so I can exercise specific code paths.
Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
|