Age | Commit message (Collapse) | Author |
|
More testing, automatically when using the high-level kms helpers!
Cc: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
Reviewed-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
|
|
For drivers that don't support the IN_FORMATS blob we should just
consult the format list returned by getplane. Since we can't know
which modifiers are supported we'll assume linear-only. Obviously
that may not work for every driver out there, but not much more
we can do unless we start to actually probing with addfb.
Cc: Ulrich Hecht <ulrich.hecht+renesas@gmail.com>
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Reviewed-by: Nicholas Kazlauskas <nicholas.kazlauskas@amd.com>
|
|
These are basic non-rendering tests of the UABI.
Signed-off-by: Eric Anholt <eric@anholt.net>
Acked-by: Petri Latvala <petri.latvala@intel.com>
|
|
The igt_runner sends a SIGTERM to ask the test to cleanly exit upon an
external timeout. It is useful to know what the code was doing when the
timeout occurred, just in case it was unexpectedly stuck. However, since
we use SIGTERM internally to marshal helper processes, we want to keep
SIGTERM quiet, and so opt to use SIGQUIT for the timeout request
instead.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Petri Latvala <petri.latvala@intel.com>
Reviewed-by: Petri Latvala <petri.latvala@intel.com>
|
|
With the high-level helpers requiring outputs there's not point
in silently ignoring issues anymore. Complain about that if it
ever happens.
This reverts
commit 212b71372bfbb73663d872df31118d6b396ada4f
Author: Chris Wilson <chris@chris-wilson.co.uk>
Date: Fri Sep 14 21:03:38 2018 +0100
lib/kms: Skip no-op display updates
which created an in my opinion serious API issue by silently dropping
possible errors on the floor. Instead of silently second guess what
the test might have wanted to do in the absence of display outputs
it's much better to be explicit, and enforce that.
v2: Improve commit message.
v3: Switch to an assert and update comments, to make it clear this is
igt_display api abuse (Arek).
Cc: Antonio Argenziano <antonio.argenziano@intel.com>
Cc: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Arkadiusz Hiler <arkadiusz.hiler@intel.com>
Cc: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
Reviewed-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com> (v2)
Acked-By: Antonio Argenziano <antonio.argenziano@intel.com>
Acked-by: Arkadiusz Hiler <arkadiusz.hiler@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
|
|
If you need the high-level functions, then you probably need a
full display. Unexport the non-requiring version, and adjust the
documentation. This also gives us proper docs for the recently
added igt_display_require.
Cc: Antonio Argenziano <antonio.argenziano@intel.com>
Cc: Chris Wilson <chris@chris-wilson.co.uk>
Reviewed-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
Acked-By: Antonio Argenziano <antonio.argenziano@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
|
|
Remaining tests that have been overlooked and don't need any
invasive changes to limit the skipping to only the relevant parts.
v2: [A rebase gone wrong]
v3: Move the misplaced hunk to the right patch (Antonio).
v4: Rebase, kms_content_protection is new.
v5: Rebase - need to adjust kms_lease.c too.
Reviewed-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com> (v3)
Cc: Antonio Argenziano <antonio.argenziano@intel.com>
Cc: Chris Wilson <chris@chris-wilson.co.uk>
Acked-By: Antonio Argenziano <antonio.argenziano@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
|
|
Just a few little ioctl wrappers that v3d tests will use.
v2: Move the struct above the prototypes.
Signed-off-by: Eric Anholt <eric@anholt.net>
Acked-by: Petri Latvala <petri.latvala@intel.com> (v1)
|
|
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>
|
|
Now that rendercopy can perform copies for 8 bpp and 16 bpp, there's
no reason we have to skip on odd x/w any more for 16 bpp.
Pass the correct bpp to rendercopy, and prevent tests from skipping.
Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
[mlankhorst: set src_buf.bpp to tmp.bpp (Ville)]
Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
|
|
To handle drawing 16 bpp formats correctly with odd x/w, we need to
use the correct bpp to rendercopy. Now that everything sets bpp in
igt_buf, fix the rendercopy support to use it and set the correct
format.
Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
[mlankhorst: Add assert(src->bpp == dst->bpp)]
|
|
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>
|
|
Clang fails to compile with:
error: suggest braces around initialization of subobject [-Werror,-Wmissing-braces]
Make the initializer empty to fix this issue.
Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
Reviewed-by: Petri Latvala <petri.latvala@intel.com> #irc
|
|
Y and height have no such restrictions, since pixel size has no
relation to height.
Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
|
|
Make the handling of slow gtt mmap reads generic, and extend it to
the pixman converter. Makes the pixman path a bit faster.
With testing just XRGB8888 and XBGR8888 on KBL:
$ time kms_plane --r pixel-format-pipe-A-planes
- real 0m18,757s
+ real 0m2,635s
v2: Use the original src buffer if the malloc fails (Chris)
Drop the duplicated comment about things being slow
Cc: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Maxime Ripard <maxime.ripard@bootlin.com>
Cc: Arkadiusz Hiler <arkadiusz.hiler@intel.com>
Cc: Juha-Pekka Heikkila <juhapekka.heikkila@gmail.com>
Cc: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Reviewed-by: Maxime Ripard <maxime.ripard@bootlin.com>
Reviewed-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
|
|
The converter operates between the linear and shadow fbs. When using
the blitter path there is no particular reason to assume that the
linear fb and actual fb have the same strides for instance. Thus
consulting the actual fb for metadata is not really correct.
We can also simplify the mmap() path by copying all the original
fb metadata into linear.fb as there we map the original fb directly.
We just have to keep clearing linear.fb.gem_handle so that the
dtor knows which kind of beast it's got.
Cc: Maxime Ripard <maxime.ripard@bootlin.com>
Cc: Arkadiusz Hiler <arkadiusz.hiler@intel.com>
Cc: Juha-Pekka Heikkila <juhapekka.heikkila@gmail.com>
Cc: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Reviewed-by: Maxime Ripard <maxime.ripard@bootlin.com>
|
|
Add more asserts to make sure the converted formats are
correct.
Cc: Maxime Ripard <maxime.ripard@bootlin.com>
Cc: Arkadiusz Hiler <arkadiusz.hiler@intel.com>
Cc: Juha-Pekka Heikkila <juhapekka.heikkila@gmail.com>
Cc: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Reviewed-by: Maxime Ripard <maxime.ripard@bootlin.com>
|
|
Cairo doesn't do RGB888. The shadow buffer must be in XRGB888 (which
is what our YUV converters also assume). We did calculate the shadow
stride/size with four bytes per pixel, but we just put the wrong
format in the fb metadata.
Cc: Maxime Ripard <maxime.ripard@bootlin.com>
Cc: Arkadiusz Hiler <arkadiusz.hiler@intel.com>
Cc: Juha-Pekka Heikkila <juhapekka.heikkila@gmail.com>
Cc: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Reviewed-by: Maxime Ripard <maxime.ripard@bootlin.com>
|
|
While true that subtest listing doesn't require the i915 driver, same
applies to any driver or platform.
Signed-off-by: Petri Latvala <petri.latvala@intel.com>
Reviewed-by: Arkadiusz Hiler <arkadiusz.hiler@intel.com>
|
|
Despite the comment temporary buf is not
used anywhere in convert_nv12_to_rgb24,
so it has to be either removed or used instead
of cvt->src.ptr.
v2: Put it in use instead of removing as other
functions seem to use it.
Signed-off-by: Stanislav Lisovskiy <stanislav.lisovskiy@intel.com>
Reviewed-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
|
|
When running any kind of static analysis on IGT, one tends to drown in
warnings about using uninitialized variables in subtests, because
static analysis is unable to figure out that igt_fixture blocks are
always entered if a subtest block is entered. Aid the discovery of
correct execution flow by making static analysis always enter all
igt_fixture blocks and all subtest blocks.
Automatic discovery of static analyzers is done for Clang, Coverity
and Klocwork, using macros found by quick googling. For explicit
control on possible other analyzers, defining STATIC_ANALYSIS_BUILD=1
manually will activate this hack.
v2:
- Hack not needed for igt_subtest()
- Make sure igt_fixture is entered once instead of an infinite loop
v3:
- Rebase properly...
Signed-off-by: Petri Latvala <petri.latvala@intel.com>
Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>
|
|
Apparently it's really not great to require it for a bunch of
platforms. Requested by Sean and Eric.
v2: Use combo option (Petri).
v3: Fix the right option (Petri)
v4: try a bit harder ...
v5: Even more simplification (Dylan)
Cc: Dylan Baker <dylan@pnwbakers.com>
Cc: Petri Latvala <petri.latvala@intel.com>
Reviewed-by: Eric Anholt <eric@anholt.net> (v1)
Reviewed-by: Petri Latvala <petri.latvala@intel.com>
Cc: Sean Paul <sean@poorly.run>
Cc: Eric Anholt <eric@anholt.net>
Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
|
|
Unload the snd_hdmi_lpe_audio module. Otherwise i915 can't be unloaded.
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>
|
|
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>
|
|
Function to open a debugfs directory of a connector associated to
a device.
v2:
instead of string manipulation openat used [Chris]
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>
|
|
vmwgfx and amdgpu doesn't support fb modifiers, yet kms_addfb() requires
modifier support. Since many tests don't need this to run, the
requirement can be made less broad.
Therefore, tighten the requirement to cases where modifiers are actually
needed.
v2:
* In create_fb() calls to kms_addfb(), remove the modifier flag iff the
driver doesn't support modifiers and the modifer is 0
* Don't modify the flag in kms_addfb().
Signed-off-by: Deepak Rawat <drawat@vmware.com>
Signed-off-by: Leo Li <sunpeng.li@amd.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
|
|
For vmwgfx cairo surface creation fails due to stride mismatch, add a
igt_require_f() for surface.
v2: Check for surface creation failure.
Signed-off-by: Deepak Rawat <drawat@vmware.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
|
|
vmwgfx does not support GEM interface so calling gem_close on vmwgfx
results in error.
v2: Use drmIoctl with error when ioctl() failed.
v3: Seperate ioctl wrapper.
Signed-off-by: Deepak Rawat <drawat@vmware.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
|
|
If KMS is not available, drmModeGetResoures() reports NULL and so we
cannot use this device to find the chamelium connector.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Reviewed-by: José Roberto de Souza <jose.souza@intel.com>
|
|
When KMS is disabled, drmGetCap() for DRM_CAP_ADDFB2_MODIFIERS() will
return -1 and set errno as EOPNOTSUPP, the current assert was only
checking for a sucess result or invalid argument causing
prime_vgem@basic-fence-flip test to fail 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>
|
|
One more AML ID added and WHL IDs reorganized.
Align with commit c0c46ca461f1 ("drm/i915/aml: Add new Amber
Lake PCI ID"), including commit c1c8f6fa731b ("drm/i915:
Redefine some Whiskey Lake SKUs")
v2: Also sync intel_device_info.c (CI and Jose)
Cc: José Roberto de Souza <jose.souza@intel.com>
Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
Reviewed-by: José Roberto de Souza <jose.souza@intel.com>
|
|
This patch introduces a render copy shader for GEN11.
The plumbing is same as with GEN9, so we can reuse it, extracting the
common parts, and wrapping it in GEN-specific helpers.
v2: Added gen11 shader source path next to its binary form
Signed-off-by: Lukasz Kalamarz <lukasz.kalamarz@intel.com>
Cc: Michał Winiarski <michal.winiarski@intel.com>
Cc: Antonio Argenziano <antonio.argenziano@intel.com>
Cc: Lucas De Marchi <lucas.demarchi@intel.com>
Cc: Rodrigo Vivi <rodrigo.vivi@intel.com>
Cc: Katarzyna Dec <katarzyna.dec@intel.com>
Reviewed-by: Katarzyna Dec <katarzyna.dec@intel.com>
|
|
We're going to need some DRM formats, and we're going to need the igt_fb
code to handle them. Since it relies on the format_desc structure to map
the DRM fourcc to the pixman and cairo formats, we need to add these new
formats to that structure.
Signed-off-by: Maxime Ripard <maxime.ripard@bootlin.com>
Reviewed-by: Arkadiusz Hiler <arkadiusz.hiler@intel.com>
|
|
Pixman allows for much more conversions than cairo, and we don't want to
open code conversions routine for the common formats.
Let's plug pixman in our conversion function so that we can benefit from it
when possible.
Reviewed-by: Eric Anholt <eric@anholt.net>
Signed-off-by: Maxime Ripard <maxime.ripard@bootlin.com>
|
|
So far, pixman was used exclusively when the Chamelium support was enabled.
However, since we're going to use it as one of the backend to do the
igt_fb conversions between formats, we'll need it all the time. Make
that explicit.
Signed-off-by: Maxime Ripard <maxime.ripard@bootlin.com>
Reviewed-by: Arkadiusz Hiler <arkadiusz.hiler@intel.com>
|
|
The chamelium format subtests will need to convert the reference pattern to
the format to be tested on the DRM device.
However, Cairo is very limited when it comes to format, and while pixman
has much more support for formats, it's still falling short compared to
what DRM exposes, especially on the YUV side. Plus, since we want to run
CRC checks on the frame, we can't afford having conversions back and forth
between RGB24, as the current API is doing.
In order to abstract this away, let's create a function that will convert a
igt_fb structure to another DRM format and return the converted igt_fb.
For now, we will use only cairo to do the conversion, but we will use other
libraries or roll our own routines to convert to more exotic formats and
abstract it away from the users.
Reviewed-by: Eric Anholt <eric@anholt.net>
Signed-off-by: Maxime Ripard <maxime.ripard@bootlin.com>
|
|
The current code to convert between two buffer formats is quite tied to the
cairo surface infrastructure. Since we'll want to reuse it, make that
function more generic by introducing a common structure that passes all the
arguments and a common function that will call the right functions we
needed.
Reviewed-by: Eric Anholt <eric@anholt.net>
Signed-off-by: Maxime Ripard <maxime.ripard@bootlin.com>
|
|
Since it can be inferred from the framebuffer that is already given as an
argument, it is redundant and can be removed.
Reviewed-by: Eric Anholt <eric@anholt.net>
Signed-off-by: Maxime Ripard <maxime.ripard@bootlin.com>
|
|
In the case where an igt_fb user wants to get a cairo surface out of that
framebuffer, if the format of that framebuffer cannot be imported as-is in
Cairo, the current code will do an anonymous mapping to create a shadow
buffer where an RGB24 copy of that buffer will be created.
However, making that shadow buffer into an igt_fb itself will help us do
further improvements on the conversion code.
Signed-off-by: Maxime Ripard <maxime.ripard@bootlin.com>
Reviewed-by: Arkadiusz Hiler <arkadiusz.hiler@intel.com>
|
|
The RGB888 format is the one used as the shadow buffer used when a cairo
surface is requested for a format that Cairo cannot handle.
Since we're going to move that buffer representation to a struct igt_fb,
let's add the RGB888 format to the list of formats that igt_fb knows about.
Signed-off-by: Maxime Ripard <maxime.ripard@bootlin.com>
Reviewed-by: Arkadiusz Hiler <arkadiusz.hiler@intel.com>
|
|
The gem_set_domain call uses an i915 specific ioctl that will fail on
anything else. Let's move that call under a check for whether or not we're
running on an intel platform.
Signed-off-by: Maxime Ripard <maxime.ripard@bootlin.com>
Reviewed-by: Arkadiusz Hiler <arkadiusz.hiler@intel.com>
|
|
The current code to manipulate the buffer has the assumption that we can
create an underlying cairo instance.
However, when it comes to supporting various formats, cairo is very limited
so we would need to decouple the buffer access from cairo surfaces.
Let's create a function that allows to map the underlying GEM buffer from
an igt_fb structure, which will then allow use to manipulate as we wish.
Reviewed-by: Eric Anholt <eric@anholt.net>
Signed-off-by: Maxime Ripard <maxime.ripard@bootlin.com>
|
|
In shaders/ directory we got Intel specific information. As igt
is a project for more vendors, let's move this directory to
lib/i915.
v2: Changed shaders directory path in library files comments.
Signed-off-by: Katarzyna Dec <katarzyna.dec@intel.com>
Cc: Arkadiusz Hiler <arkadiusz.hiler@intel.com>
Cc: Petri Latvala <petri.latvala@intel.com>
Cc: Kalamarz Lukasz <lukasz.kalamarz@intel.com>
Cc: Antonio Argenziano <antonio.argenziano@intel.com>
Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
|
|
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>
|
|
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>
|
|
If the display is disabled (e.g. the driver has disabled the KMS
interface) there is nothing to do so avoid failing.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Acked-by: Antonio Argenziano <antonio.argenziano@intel.com>
|
|
Some drivers may have disabled KMS or there may simply nothing attached
to the device. In either case KMS is unusable and we may prefer to skip.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Acked-by: Antonio Argenziano <antonio.argenziano@intel.com>
|
|
We currently read debugfs every 1 ms, given that it takes about 140 ms
for PSR entry on the CI machines and entry can occur at frame time
intervals, bump the debugfs read interval to 20 ms.
Signed-off-by: Dhinakaran Pandiyan <dhinakaran.pandiyan@intel.com>
Reviewed-by: José Roberto de Souza <jose.souza@intel.com>
|
|
PSR appears to not exit immediately after the test commits a page flip,
give some leeway for PSR to idle. Let's set the timeout at 40 ms with a
5 ms interval between each status read.
Signed-off-by: Dhinakaran Pandiyan <dhinakaran.pandiyan@intel.com>
Reviewed-by: José Roberto de Souza <jose.souza@intel.com>
|
|
Deduplicate the blitter code.
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>
|