Age | Commit message (Collapse) | Author |
|
Step 1 in debugging: Actually understand what's going wrong.
References: https://bugs.freedesktop.org/show_bug.cgi?id=102887
Cc: Arkadiusz Hiler <arkadiusz.hiler@intel.com>
Cc: "Peres, Martin" <martin.peres@intel.com>
Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
|
|
If we unexpectedly pass, we get a cryptic
(kms_flip:935) CRITICAL: Test assertion failure function set_flag, file kms_flip.c:271:
(kms_flip:935) CRITICAL: Failed assertion: !(*v & flag)
(kms_flip:935) CRITICAL: Last errno: 25, Inappropriate ioctl for device
Instead of a more descriptive assertion error, clear the request for
event to fix this.
This will change the error reported in bug #103257.
Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
References: https://bugs.freedesktop.org/show_bug.cgi?id=103257
[mlankhorst: Replace igt_assert with igt_assert_eq based on ickle's suggestion]
Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
|
|
We don't actually care about running this for 30 seconds, all we
care is that we get a -EBUSY if a flip is already queued.
Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
|
|
Remove the -interruptible test, the test only tests that we get an
-EBUSY after doing a pageflip. Doing this interruptibly adds the
possibility the test will take too long from retrying.
Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
|
|
One significant usecase for intel_reg/etc. is to be able to examine
the hardware state *before* loading the driver. If the tool forces
the driver to load we've totally lost that capability.
This reverts commit 8ae86621d6fff60b6e20c6b0f9b336785c935b0f.
Cc: Michał Winiarski <michal.winiarski@intel.com>
Cc: Chris Wilson <chris@chris-wilson.co.uk>
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Acked-by: Jani Nikula <jani.nikula@intel.com>
Acked-by: Michał Winiarski <michal.winiarski@intel.com>
|
|
It allows us to make things a little bit more generic. Also, we now
require fd rather than doing guesswork when it comes to pci address.
v2: Use readlinkat rather than string concat, move stuff around, provide
a version that does not assert. (Chris)
v3: Print addr on failure, avoid assignment in conditionals. (Chris)
Signed-off-by: Michał Winiarski <michal.winiarski@intel.com>
Cc: Chris Wilson <chris@chris-wilson.co.uk>
Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
|
|
The function fb_is_bound() mix integer value with booleans for handling
the return value. This commit standardizes the return value of
fb_is_bound() for using only booleans.
Signed-off-by: Rodrigo Siqueira <rodrigosiqueiramelo@gmail.com>
Reviewed-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
|
|
This patch removes the duplicate code inside the function set_mode().
Signed-off-by: Rodrigo Siqueira <rodrigosiqueiramelo@gmail.com>
Reviewed-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
|
|
The function run_test_on_crtc_set() expects a parameter named crtc_count
which slight changes the behavior of the test. If this crtc_count is
‘1’, the test will run in a single CRTC; otherwise, it will run in two
different CRTC. However, this function uses hardcoded literal 1 and 2
for each case. This patch creates two constant with the goal to improve
the readability.
Signed-off-by: Rodrigo Siqueira <rodrigosiqueiramelo@gmail.com>
Reviewed-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
|
|
In the kms_flip tests has an igt_fixture that allocates memory for i915
driver with “drm_intel_bufmgr_gem_init()”, which produces the following
warning:
IGT-Version: 1.23-g8d81c2c2 (x86_64) (Linux: 5.0.0-rc7-VKMS-RULES+ x86_64)
Using monotonic timestamps
DRM_IOCTL_I915_GEM_APERTURE failed: Invalid argument
Assuming 131072kB available aperture size.
May lead to reduced performance or incorrect rendering.
get chip id failed: -1 [22]
This commit handles this specific dependence with the i915 driver which
make the kms_flip logs better.
Signed-off-by: Rodrigo Siqueira <rodrigosiqueiramelo@gmail.com>
Reviewed-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
|
|
This commit removes the code related to TEST_TS_CONT test because the
kms_flip never sets this flags, i.e., TEST_TS_CONT is not used. Take a
look at commit 07a3fccf to see why this flag is never set.
Signed-off-by: Rodrigo Siqueira <rodrigosiqueiramelo@gmail.com>
Reviewed-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
|
|
This commit removes the code related to TEST_RPM test because the
kms_flip never sets this flags, i.e., TEST_RPM is not used. Take a look
at commit 07a3fccf to see why this flag is never set.
Signed-off-by: Rodrigo Siqueira <rodrigosiqueiramelo@gmail.com>
Reviewed-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
|
|
Make sure we haven't already passed the seq numbers we're
requesting when doing the ts calibration.
Suggested-by: Chris Wilson <chris@chris-wilson.co.uk>
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
|
|
Asking for the initial vblank count by specifying and absolute vblank count of 0
doesn't make much sense. Switch to a relative query instead.
v2: Drop the NEXTONMISS (Daniel)
v3: Put back the NEXTONMISS (Chris)
Cc: Daniel Vetter <daniel@ffwll.ch>
Cc: Chris Wilson <chris@chris-wilson.co.uk>
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
|
|
In 2013 we prevented changing the tiling of an active framebuffer:
commit 80075d492f8773209e26d11d6bb13ba624ef95a4
Author: Daniel Vetter <daniel.vetter@ffwll.ch>
Date: Wed Oct 9 21:23:52 2013 +0200
drm/i915: prevent tiling changes on framebuffer backing storage
After this we no longer have any use for the bad-tiling subtest, and
only have to make sure changing tiling on a fb is not allowed.
Remove the original bad-tiling subtest, and add a i915_fb_tiling
subtest for this case.
Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
[mlankhorst: Fix build system changes]
Reviewed-by: Juha-Pekka Heikkila <juhapekka.heikkila@gmail.com>
|
|
This patch adds one test to evaluate suspend/resume operations using kms_flip.
v2: Reduce test time to 10 (Daniel)
Signed-off-by: Shayenne Moura <shayenneluzmoura@gmail.com>
Reviewed-by: Rodrigo Siqueira <rodrigosiqueiramelo@gmail.com>
Signed-off-by: Rodrigo Siqueira <rodrigosiqueiramelo@gmail.com>
|
|
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>
|