Age | Commit message (Collapse) | Author |
|
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>
|
|
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
|
|
To make more multi-pipe tests run on IVB, do the modesets in the reverse
order (ie. pipe C first, pipe A last). This way pipe B can't reserve the
2 shared FDI lanes before pipe C is set up.
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
|
|
Currently kms_flip leaks the state of the pipes from one subtest to the
next. Meaning a single pipe test can actually have two or more pipes
actually up and running, and similarly a two pipe test can have three
pipes running.
This is particularly nasty on IVB since one of the pipes still running
but not actually part of the test maybe have reserved the shared FDI
lanes, thus preventing one of the pipes taking part in the test from
being enabled.
To avoid such problems explicitly disable all pipes before each
subtests.
v2: Use kmstest_unset_all_crtcs() (Paulo)
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
|
|
Print the pipes and connectors in a human readable form instead of using
the integer IDs.
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
|
|
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
|
|
Don't use the rounded vrefresh info to predict the frame duration.
Instead calculate if from the clock.
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
|
|
Apply the new API to all call sites within the test suite using the following
semantic patch:
// Semantic patch for replacing drm_open_any* with arch-specific drm_open_driver* calls
@@
identifier i =~ "\bdrm_open_any\b";
@@
- i()
+ drm_open_driver(DRIVER_INTEL)
@@
identifier i =~ "\bdrm_open_any_master\b";
@@
- i()
+ drm_open_driver_master(DRIVER_INTEL)
@@
identifier i =~ "\bdrm_open_any_render\b";
@@
- i()
+ drm_open_driver_render(DRIVER_INTEL)
@@
identifier i =~ "\b__drm_open_any\b";
@@
- i()
+ __drm_open_driver(DRIVER_INTEL)
Signed-off-by: Micah Fedke <micah.fedke@collabora.co.uk>
Signed-off-by: Thomas Wood <thomas.wood@intel.com>
|
|
Add a header that includes all the headers for the library. This allows
reorganisation of the library without affecting programs using it and
also simplifies the headers that need to be included to use the library.
Signed-off-by: Thomas Wood <thomas.wood@intel.com>
|
|
Simple variants that don't do multiple output or interruptible testing.
v2: add vblank variant, remove duplication (Daniel)
Reviewed-by: Daniel Vetter <daniel@ffwll.ch>
Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
|
|
Convenience wrapper suggested by Chris for igt_set_timeout(0, NULL).
v2: While at it add an empty line in kms_flip to make
set/reset_timeout a visual block.
Cc: Chris Wilson <chris@chris-wilson.co.uk>
Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
|
|
"Timed out" isn't a terribly informative message, allow users to set
something more informative. Inspired by a request from Jesse.
Cc: Jesse Barnes <jbarnes@virtuousgeek.org>
Reviewed-by: Jesse Barnes <jbarnes@virtuousgeek.org>
Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
|
|
This converts the IGT API only, underneath legacy set_tiling is still used.
v2: One got away in kms_flip.
Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
|
|
The integer comparison macros give us better error output by including
the actual values that failed the comparison.
Signed-off-by: Matt Roper <matthew.d.roper@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
|
|
The bare "Test requirement: modes" message is too cryptic, I had to go and
read the source code to understand the missing requirement.
Signed-off-by: Marc Herbert <marc.herbert@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
|
|
Also move forcewake and stop_rings code from igt_debugfs to igt_gt
since it fits better. And move the hang injection fork helpers from
igt_aux to igt_gt, too.
Also push the intel_gen call into igt_hang_ring while at it.
Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
|
|
It collides with the subtest naming convention glossary entry for swap.
Which makes the docbook xml stuff unhappy.
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
|
|
Yeah, historically grown but we should try to be somewhat consistent.
It helps with filtering testcases.
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
|
|
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
|
|
Aim the dummy load to the current back buffer instead if the front
buffer. Assuming the idea is to get the next flip to be stuck behind
the dummy load?
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
|
|
Try to tune the dummy load to ~1 second. The calibration happens the
first time dummy load is generated.
v2: Actually do the number of ops intended and
calibrate to 1 second and not 2
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
|
|
Make the dummy load independent of the display resolution by using a
two fixed size dummy bos to generate the load. As a final step do
another copy from one of the dummy bos to the fb to make sure there's
a dependency between the dummy load and any subsequent operation on
the fb.
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
|
|
Pull the code to emit a single blit to a separate function.
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
|
|
Found some open coded min()/max()/swap() macros.
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
|
|
If we wait for one vblank, we may end up returning almost immediately,
so trying to assert anything but >0 about the minimum duration is
bogus.
Instead wait for two vblanks and then we can assert that we should have
be blocked for at least one frame. And move the upper bound to a little
over two frames to match.
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=79050
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
|
|
kms_flip/nonblocking-read will block indefinitely if it fails, so
introduce a timeout to indicate test failure.
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=85718
Signed-off-by: Thomas Wood <thomas.wood@intel.com>
|
|
Signed-off-by: Thomas Wood <thomas.wood@intel.com>
|
|
Make sure DSPSURF will change during the panning operation
in flip-vs-panning-vs-hang.
This will now test agains bugs between the kernel's mmio vs.
CS flip race handling and GPU resets. If the kernel is buggy
if will fail to notice that the panning operation changed the
base address before the GPU reset had a chance to deal with the
pending page flips, and so the flip would never complete due to
DSPSURFLIVE not matching the expected value.
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
|
|
Signed-off-by: Thomas Wood <thomas.wood@intel.com>
|
|
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
|
|
Signed-off-by: Thomas Wood <thomas.wood@intel.com>
|
|
These tests require DRM master right, so make sure they have it from the
beginning. This gives an early indication if another DRM master is running
and makes the given test skip (with a proper explanation of the reason)
instead of exiting with error.
Signed-off-by: Imre Deak <imre.deak@intel.com>
|
|
Since relocations are variable size, depending upon generation, it is
easier to handle the resizing of the batch request inside the
BEGIN_BATCH macro. This still leaves us with having to resize commands
in a few places - which still need adaption for gen8+.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
|
|
This reveal that quite a few locations were writing relocation offsets
but only allowing for 32 bit addresses. To reveal such places in active
tests, we also now double check that we do not use more batch space than
declared.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
|