Age | Commit message (Collapse) | Author |
|
A subtest to verify that the engine busyness is reported with expected
accuracy on platforms where the feature is available.
We test three patterns: 2%, 50% and 98% load per engine.
v2:
* Use spin batch instead of nop calibration.
* Various tweaks.
v3:
* Change loops to be time based.
* Use __igt_spin_batch_new inside timing sensitive loops.
* Fixed PWM sleep handling.
v4:
* Use restarting spin batch.
* Calibrate more carefully by looking at the real PWM loop.
v5:
* Made standalone.
* Better info messages.
* Tweak sleep compensation.
v6:
* Some final tweaks. (Chris Wilson)
Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
|
|
Pure copy of kernel's i915_pciid.h in order to keep in
sync with kernel commit '3f43031b1693 ("drm/i915/cnl:
Add Cannonlake PCI IDs for another SKU.")'
and commit 'e3890d05b342 ("drm/i915/cnl: Sync PCI ID with Spec.")'
Cc: James Ausmus <james.ausmus@intel.com>
Cc: Lucas De Marchi <lucas.demarchi@intel.com>
Cc: Paulo Zanoni <paulo.r.zanoni@intel.com>
Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
Reviewed-by: Petri Latvala <petri.latvala@intel.com>
|
|
We need more data to debug sporadic test failures.
Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
|
|
Short reads don't work, you either read the whole event or nothing
at all, so follow the recommendations in the documentation and
allocate a buffer of 4096 bytes for the event, if we capture
multiple events read them all.
Cc: Jari Tahvanainen <jari.tahvanainen@intel.com>
Reported-by: Jari Tahvanainen <jari.tahvanainen@intel.com>
Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=104538
[mlankhorst: Assign ev once in the loop, instead of 2 places. (ickle)]
Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
|
|
read_crc returns an error instead of 0 on timeout now, so handle
this correctly. This is a small error introduced in
commit 7d48c0252c384d18318de89c54817bdfe9c832fc
Author: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
Date: Fri Feb 2 13:34:25 2018 +0100
lib/igt_debugfs: Add igt_pipe_crc_get_single and igt_pipe_crc_drain, v4.
It causes the kms_chv_cursor_fail to take 27 minutes, so fix this..
Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
Reviewed-by: Petri Latvala <petri.latvala@intel.com>
|
|
When an out-fence is returned we expect that the in-fence is not
overwritten. Add a test to check for that.
Cc: Chris Wilson <chris@chris-wilson.co.uk>
Signed-off-by: Daniele Ceraolo Spurio <daniele.ceraolospurio@intel.com>
Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
|
|
==24749== Syscall param ioctl(generic) points to uninitialised byte(s)
==24749== at 0x6A8ADC7: ioctl (syscall-template.S:84)
==24749== by 0x5067687: drmIoctl (in /opt/xorg/lib64/libdrm.so.2.4.0)
==24749== by 0x138531: kmstest_set_connector_dpms (igt_kms.c:1022)
==24749== by 0x112937: set_dpms (kms_flip.c:263)
==24749== by 0x112937: run_test_step (kms_flip.c:776)
==24749== by 0x112937: event_loop (kms_flip.c:1138)
==24749== by 0x115468: run_test_on_crtc_set (kms_flip.c:1378)
==24749== by 0x115468: run_test (kms_flip.c:1450)
==24749== by 0x1111CF: main (kms_flip.c:1673)
==24749== Address 0x1ffefff2a0 is on thread 1's stack
==24749== in frame #2, created by kmstest_set_connector_dpms (igt_kms.c:1012)
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
|
|
We get occasional errors like:
(perf_pmu:21315) CRITICAL: Test assertion failure function sema_wait, file perf_pmu.c:631:
(perf_pmu:21315) CRITICAL: Failed assertion: (double)(val[1] - val[0]) <= (1.0 + (tolerance)) * (double)(slept) && (double)(val[1] - val[0]) >= (1.0 - (tolerance)) * (double)(slept)
(perf_pmu:21315) CRITICAL: 'val[1] - val[0]' != 'slept' (450000000.000000 not within 5.000000% tolerance of 500129618.000000)
Suggesting a time disagreement between userspace and the PMU.
At the moment I got no better ideas than fiddling with delays to see if it
improves things.
v2: Wait for sampling to start instead of hardcoded sleep. (Chris Wilson)
Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
|
|
Some systems cannot reach the advertised maximum frequency due throttling.
Handle them by considering a 100MHz lower limit.
v2: Use more relaxed tolerance only in the downward direction.
(Chris Wilson)
v3: Improved assert message. (Chris Wilson)
Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
|
|
Use perf timestamps in more places where possible.
v2: Log measure_usleep vs perf timestamps. (Chris Wilson)
Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
|
|
Try to reset the GPU from within igt_require_gem() if we notice we are
starting with a wedged device. If it remains wedged, the test definitely
cannot run. We leave a warning in place to highlight the potentially
suspect result, which will keep the flip-flops alive in CI!
v2: Split out device reset to avoid reusing a local variable
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Reviewed-by: Antonio Argenziano <antonio.argenziano@intel.com>
|
|
ctg/ilk
On ctg/ilk, for whatever reason, MI_STORE_DWORD is a privileged operation
so we must request a SECURE batch.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
|
|
We run the per-engine scheduling smoketests across all engines, the
opposite of what was intended!
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Reviewed-by: vinay.belgaumkar@intel.com
|
|
The test is modified to test all pixel formats on a plane, unless
the pixel format is overridden by the subtest.
Attempting to test all pixel formats requires even more runtime and
the overhead of toggling crc collection to capture a single CRC
becomes significant, so keep the crc collection enabled during the entire test.
This reduces the runtime from ~24s to ~16s per subtest on SKL.
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 seems to open code igt_calc_fb_size and igt_create_fb, just use both.
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 won't clean up resources between subtests, so if subtests fail
the next subtest will clean up everything. This allows all subtests
even if one fails.
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 is already tested by the rotation tests, which require Y-tiled
for 90° and 270° rotations.
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>
|
|
The -flip tests are the same, but with a pageflip at the end,
since the test is otherwise the same, run the test once with flips
always enabled when possible.
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>
|
|
Instead of 2 functions doing the same thing, consolidate to a single function.
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>
|
|
bad-tiling test didn't work, LOCAL_DRM_FORMAT_MODE_NONE == 0, so
the fb was created with tiling = Y, but because test_bad_format
was set but override_tiling wasn't, we fell through to the success
case. Always assume failure if test_bad_format is set, and pass X
tiled for fb, so the format override works.
Also clear variables after subtests in main, so if the next subtest
doesn't run we still clear the variables.
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>
|
|
Collecting CRC may result in a modeset and extra vblank waits. On some
tests this will increase the runtime a lot, so it makes sense to
keep it enabled, and only collect the most recent CRC when needed.
Changes since v1:
- Fix read_crc semantics. (Ville)
Changes since v2:
- Remove EAGAIN assert, can be reached from drain_crc.
Changes since v3:
- Do not infinitely loop in igt_pipe_crc_drain().
Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
Reviewed-by: Mika Kahola <mika.kahola@intel.com> #v2
Tested-by: Vidya Srinivas <vidya.srinivas@intel.com>
|
|
All users have been converted to igt_fb_supported_format(),
I don't think there's a valid use left for this.
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 makes it possible to iterate whether a format is supported or not,
without each driver having to open code it.
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 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 make it easier for tests to unconditionally call
igt_remove_fb, without first checking whether the FB is allocated.
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>
|
|
We don't expect to be able to open the I915_SAMPLE_SEMA on gen5 and
earlier as the HW doesn't support semaphores.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Reviewed-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
|
|
During the startup, we try to determine if the system supports rc6 prior
to testing. However, the startup check asserts the residency debugfs
exists, instead of testing for a requirement.
v2: Throw in some passing indentation cleanups.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Reviewed-by: Antonio Argenziano <antonio.argenziano@intel.com>
|
|
Make sure we test every plane on the pipe, and only report a SKIP
if none of the planes support CCS (or the pixel format).
Cc: Gabriel Krisman Bertazi <krisman@collabora.co.uk>
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=104724
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Reviewed-by: Marta Lofstedt<marta.lofstedt@intel.com>
|
|
There's no need to house fb and fb_sprite in the data_t. Just suck
them into try_config(). Much cleaner since we no longer have to match
the fb setup done in try_config() in test_output(). Also I think doing
multiple try_config()s (like done by TEST_CRC) would leak one of the
primary fbs.
Cc: Gabriel Krisman Bertazi <krisman@collabora.co.uk>
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Reviewed-by: Marta Lofstedt<marta.lofstedt@intel.com>
|
|
gen11 execlist submission is done through the submit queue
registers (ELSQ). See kernel patch "drm/i915/icl: Enhanced
execution list support"
Signed-off-by: Scott D Phillips <scott.d.phillips@intel.com>
Tested-by: Jordan Justen <jordan.l.justen@intel.com>
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
Signed-off-by: Ben Widawsky <ben@bwidawsk.net>
|
|
Test to check that the RC6 counter works as expected during and after
runtime suspend.
v2:
* Use correct sysfs root by using IGT helpers.
* Turn off display to allow runtime suspend. (Imre)
* Two subtest flavours.
v3:
* drmModeFreeResources. (Chris Wilson)
Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
|
|
We can use perf reported timestamps to potentially get a more accurate
frequency average.
Lets see if this improves the situation for sporadic failures like on APL:
Frequency: min=100, max=750, boost=750 MHz
Min frequency: requested 90.0, actual 90.0
Max frequency: requested 749.8, actual 647.9
Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
|
|
This patch adds a context creation ioctl wrapper that returns the error
for the caller to consume. Multiple tests that implemented this already,
have been changed to use the new library function.
v2:
- Add gem_require_contexts() to check for contexts support (Chris)
v3:
- Add gem_has_contexts to check for contexts support and change
gem_require_contexts to skip if contests support is not available.
(Chris)
v4:
- Cosmetic changes and use lib function in gem_ctx_create where
possible. (Michal)
v5:
- Use gem_contexts_require() in tests and fixtures. (Chris)
Signed-off-by: Antonio Argenziano <antonio.argenziano@intel.com>
Cc: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Michał Winiarski <michal.winiarski@intel.com>
Reviewed-by: Michał Winiarski <michal.winiarski@intel.com>
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
|
|
This test emits a spin batch which runs roughly for N CPU cores seconds
As such these can be declared as GPU hangs, so work around that by looping
with shorter batches.
v2:
* Use overlapping spinners. (Chris Wilson)
* Go back to igt_fork. (Chris Wilson)
Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
|
|
Test will succeed if present engine can be opened, or if the missing
engine reports the correct error code.
v2:
* Use the right errno.
* Close fd only on success. (Chris Wilson)
v3:
* Only sample errno on failure. (Chris Wilson)
Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
|
|
Always skip missing engines to make tests skips very early and avoid
losing time in tests which need to do setups or waits before they would
otherwise detect this.
To ensure PMU is rejecting opening missing engines we will add an explicit
test later.
v2: Use subtest groups for engine checking. (Chris Wilson)
Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
|
|
Test that the PMU can be safely enabled in face of interrupt-heavy load on
an engine.
The test is probabilistic so run it for ten seconds in a loop to increase
the odds of hitting the race.
v2: Repeat the test a few times, until a timeout. (Chris Wilson)
v3: Added note in code and commit about probabilistic nature of the test.
(Chris Wilson)
Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
|
|
Additional set of tests which stops the batch and sleeps for a bit
before sampling the counter in order to test that the busyness stop
being recorded correctly.
v2: Reorganize end_spin and guards a bit. (Chris Wilson)
Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
Suggested-by: Chris Wilson <chris@chris-wilson.co.uk>
Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk> # v1
Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
|
|
Will need more modes soon.
Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
|
|
Stop relying on timers to end spin batches but use measured sleep, which
was established to work better, in all time based tests.
Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
|
|
Where we use measured sleeps, take PMU samples immediately before and
after and look at their delta in order to minimize the effect of any
test setup delays.
Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
|
|
In cases where we manually terminate the busy batch, we always want to
sample busyness while the batch is running, just before we will
terminate it, and not the other way around. This way we make the window
for unwated idleness getting sampled smaller.
Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
|
|
Dynamic Refresh Rate Switch(DRRS) is used to switch the panel's
refresh rate to the lowest vrefresh supported by panel, when frame is
not flipped for more than a Sec.
In kernel, DRRS uses the front buffer tracking infrastructure.
Hence DRRS test coverage is added along with other frontbuffer tracking
based features such as FBC and PSR tests.
Here, we are testing DRRS with other features in all possible
combinations, in all required test cases, to capture any possible
regression.
v2: Addressed the comments and suggestions from Vlad, Marius.
The signoff details from the earlier work are also included.
v3: Modified vblank rate calculation by using reply-sequence,
provided by drmWaitVBlank, as suggested by Chris Wilson.
v4: As suggested from Chris Wilson and Daniel Vetter
1) Avoided using pthread for calculating vblank refresh rate,
instead used drmWaitVBlank reply sequence.
2) Avoided using kernel-specific info like transitional delays,
instead polling mechanism with timeout is used.
3) Included edp-DRRS as a subtest in kms_frontbuffer_tracking.c,
instead of having a separate test.
v5: This patch adds DRRS as a new feature in the
kms_frontbuffer_tracking IGT.
DRRS switch to lower vrefresh rate is tested at slow-draw subtest.
Note:
1) Currently kernel doesn't have support to enable and disable
the DRRS feature dynamically(as in case of PSR). Hence if the
panel supports DRRS it will be enabled by default.
This is in continuation of last patch
"https://patchwork.freedesktop.org/patch/162726/"
v6: This patch adds runtime enable and disable feature for testing DRRS
v7: This patch adds runtime enable and disable feature for testing DRRS
through debugfs entry "i915_drrs_ctl".
v8: Commit message is updated to reflect current implementation.
v9: Addressed Paulo Zanoni comments.
Check for DRRS_LOW at tests with OFFSCREEN + FBS_INDIVIDUAL.
v10: Corrected DRRS state expectation in suspend related subtests.
v11: Removing the global flag is_psr_drrs_combo [Rodrigo].
v12: Rewriting the DRRS inactive deduction [Rodrigo].
v13: En/Dis-able DRRS only when DRRS is capable on the setup.
v14: Handle the error states of drrs_enable only [Rodrigo].
v15: Resolved compiler warning and rebased.
Signed-off-by: Lohith BS <lohith.bs@intel.com>
Signed-off-by: aknautiy <ankit.k.nautiyal@intel.com>
Reviewed-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
|
|
Run across all combinations of pixel formats to ensure better testing.
Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
Reviewed-by: Mika Kahola <mika.kahola@intel.com>
|
|
This will allow us to test NV12 as well, when available.
Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
Reviewed-by: Mika Kahola <mika.kahola@intel.com>
|
|
This check was missing, and caused a WARN_ON that dates back to
the original design of atomic.
Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
Acked-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Reviewed-by: Mika Kahola <mika.kahola@intel.com>
|
|
fb3 is unused, and fb_id1/2 are also set in igt_framebuffer, so
it doesn't need separate member values.
image_w/h are also unused and create_fb will always succeed, so
more elimination of dead code.
Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
Reviewed-by: Mika Kahola <mika.kahola@intel.com>
|
|
igt_system_suspend_autoresume() calls igt_require(), which isn't allowed
to be called from a forked child. Run subtests directly from the test body,
except when a forked test is requested.
Changes since v1:
- Fixed to actually compile..
Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=104783
Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
|
|
If we fail to clear the other fields inside the register spec, they may
be left with garbage instructing us to access the register via an
invalid path.
v2: Grab Mika's fix for get_regs() and check all parse_port_desc()
callers.
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=104895
Fixes: 7f0be0e7d9be ("tools/intel_reg: Add reading and writing registers through engine")
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Jani Nikula <jani.nikula@intel.com>
CC: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
Cc: Mika Kuoppala <mika.kuoppala@linux.intel.com>
Reviewed-by: Jani Nikula <jani.nikula@intel.com>
Reviewed-by: Mika Kuoppala <mika.kuoppala@linux.intel.com>
|
|
The 'v' variable isn't defined in this part of the 'TracepointFmt'
rule but because of the way the generator produces code (one function
per rule) it doesn't realize we're accessing a variable from a
different case of the rule and this doesn't lead to a C compiler error
on undefined variable.
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
|