Age | Commit message (Collapse) | Author |
|
Some tests assume that close on an unopened fd is fine, except it's
not just unopened but actually stack garbage. There's a good chance we
end up running close(0), which wreaks the testcase enumeration. Fix
this.
Reviewed-by: Jani Nikula <jani.nikula@intel.com>
Not sure there's a better way to catch this than git grep plus lots of
manual auditing ... The unit tests only catch it by accident (x86
works fine, I hit it in one testcase only cross-building to aarch64).
v2: Note that gem_pread_after_blit uses heap memory, so is actually
guaranteed to run close(0). Noticed by Jani.
Reviewed-by: Jani Nikula <jani.nikula@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
|
|
Exercise O(N^2) behaviour in reading the error state, and push it to the
extreme.
Reported-by: Jason Ekstrand <jason@jlekstrand.net>
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Reviewed-by: Katarzyna Dec <katarzyna.dec@intel.com>
|
|
I'll need to wrap a bit of magic around all the fork() calls in our
tests. Simplest way to get there is to roll out the existing helpers,
which even saves a bit of boilerplate code.
Cc: Robert Foss <robert.foss@collabora.com>
Reviewed-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
|
|
We want to allow bpp = 8 or 16, so make sure we set the bpp
in igt_buf. This way we can extend rendercopy to support
other values for bpp.
Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
[mlankhorst: Fix double ;; (Ville]
Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
|
|
It makes the tests more reliable because the expected number of
reports is more acurate (given that we'll have almost no
context-switch reports).
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Matthew Auld <matthew.auld@intel.com>
|
|
gen8_bind_buf looks at buf->aux.stride/offset, which is not set by the
test. When I added the bpp field, it was enough to make the test fail,
fix this by making sure that the buf is initially zero'd explicitly,
which fixes the test to run reliably 100% of the time.
Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
Reviewed-by: Petri Latvala <petri.latvala@intel.com> #irc
|
|
long is different between 32 and 64 and should basically never be
used. Fixes compiler warning about passing the wrong type.
v2: Use the PRId64 macros instead of long long.
Signed-off-by: Eric Anholt <eric@anholt.net>
Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
|
|
The drv_ tests are i915 specific, so let's move them to i915 directory
and change the binary prefix to i915_.
Additionally, while we at moving stuff around, let's rename
module_reload to module_load and do the following cleanup with the
subtests:
basic-reload -> reload
basic-no-display -> reload-no-display
basic-reload-inject -> reload-with-fault-injection
Cc: Martin Peres <martin.peres@linux.intel.com>
Cc: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Petri Latvala <petri.latvala@intel.com>
Signed-off-by: Arkadiusz Hiler <arkadiusz.hiler@intel.com>
Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
Acked-by: Martin Peres <martin.peres@linux.intel.com>
|
|
Make availability of all elements more visible for debug purposes.
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
|
|
We need to use raw ioctl since using the igt_kms library is fairly
brittle against changes in the library. This fixes the last subtest
failure due to the rebasing onto latest kernel and igt.
Note that the revoke test doesn't have such a problem, because the
igt library has been initialized when everything was still there.
Hence we will never blow up in the library after the revoke happened.
Reviewed-by: Dave Airlie <airlied@gmail.com>
Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
|
|
Reviewed-by: Dave Airlie <airlied@gmail.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
|
|
Again it failed to fill in the pad field. It also had the wrong
assumptions about planes being included. Plus again add a bunch more
paranoid checks. And make sure the primary plane is included, too.
Reviewed-by: Dave Airlie <airlied@gmail.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
|
|
It failed to clear the pad, which made me realize that it's missing
a few paranoid checks.
Reviewed-by: Dave Airlie <airlied@gmail.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
|
|
We need to also ask for a plane when universal planes is enabled,
which the igt_display library does by default.
Reviewed-by: Dave Airlie <airlied@gmail.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
|
|
Much faster, since when not enabled they proceed right away.
Reviewed-by: Dave Airlie <airlied@gmail.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
|
|
Validate that the leasing API creates leases that allow access to a
subset of the available resources and that lease revocation works.
v2: from Dave Airlie <airlied@redhat.com>
* Update ioctl numbers to latest proposed values.
* Fix commit message
* Add tests for get_lease and list_lessees
v3:
- Rebase
- drop the get_driving_output test, that's already taken care of by
the for_each_valid_output loop.
Signed-off-by: Keith Packard <keithp@keithp.com> (v2)
Reviewed-by: Dave Airlie <airlied@gmail.com>
Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
|
|
These ioctls replace drmWaitVBlank and add ns time resolution and
64-bit sequence numbers to comply with the Vulkan API specifications.
The tests were derived from the existing kms_vblank tests with the
'wait' variant elided as the new API doesn't provide a mechanism for
blocking in the kernel.
v2: from Dave Airlie <airlied@redhat.com>
* Add local definitions of new ioctls to avoid requiring latest
libdrm.
* Remove FIRST_PIXEL_OUT as that has been removed from the proposed
kernel patches.
v3:
- Rebase
- drop the export of igt_output_get_driving_pipe, the tests do full
modesets already.
Signed-off-by: Keith Packard <keithp@keithp.com> (v2)
Reviewed-by: Dave Airlie <airlied@gmail.com>
Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
|
|
The previous fixes to kms_frontbuffer_tracking fixed the sharedfb tests,
but the stridechange test still creates its own fb. Use the existing 'big'
fb to force a stride change, without ending up with an excessive stride.
Changes since v1:
- Use the big fb used by the shrfb tests. It already exists and has
the right dimensions, so why not?
Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
|
|
We mostly care about the plane type, because sometimes the driver may
do silly things when only a cursor is enabled for example, so we reduce
the number of tests. This puts an upper bound on the number of plane
combinations being tested, which is nice for gen11.
Changes since v1:
- Make 2 groups for overlay planes, and randomly put planes in either group.
Changes since v2:
- Include igt_rand.h to compiler error.
Changes since v3:
- Fix logical error resulting in crash.
Changes since v4:
- Fix logical error harder.
Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch> #v3
|
|
../tests/kms_properties.c:113:11: warning: initialization discards ‘const’ qualifier from pointer target type [-Wdiscarded-qualifiers]
Fixes: 7983e19ed62e ("tests/kms_properties: Add functional test for "max bpc" property")
Signed-off-by: Petri Latvala <petri.latvala@intel.com>
Cc: Radhakrishna Sripada <radhakrishna.sripada@intel.com>
Cc: Rodrigo Vivi <rodrigo.vivi@intel.com>
Reviewed-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
|
|
Also print what directory gets used.
v2: Use PATH_MAX
Signed-off-by: Petri Latvala <petri.latvala@intel.com>
Reviewed-by: Arkadiusz Hiler <arkadiusz.hiler@intel.com>
|
|
Test the values in the range advertised by the "max bpc" property.
Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>
Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
Signed-off-by: Radhakrishna Sripada <radhakrishna.sripada@intel.com>
Reviewed-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
|
|
We currently test the existimg properties by setting them with default value.
Add infrastructure to perform additional test on a desired property.
v2: Fix the strcmp logic
Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>
Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
Signed-off-by: Radhakrishna Sripada <radhakrishna.sripada@intel.com>
Reviewed-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
|
|
Manually unroll the 32b memset in create_bo() to set a cacheline at a
time, for a 2x speed improve of the whole test.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Reviewed-by: Michał Winiarski <michal.winiarski@intel.com>
|
|
Older platforms require fence registers to perform blits, and so
userspace is expected to mark up the objects to request fences be
assigned.
Fixes: ff2db94acb53 ("igt/gem_tiled_fence_blits: Remove libdrm_intel dependence")
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=108591
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
|
|
Nothing happens if you don't commit ...
v2: rebased!?
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=108550
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=108549
Cc: Ramalingam C <ramalingam.c@intel.com>
Reviewed-by: Ramalingam C <ramalingam.c@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
|
|
This will fix the -EIO from trying to start CRC on a disabled pipe.
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=108146
Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
Reviewed-by: Imre Deak <imre.deak@intel.com>
|
|
Modernise the test to use igt's ioctl library as opposed to the
antiquated libdrm_intel.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Reviewed-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
|
|
Subsequent tests have become really unhappy. Paper over this for now.
If this doesn't work, then I think we need to revert.
v2: Use Ram's suggestion for comment.
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=108550
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=108549
Cc: Ramalingam C <ramalingam.c@intel.com>
Reviewed-by: Ramalingam C <ramalingam.c@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
|
|
Pretty simple test:
- picks the hdcp capable output with suitable pipe and apply modeset.
- checks the connected sink's hdcp capability through debugfs
- apply a FB and wait for the flip completion.
- clears the content protection property
- verifies that it clears
- sets the content protection property to desired
- verifies that it transitions to enabled
- incase of timeout three reattempts are implemented
- clear the content protection property and modeset on the crtc
Above steps are repeated on all HDCP capable connectors for both
legacy and atomic subtests.
v2:
dynamic subtests are dropped [Daniel]
v3:
debugfs is used to detect the sink's hdcp capability [Daniel]
data structure is made as global variable.
v4:
debugfs file from connector's debugfs dir is used [Daniel]
v5:
i915_debugfs_connector_dir() usage is modified [Chris]
Signed-off-by: Sean Paul <seanpaul@chromium.org>
Signed-off-by: Ramalingam C <ramalingam.c@intel.com>
Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
|
|
Leaving crc running nobody reading it may fail tests randomly
with dmesg comment "*ERROR* Overflow of CRC buffer, userspace
reads too slow."
v2 (Maarten Lankhorst): Don't change clean up code but just add
flag for starting crc and stop it at end of test.
bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=105748
Signed-off-by: Juha-Pekka Heikkila <juhapekka.heikkila@gmail.com>
Reviewed-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
|
|
We can already move all the tests with distinct prefixes: gem_, gen3_
and i915_.
pm_ and drv_ tests will follow in batches, so we can do the
adjustments in the reporting/filtering layer of the CI system.
v2: Fix test-list.txt generation with meson
v3: Fix docs build (Petri)
Cc: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Petri Latvala <petri.latvala@intel.com>
Cc: Martin Peres <martin.peres@linux.intel.com>
Signed-off-by: Arkadiusz Hiler <arkadiusz.hiler@intel.com>
Reviewed-by: Petri Latvala <petri.latvala@intel.com>
Tested-by: Petri Latvala <petri.latvala@intel.com>
Acked-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Acked-by: Chris Wilson <chris@chris-wilson.co.uk>
|
|
Call kernel selftest module test-drm_modeset for testing KMS.
v2:
- Add test alphabetically.
- Add test to meson build.
v3: Rename to kms_selftest.
Signed-off-by: Deepak Rawat <drawat@vmware.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
|
|
This test should be skiped when KMS is disabled.
Cc: Chris Wilson <chris@chris-wilson.co.uk>
Signed-off-by: José Roberto de Souza <jose.souza@intel.com>
Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
|
|
Max sprite plane width at 2000 to avoid going over hw watermark
limits.
v2: (Ville Syrjälä) comment on source added plane width limitation.
bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=105458
Signed-off-by: Juha-Pekka Heikkila <juhapekka.heikkila@gmail.com>
Reviewed-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
|
|
On 4k displays the horizontal resolution is 3840, which when you add
500 gives a stride of 17408 (3840 + 500 + 12 (tile alignment)).
Decrease the extra offset to 248, so we end up at exactly 16384, which
is the maximum supported stride for FBC.
Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
|
|
The behavior of the OA unit is a tiny bit different on ICL. It
appears to be a bit sloppier on the timings of its OA reports (missing
the deadline by one period quite often). Let's add an acceptance delta.
v2: Use larger acceptance delta only on ICL (José)
Tweak indentation (José)
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: José Roberto de Souza <jose.souza@intel.com>
|
|
Now that we have support for the format sub-tests, enable them in the vc4
chamelium test lists.
Signed-off-by: Maxime Ripard <maxime.ripard@bootlin.com>
Acked-by: Eric Anholt <eric@anholt.net>
|
|
Now that we have everything in place, we can add the support for the
subtests testing the output of planes setup with formats other than XR24.
Since YUV will be a bit trickier to handle, start with various common RGB
formats.
Reviewed-by: Paul Kocialkowski <paul.kocialkowski@bootlin.com>
Signed-off-by: Maxime Ripard <maxime.ripard@bootlin.com>
|
|
In order to introduce CRC subtests for DRM formats, we need to take an
intermediate step.
The current code will generate a pattern in XR24, and will try to compare
the CRC returned by the Chamelium for each frames.
This CRC is computed on an XR24 format as well, so it works. However, as
soon as we will start implementing other formats, if we just change the
format of the pattern, the raw content of the buffer, and therefore the
CRC's won't match anymore.
In order to address that, we will need an intermediate step, and we will
now still create the XR24 pattern, and compute its CRC, then convert it to
the format we want to test, and finally retrieve the CRC from the Chamelium
to compare it with the one from the XR24 pattern.
The current code is converted to the new prototype that will take the
fourcc of the format to test, even though we're still using XR24 everywhere
for now.
Reviewed-by: Paul Kocialkowski <paul.kocialkowski@bootlin.com>
Signed-off-by: Maxime Ripard <maxime.ripard@bootlin.com>
|
|
The current pattern being used is the one generated through the
igt_create_color_pattern_fb.
However, in order to deal with multiple formats and the upsampling /
downsampling issues that might arise from converting back and forth between
formats, we will need to have a pattern with quite precise color values,
and without any shades or gradient of colors.
Let's create a function that will generate that pattern in the chamelium
code if we need to convert the framebuffer to a smaller depth, and use the
current pattern otherwise.
The easiest way to do that will be to only use values that would have the
same part on the common most significant bits (5, to deal with most
formats) and have the same bit repeated on the least significant bits that
are going to be dropped and / or padded when converting between formats.
Pixman will fill the lowest bits with 1, and our hardware (this has been
tested on a Raspberry Pi's VC4) is able to support that, so the easiest is
to just use all 1's for our components in order to still be able to compute
the CRCs.
Signed-off-by: Maxime Ripard <maxime.ripard@bootlin.com>
Reviewed-by: Arkadiusz Hiler <arkadiusz.hiler@intel.com>
|
|
We have two use cases in our current sub-test suites: the tests that test
all the modes exposed by the driver, and the ones just picking up one.
Instead of having to deal with this two cases in the same function as it is
currently done, move the part that test a single mode into a separate
function, and just call it for every mode that we want to test if needs be.
This will result in a simpler function that will be easier to extend to
support formats.
Reviewed-by: Paul Kocialkowski <paul.kocialkowski@bootlin.com>
Signed-off-by: Maxime Ripard <maxime.ripard@bootlin.com>
|
|
For some reason, the XBGR8888 CRC check will fail in the kms_plane tests.
Since that format will be enabled and checked by that test in the next
commit, make sure we don't introduce a regression for no particular reason.
Signed-off-by: Maxime Ripard <maxime.ripard@bootlin.com>
Reviewed-by: Arkadiusz Hiler <arkadiusz.hiler@intel.com>
Acked-by: Martin Peres <martin.peres@linux.intel.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>
|
|
If KMS is not supported, drmGetResources() will return NULL so be
careful not to dereference it. However, we still insist that runtime pm
works, so keep on testing.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
|
|
Enabling hangcheck only takes effect at the start of a new request
queue. Before we re-enable hangcheck after our poking around, we
therefore need to wait until the gpu is idle otherwise the next test
will start without hangcheck and subsequently hang forever.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Petri Latvala <petri.latvala@intel.com>
Tested-by: Petri Latvala <petri.latvala@intel.com>
Reviewed-by: Petri Latvala <petri.latvala@intel.com>
|
|
Add a few tests to test various blending modes.
Some of the tests will skip if pixel mode alpha cannot be enabled
with plane alpha at the same time. This is for mali-dp. I didn't
test on that platform, but tested with the same check on i915.
The tests won't pass i915 on pre-gen11 hw. i915 has small rounding
errors with 0xff and 0x00 alpha, which gives CRC mismatches.
Changes since v1:
- Send the correct version, with the skips for mali-dp in place.
Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
|
|
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>
|
|
We try flipping a vgem surface onto a i915 scanout. However, if there
is no display we want to disable the kms interface, including the addfb
ioctl. On such systems the call to kms_addfb will naturally fail and the
test cannot be run.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Acked-by: Antonio Argenziano <antonio.argenziano@intel.com>
|