Age | Commit message (Collapse) | Author |
|
Clear the system state before exiting the subtest.
V2: Fix Crash in *-modeset-vs-cursor-atomic test
Signed-off-by: Bhanuprakash Modem <bhanuprakash.modem@intel.com>
Reviewed-by: Swati Sharma <swati2.sharma@intel.com>
|
|
Convert the existing subtests to dynamic subtests.
Signed-off-by: Bhanuprakash Modem <bhanuprakash.modem@intel.com>
Reviewed-by: Swati Sharma <swati2.sharma@intel.com>
|
|
[Why]
flip_vs_cursor_crc and flip_vs_cursor_busy_crc use CRC in debugfs which is
not supported by some drivers.
[How]
igt_require_pipe_crc in igt_fixture before the subtests start.
Test: igt@kms_cursor_legacy@flip-vs-cursor{-busy}-crc-{atomic,legacy} on
ChromeOS Jacuzzi (MTK)
Signed-off-by: Mark Yacoub <markyacoub@chromium.org>
Reviewed-by: Petri Latvala <petri.latvala@intel.com>
|
|
When doing a primary or sprite plane flip, PSR2 selective fetch code
also adds all the planes including cursor that overlaps with the
area being updated, so this causes legacy cursor API calls to
wait for a pending atomic commit to finish causing tests that do
checks with vblank counters.
So here when running in an Intel platform that has PSR2 selective
fetch enabled, it will switch to PSR1 before executing the subtests.
Because what this whole test mostly wants to do, is check if userspace
can do asynchronous cursors updates.
v2:
- rename functions and add documentation
Closes: https://gitlab.freedesktop.org/drm/intel/-/issues/2346
Reviewed-by: Jouni Högander <jouni.hogander@intel.com>
Cc: Mika Kahola <mika.kahola@intel.com>
Cc: Jouni Hogander <jouni.hogander@intel.com>
Cc: Petri Latvala <petri.latvala@intel.com>
Signed-off-by: José Roberto de Souza <jose.souza@intel.com>
|
|
../tests/kms_cursor_legacy.c: In function ‘flip_vs_cursor_busy_crc’:
../tests/kms_cursor_legacy.c:1337:2: warning: ISO C90 forbids mixed declarations and code [-Wdeclaration-after-statement]
1337 | uint64_t ahnd = get_reloc_ahnd(display->drm_fd, 0);
| ^~~~~~~~
Signed-off-by: Petri Latvala <petri.latvala@intel.com>
Cc: Mark Yacoub <markyacoub@chromium.org>
Cc: Ashutosh Dixit <ashutosh.dixit@intel.com>
Reviewed-by: Zbigniew Kempczyński <zbigniew.kempczynski@intel.com>
|
|
[Why]
get_reloc_ahnd uses the intel allocator, which is not supported on
non-intel devices.
[How]
Call igt_require_intel before any call to get_reloc_ahnd.
Test: igt@kms_cursor_legacy@flip-vs-cursor-busy-crc-{atomic,legacy} on
ChromeOS Jacuzzi (MTK)
Signed-off-by: Mark Yacoub <markyacoub@chromium.org>
Reviewed-by: Petri Latvala <petri.latvala@intel.com>
|
|
Few variants of Intel devices are failing randomly with CRC mismatch for
flip-vs-cursor-busy-crc-atomic and flip-vs-cursor-busy-crc-legacy.
Patch adds stop of CRC collection to fix this issue.
Signed-off-by: Vidya Srinivas <vidya.srinivas@intel.com>
Reviewed-by: Bhanuprakash Modem <Bhanuprakash.modem@intel.com>
|
|
i915 is dropping frontbuffer rendering support for display 9+ so
this evasion attempts will never happen as DRM_IOCTL_MODE_CURSOR will
be converted to atomic commits that will be executed during vblanks.
v2:
- Not using data filed by fixture to generate subtest list (Petri)
Reviewed-by: Gwan-gyeong Mun <gwan-gyeong.mun@intel.com>
Cc: Petri Latvala <petri.latvala@intel.com>
Cc: Gwan-gyeong Mun <gwan-gyeong.mun@intel.com>
Signed-off-by: José Roberto de Souza <jose.souza@intel.com>
|
|
For newer gens we're not able to rely on relocations. Adopt to use
offsets acquired from the allocator.
v2: Don't query i915 for relocations on AMD devices (Rodrigo)
Signed-off-by: Zbigniew Kempczyński <zbigniew.kempczynski@intel.com>
Cc: Ashutosh Dixit <ashutosh.dixit@intel.com>
Cc: Petri Latvala <petri.latvala@intel.com>
Cc: Rodrigo Siqueira <Rodrigo.Siqueira@amd.com>
Reviewed-by: Ashutosh Dixit <ashutosh.dixit@intel.com>
|
|
Just use the one from the kernel headers. Updated with:
git grep -l LOCAL_I915 | \
xargs sed -i -e '/^#define LOCAL_I915/d' -e 's/LOCAL_\(I915[[:alnum:]_]*\)/\1/g'
Signed-off-by: Lucas De Marchi <lucas.demarchi@intel.com>
Acked-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Reviewed-by: Ashutosh Dixit <ashutosh.dixit@intel.com>
|
|
This patch will find the connector/mode combination that fits
into the bandwidth when more than one monitor is connected.
Example:
When two monitors connected through MST, the second monitor
also tries to use the same mode. So two such modes may not
fit into the link bandwidth. So, iterate through connected
outputs & modes and find a combination of modes those fit
into the link BW.
V2:
* Remove MST specific logic (Daniel)
V3:
* Add support for legacy commit (Ankit)
V4:
* Fix commit message (Ankit)
Cc: Imre Deak <imre.deak@intel.com>
Cc: Ankit Nautiyal <ankit.k.nautiyal@intel.com>
Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
Signed-off-by: Bhanuprakash Modem <bhanuprakash.modem@intel.com>
Reviewed-by: Ankit Nautiyal <ankit.k.nautiyal@intel.com>
|
|
Added test_describe for all the subtests.
Signed-off-by: Nidhi Gupta <nidhi1.gupta@intel.com>
Reviewed-by: Bhanuprakash Modem <bhanuprakash.modem@intel.com>
|
|
../tests/kms_cursor_legacy.c:473:24: warning: unused function 'pipe_select' [-Wunused-function]
static inline uint32_t pipe_select(enum pipe pipe)
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Acked-by: Mika Kuoppala <mika.kuoppala@linux.intel.com>
|
|
As kmstest_get_vblank() API is already available in lib, remove the
local/duplicate functions and use kmstest_get_vblank().
Cc: Swati Sharma <swati2.sharma@intel.com>
Cc: Karthik B S <karthik.b.s@intel.com>
Cc: Petri Latvala <petri.latvala@intel.com>
Cc: Arkadiusz Hiler <arek@hiler.eu>
Signed-off-by: Bhanuprakash Modem <bhanuprakash.modem@intel.com>
Reviewed-by: Karthik B S <karthik.b.s@intel.com>
|
|
Read the crtc ids for enable pipes only in display.
Signed-off-by: Mohammed Khajapasha <mohammed.khajapasha@intel.com>
Reviewed-by: Arkadiusz Hiler <arkadiusz.hiler@intel.com>
|
|
This allows the test to work on setups where the primary plane cannot
be disabled while the CRTC is enabled.
It should make no difference for the output.
Signed-off-by: Michel Dänzer <mdaenzer@redhat.com>
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
|
|
igt_require_gem() is a pecularity of i915/, move it out of the core.
Similar opportunistic move of gem_reopen_driver() and
gem_quiescent_gpu().
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
|
|
kms_cursor_legacy IGT subtest 2x-nonblocking-modeset-vs-cursor-atomic
is failing due to busyness while trying to do atomic commit. In case,
we are busy, let's just wait one extra vblank before continuing the
test.
References: https://gitlab.freedesktop.org/drm/intel/issues/1062
v2: Wait out for max 5 seconds for commit busyness (Juha-Pekka)
v3: Move igt_set_timeout() outside of the loop, remove wait for vblank (Juha-Pekka)
Move routine that waits for -ebusy into a separate function
Signed-off-by: Mika Kahola <mika.kahola@intel.com>
Reviewed-by: Juha-Pekka Heikkila <juhapekka.heikkila@gmail.com>
|
|
When run on more than one monitor there may be modeset in queue
which will block flip. Kernel will timeout with modeset at
ten seconds so lets wait in test also that same ten seconds at
maximum.
V2 Ville Syrjälä: lets just wait for five seconds
Signed-off-by: Juha-Pekka Heikkila <juhapekka.heikkila@gmail.com>
Reviewed-by: Mika Kahola <mika.kahola@intel.com>
|
|
The test is doing multiple iterations (50). Each iteration tries to
squeeze target number of cursor updates in half a second worth of flips.
If we don't hit the target in any given iteration we bail out early.
Because of that we don't have the data on the number of iterations that
have failed and/or succeeded any given run, which makes hunting down
this elusive issue hard.
Let's change that so we always go through all the iterations and fail at
the end printing out the number of iterations we haven't met the target.
Each failed iteration also logs how many cursor updates it has managed
to do.
Since our target is generated run-time and is also load sensitive, let's
bump the log level of message containing our target to "info" so we can
compare those values across both passes and failures.
Cc: Anusha Srivatsa <anusha.srivatsa@intel.com>
Cc: Martin Peres <martin.peres@linux.intel.com>
Cc: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
Signed-off-by: Arkadiusz Hiler <arkadiusz.hiler@intel.com>
Reviewed-by: Martin Peres <martin.peres@linux.intel.com>
|
|
There is no guarantee that spinners are and will be implemented
using batches. As we have igt_spin_t, manipulate it through
igt_spin_* functions consistently and hide the batch nature.
Cc: Chris Wilson <chris@chris-wilson.co.uk>
Signed-off-by: Mika Kuoppala <mika.kuoppala@linux.intel.com>
Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
|
|
For the !modeset case, after a pageflip is performed on both crtc's,
vblank counter is advanced by 1 when compared to its original value.
For the modeset case, when pageflips and modesets are interleaved,
vblank counter does not always advance by 1 as nonblocking modeset
could fail, in which case we do not need vblank_matches.
v2: Remove the assert statement instead of changing the condition
Cc: Maarten Lankhorst <maarten.lankhorst@intel.com>
Signed-off-by: Nischala Yelchuri <nischala.yelchuri@intel.com>
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=105454
Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
|
|
Added munmap and replaced hard-coded values with PAGE_SIZE macro.
Cc: Easwar Hariharan <easwar.hariharan@intel.com>
Cc: Ashutosh Dixit <ashutosh.dixit@intel.com>
Signed-off-by: Nischala Yelchuri <nischala.yelchuri@intel.com>
Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
|
|
Simple rule of thumb, if a kms_* test calls igt_display_init() in its
global fixture, skip the entire test if the driver has disabled KMS.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Acked-by: Antonio Argenziano <antonio.argenziano@intel.com>
|
|
igt_pipe_crc_get_current()
This is a more race free of accomplishing the same.
Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>
|
|
In order to make adding more options easier, expose the full set of
options to the caller.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
Cc: Petri Latvala <petri.latvala@intel.com>
Reviewed-by: Tvrtko Ursulin <tvrtko.ursulin@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>
|
|
Using the fancy new DRM_CAP_CRTC_IN_VBLANK_EVENT cap I can finally
make this test the work I originally intended to.
For the !modeset case that means performing a pageflip on both crtc's,
then requeueing as soon as the event is delivered and then check the
vblank counter against the original value, it should be advanced by 1.
The modeset case is slightly more complicated, ideally it's handled
the same, but if we can't perform a modeset and pageflip at the same
time, fall back to queueing both in a single commit, in which case
we can say nothing about the vblank counter.
There is a small race between flip_done and hw_done, so make
flip_nonblocking retry for a second when encountering -EBUSY.
Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=101634
Reviewed-by: Mika Kahola <mika.kahola@intel.com>
|
|
Instead of assuming each subtest cleans up after itself, assume it
fails and doesn't. Now that igt_kms can clean up stale events, we
can just force each subtest to only clean up its framebuffers,
which isn't harmful if it failed.
The nonblocking modeset test is removed, this was a workaround only
needed for intel because it supported nonblocking commit only for the
!modeset case, this has been fixed.
Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
Reviewed-by: Mika Kahola <mika.kahola@intel.com>
|
|
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>
|
|
igt_output_set_pipe with PIPE_ANY used to mean that we bind the output
to any pipe, but this is now a deprecated alias for PIPE_NONE, and
means the output will be unbound.
Because of this it's better to change output->pending_crtc_idx_mask to
an enum pipe, because only a single choice may be given for a pipe.
Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
Reviewed-by: Mika Kahola <mika.kahola@intel.com>
|
|
Most of these tests have no reason to look at those members,
so try other ways of getting the information.
Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
Reviewed-by: Mika Kahola <mika.kahola@intel.com>
|
|
Remove the local recursive spinner in favour of igt_spin_t.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
|
|
Collecting CRC may force a modeset, which is a bad idea after we just
forced a hang. The hang is intended to make sure the page flip doesn't
complete before the cursor, making sure that works.
Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=102259
Cc: Marta Lofstedt <marta.lofstedt@intel.com>
Tested-by: Marta Lofstedt <marta.lofstedt@intel.com>
Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
[mlankhorst: Prevent overflow when collecting crcs, based on Villes feedback]
|
|
We are, the build system takes care of that.
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>
|
|
for_each_pipe cannot be used for enumerating testcases, so provide
something that can.
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Reviewed-by: Petri Latvala <petri.latvala@intel.com>
|
|
Signed-off-by: Gustavo Padovan <gustavo.padovan@collabora.com>
Reviewed-by: Arkadiusz Hiler <arkadiusz.hiler@intel.com>
|
|
Name should not be driver-specific.
Signed-off-by: Leo (Sunpeng) Li <sunpeng.li@amd.com>
Reviewed-by: Arkadiusz Hiler <arkadiusz.hiler@intel.com>
|
|
This reverts commit 7c8703fb02b248c2bcf9756bba8812bcfe7ed5d3.
If we expect it to fail until we find a solution, let the hw fail and
continue to track the known failure in CI/bugs.
Cc: Martin Peres <martin.peres@linux.intel.com>
Acked-by: Martin Peres <martin.peres@linux.intel.com>
|
|
This appears to be required on SNB, or else we miss a lot of interrupts.
Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
|
|
Also allow the initial vblank evasion to fail. This was the most
likely cause of the test failure, so be sure to fix it too.
Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
|
|
flip-before/after-cursor.
Run the test 25 times and fail if we miss too many vblanks.
CI receives too many false positives so we have to fix it.
Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
|
|
If we can't use the GPU to make a framebuffer busy, skip the test.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
|
|
This reverts commit 25fbae15262cf570e207e62f50e7c5233e06bc67, restoring
commit 301ad44cdf1b868b1ab89096721da91fa8541fdc
Author: Tomeu Vizoso <tomeu.vizoso@collabora.com>
Date: Thu Mar 2 10:37:11 2017 +0100
lib: Open debugfs files for the given DRM device
with fixes.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
|
|
This reverts commit 301ad44cdf1b868b1ab89096721da91fa8541fdc.
When a render-only device is opened and gem_quiescent_gpu is called, we
need to use the debugfs dir for the master device instead.
Signed-off-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
|
|
When opening a DRM debugfs file, locate the right path based on the
given DRM device FD.
This is needed so, in setups with more than one DRM device, any
operations on debugfs files affect the expected DRM device.
v2: - rebased and fixed new API additions
v3: - updated chamelium test, which was missed previously
- use the minor of the device for the debugfs path, not the major
- have a proper exit handler for calling igt_hpd_storm_reset with the
right device fd.
Signed-off-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
Reviewed-by: Robert Foss <robert.foss@collabora.com>
Acked-by: Chris Wilson <chris@chris-wilson.co.uk>
|
|
VLV is a sloth and so doing anything extra between the first and last
get_vblank() is likely to increase the chance of failing the test.
Let's move the make_busy() stuff to happen before the first get_vblank()
to reduce the amount of work done there.
These tests are still failing quite often on my VLV, but that is mostly
caused by igt_kms's tendency to still re-read all the connector properties
and whatnot as part of the commit operation. I suspect that fixing that
would eliminate most of the spurious failures.
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
|
|
Add changes reflecting the new support for dynamic number of planes per pipe.
Signed-off-by: Robert Foss <robert.foss@collabora.com>
Reviewed-by: Mika Kahola <mika.kahola@intel.com>
|
|
This is required for ILK style watermark programming, which currently
inserts an extra vblank wait. This allows the tests to pass on those
platforms.
Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
|
|
This forces the cursor fastpath to be used. While at it, add -atomic
versions of the test to compare legacy pageflip vs atomic.
The nonblocking modeset test is changed slightly, due to cdclk changes
the page flip may be stalled so it's not useful to test it. Just test
that a queued page flip + nonblocking modeset works as intended and
there is no kernel spew.
Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
|