Age | Commit message (Collapse) | Author |
|
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>
|
|
I wrote it, but couldn't reread myself... This doesn't contain any
change apart from reindenting.
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
|
|
It seems we handle -f but we forgot to list it.
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
|
|
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Testcase: igt/perf/buffer-fill & igt/perf/enable-disable & igt/perf/gen8-unprivileged-single-ctx-counters
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=104658
Reviewed-by: Matthew Auld <matthew.auld@intel.com>
|
|
For NV12 a format conversion is needed. Because YUV formats are not
fully defined with just a fourcc, I've chosen BT.601 limited range.
This puts the pixel center of the CbCr components between the top
left Y and bottom left Y:
Y Y Y Y
UV UV
Y Y Y Y
Some work is put into optimising the conversion routines in order to
make it fast enough. Before converting nv12 to rgb24, it is copied to
a temporary buffer to take advantage of memory caching. This is
approximately 20x faster than directly reading the BO.
When testing on my KBL with a 1080p buffer, it takes approximately
.1s to convert either way, this is fast enough not to bother optimising
even further for me.
Changes since v1:
- Use BT.601 instead of BT.709 coefficients.
Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
Reviewed-by: Mika Kahola <mika.kahola@intel.com>
|
|
Add support to create planar framebuffers, but don't add formats
that support them yet. This first requires conversion to the RGB24 format.
Changes since v1:
- Don't crash in igt_create_bo_with_dimensions().
Changes since v2:
- Zero offsets for dumb fb too.
Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
Reviewed-by: Mika Kahola <mika.kahola@intel.com>
[mlankhorst: Change memset(4 * ..) to memset(ARRAY_SIZE(format->plane_bpp) * ..)]
|
|
Nothing uses this currently, but other copy functions have the same delta now.
Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
Reviewed-by: Mika Kahola <mika.kahola@intel.com>
|
|
Adding a delta offset will allow us to copy planar framebuffers with this
function.
Changes since v1:
- Set src and destination addresses to the delta, in case BO is mapped at offset 0.
Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
Reviewed-by: Mika Kahola <mika.kahola@intel.com> #v1
|
|
By adding support for planar formats to igt_calc_fb_size and create_bo_for_fb,
we can calculate dimensions and create backing storage for planar framebuffers.
This is required for adding support to create planar framebuffers in the next patch.
Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
[mlankhorst: Use plane < ARRAY_SIZE(format->plane_bpp) instead of < 4.]
Reviewed-by: Mika Kahola <mika.kahola@intel.com>
|
|
bpp is only sufficient to calculate dimensions for packed formats, in
case of planar formats we need to pass the drm format fourcc, which
will give us better information.
This is required for supporting planar framebuffers.
Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
Reviewed-by: Mika Kahola <mika.kahola@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>
|
|
This was a test that required manual verification to see whether FBC,
was handled correctly. But the automated testing has been added with
kms_frontbuffer_tracking, so this test no longer serves a purpose.
Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
Cc: Imre Deak <imre.deak@intel.com>
Cc: Chris Wilson <chris@chris-wilson.co.uk>
Suggested-by: Chris Wilson <chris@chris-wilson.co.uk>
Acked-by: Imre Deak <imre.deak@intel.com>
|
|
Subtest 'secure-non-master' tries to drop drm-master privileges on a
non drm-master fd. Instead drop master privileges after the subtest
acquires it so that other subtests are not affected by it.
v2:
- Require root privilege for the sub-test. (Chris)
V3:
- Cosmetic refactoring. (Chris)
Signed-off-by: Antonio Argenziano <antonio.argenziano@intel.com>
Cc: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
Cc: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
|
|
Add option to specify engine for register read/write operation.
If engine is specified, use MI_LOAD_REGISTER_IMM and MI_STORE_REGISTER_IMM
to write and read register using a batch targeted at that engine.
v2: no MI_NOOP after BBE (Chris)
v3: use modern engine names (Chris), use global fd
v4: strcasecmp (Chris)
v5: use register definition format for engine (Jani)
Cc: Jani Nikula <jani.nikula@intel.com>
Cc: Chris Wilson <chris@chris-wilson.co.uk>
CC: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
Signed-off-by: Mika Kuoppala <mika.kuoppala@linux.intel.com>
Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk> (v4)
Acked-by: Jani Nikula <jani.nikula@intel.com>
|
|
Since kernel commit e995ca0b8139 ("drm/i915: Provide a device level
.mode_valid() hook") i915 will bluntly reject the HSKEW mode flag. Thus
we can't abuse it to force a modeset.
Since we don't particularly care about the visual results here we can
risk making the display unhappy by eg. flipping the hsync polarity
instead.
Also add a comment documenting why we're doing this.
Cc: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=104848
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Reviewed-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
|
|
As we loop over the coherency tests many times, we need to close the
dmabufs opened on every pass to prevent a fd leak and the test
exploding when it hits the process limit.
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=103649
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Reviewed-by: Antonio Argenziano <antonio.argenziano@intel.com>
|
|
Use the timer routines for computing elapsed time from igt_core for
smaller code.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Reviewed-by: Antonio Argenziano <antonio.argenziano@intel.com>
|
|
The test expected IOCTL 'I915_GET_RESET_STATS' would return an error
when not root. That is no longer true in the driver since commit
4c9c0d09741d ("drm/i915: Fix retrieval of hangcheck stats") and therefore
the test was incorrectly failing.
v2:
- Add the commit that changed the behaviour in the Driver to the
commit message. (Michel)
v3:
- Reuse get_reset_count instead of implementing a new function.
(Michel)
Cc: Michel Thierry <michel.thierry@intel.com>
Cc: Arkadiusz Hiler <arkadiusz.hiler@intel.com>
Cc: Chris Wilson <chris@chris-wilson.co.uk>
Signed-off-by: Antonio Argenziano <antonio.argenziano@intel.com>
Reviewed-by: Michel Thierry <michel.thierry@intel.com>
|