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>
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
Switch all fb size handling to 64bits to accomodate >4GiB
framebuffers.
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
|
|
igt_plane_set_prop_enum, v2.
We now have infrastructure for generic enum handling. This will make it easier
to write new tests without defining all enum constants beforehand.
Changes since v1:
- Fix compile error, sent old version by accident.
Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
Reviewed-by: Mika Kahola <mika.kahola@intel.com>
|
|
This adds the possibility to test arbitrary enumerations in IGT without
having to define mappings for each and every one.
Changes since v1:
- Add commit description.
- Add try_prop_enum, to allow handling unknown enumerations.
Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
Reviewed-by: Mika Kahola <mika.kahola@intel.com>
|
|
edid_override is a i915.ko debugfs feature; just skip any kms test that
depends on being able to override the edid.
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=107337
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Reviewed-by: Katarzyna Dec <katarzyna.dec@intel.com>
|
|
Now that we can use _Static_assert() due to C11, make it future proof so
we remember to update this if IGT_MAX_PIPES changes. Also reduce
verbosity a little bit by calculating indexes instead of if/else chain.
Signed-off-by: Lucas De Marchi <lucas.demarchi@intel.com>
Reviewed-by: Arkadiusz Hiler <arkadiusz.hiler@intel.com>
|
|
Configure the plane color_encoding/color_range based on what the
fb contents are.
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Reviewed-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
|
|
Two tests uses the very same wait_for_pageflip() routine. These tests are
'kms_rotation_crc' and 'kms_flip_tiling'. In order to decrease code
repetition, let's move this function as part of kms function collection
in igt_kms.
No functional changes.
Signed-off-by: Mika Kahola <mika.kahola@intel.com>
Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
|
|
This is just a simple change to reflect the actual state. No rewording
yet, just a simple substitution in most visible places - docs, README
and paths.
There are probably some leftovers here and there, but we can let them be
for now, this is already well overdue.
v2: fixed couple of obvious leftovers pointed out by Petri
Cc: Petri Latvala <petri.latvala@intel.com>
Cc: Daniel Vetter <daniel.vetter@intel.com>
Signed-off-by: Arkadiusz Hiler <arkadiusz.hiler@intel.com>
Acked-by: Harry Wentland <harry.wentland@amd.com>
Reviewed-by: Petri Latvala <petri.latvala@intel.com>
|
|
When we set the test to its first state, we will clear FIFO underrun
status through the debugfs, so that any underruns caused by the tests
will not affect other tests. In particular this also resets the FBC
FIFO underrun status, so previous failures won't affect other tests
that depend on FBC.
Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=105681
Reviewed-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
|
|
Pretend that outputs without modes are disabled, and try reprobing
if no modes are initially detected, just in case that the reprobe
will find modes.
Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=105798
Reviewed-by: Marta Lofstedt <marta.lofstedt@intel.com>
|
|
Only do a full probe when the initial connector status is unknown, and
otherwise skip it. This should speed up kms tests ever so slightly.
Also set pipe to PIPE_NONE for igt_output_refresh(), to make the
connector info slightly more accurate.
Changes since v1:
- Instead of a force_reprobe tristate, only force reprobe from
igt_display_init() when an unknown connection is found.
Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
Cc: Arkadiusz Hiler <arkadiusz.hiler@intel.com>
Reviewed-by: Arkadiusz Hiler <arkadiusz.hiler@intel.com>
|
|
Decouple the prop name arrays from the actual enum values
by using named initializers. Should make it less likely that we
end up with the wrong property on account of getting the order
wrong.
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Reviewed-by: Daniel Vetter <daniel@ffwll.ch> #irc
|
|
Make a bunch of string arrays const.
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Reviewed-by: Daniel Vetter <daniel@ffwll.ch> #irc
|
|
igt_display_init() now unconditionally tries to get the plane IN_FORMATS
blob, which causes a hard assert failure if we don't have the property
present.
Check if it's there and return early if not.
Signed-off-by: Daniel Stone <daniels@collabora.com>
Fixes: 98f7614bd725 ("lib: Parse plane IN_FORMATS blobifiers into a nicer form")
Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Cc: Chris Wilson <chris@chris-wilson.co.uk>
|
|
igt_get_single_output_for_pipe() will give a valid output for a pipe,
for_each_pipe_with_single_output will iterate over all pipes, and
will be called for each pipe with an output once.
Changes since v1:
- pipe = __outputs - __output returned a negative number for pipe,
correctly set it to __output - __outputs.
Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
|
|
Maintain straight up arrays of format+modifier tuples for each plane,
and also collect up a similar device wide array. These will make it
easy to confirm whether each plane (or the whole device) supports a
specific format+modifier pair.
v2: s/igt_hweight64/igt_hweight/
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
|
|
Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
Reviewed-by: Arkadiusz Hiler <arkadiusz.hiler@intel.com>
|
|
Since more essential components use libudev, make its dependency
mandatory.
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: Petri Latvala <petri.latvala@intel.com>
Cc: Arkadiusz Hiler <arkadiusz.hiler@intel.com>
Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
Acked-by: Petri Latvala <petri.latvala@intel.com>
|
|
This gets rid of the following warnings:
lib/igt_kms.c:2688: warning: Symbol name not found at the start of the comment block.
lib/igt_kms.c:2738: warning: Symbol name not found at the start of the comment block.
lib/igt_kms.c:2788: warning: Symbol name not found at the start of the comment block.
lib/igt_kms.c:2812: warning: Parameter description for igt_pipe_obj_replace_prop_blob::pipe is not used from source code comment block.
lib/igt_kms.c:2812: warning: Parameter description for igt_pipe_obj_replace_prop_blob::pipe_obj is missing in source code comment block.
lib/igt_kms.c:3794: warning: Parameter description for igt_cleanup_hotplug::mon is missing in source code comment block.
Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
Reviewed-by: Arkadiusz Hiler <arkadiusz.hiler@intel.com>
|
|
It seems some of the documentation is still not complete, finish it for the benefit of IGT newcomers.
These functions include:
kmstest_dumb_map_buffer
kmstest_get_vblank
igt_assert_plane_visible
igt_display_require_output
igt_display_require_output_on_pipe
igt_pipe_get_plane_type
igt_output_get_mode
igt_output_set_pipe
igt_output_get_plane_type
igt_plane_set_fb
igt_plane_set_position
igt_plane_set_rotation
igt_wait_for_vblank_count
igt_wait_for_vblank
Signed-off-by: Carlos Santa <carlos.santa@intel.com>
CC: Daniel Vetter <daniel.vetter@ffwll.ch>
Reviewed-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
|
|
Short reads don't work, you either read the whole event or nothing
at all, so follow the recommendations in the documentation and
allocate a buffer of 4096 bytes for the event, if we capture
multiple events read them all.
Cc: Jari Tahvanainen <jari.tahvanainen@intel.com>
Reported-by: Jari Tahvanainen <jari.tahvanainen@intel.com>
Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=104538
[mlankhorst: Assign ev once in the loop, instead of 2 places. (ickle)]
Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
|
|
==24749== Syscall param ioctl(generic) points to uninitialised byte(s)
==24749== at 0x6A8ADC7: ioctl (syscall-template.S:84)
==24749== by 0x5067687: drmIoctl (in /opt/xorg/lib64/libdrm.so.2.4.0)
==24749== by 0x138531: kmstest_set_connector_dpms (igt_kms.c:1022)
==24749== by 0x112937: set_dpms (kms_flip.c:263)
==24749== by 0x112937: run_test_step (kms_flip.c:776)
==24749== by 0x112937: event_loop (kms_flip.c:1138)
==24749== by 0x115468: run_test_on_crtc_set (kms_flip.c:1378)
==24749== by 0x115468: run_test (kms_flip.c:1450)
==24749== by 0x1111CF: main (kms_flip.c:1673)
==24749== Address 0x1ffefff2a0 is on thread 1's stack
==24749== in frame #2, created by kmstest_set_connector_dpms (igt_kms.c:1012)
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
|
|
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=96620
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Reviewed-by: Petri Latvala <petri.latvala@intel.com>
|
|
Commit 98c64b33a793 ("lib/igt_kms: Drop all stale events on first
commit.") added a use of poll() to igt_kms.c, but that file only
includes poll.h when HAVE_UDEV is defined. Move the include outside
the UDEV conditional.
Fixes: 98c64b33a793 ("lib/igt_kms: Drop all stale events on first commit.")
Signed-off-by: Petri Latvala <petri.latvala@intel.com>
Cc: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
Cc: Chris Wilson <chris@chris-wilson.co.uk>
Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
Reviewed-by: Rhys Kidd <rhyskidd@gmail.com>
|
|
I've been trying to make kms_cursor_legacy work when subtests fail.
Other subtests will start failing too because of expired events or
stale pipe crc. The latter can be resolved in the test, but the former
could affect other tests
Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
[mlankhorst: Change return status to int, so callers can see how many events are swallowed.]
Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
|
|
Test that horizontal flip works with supported rotations. Includes
a fix for the unrotated fb which was not being positioned correctly
with portrait and landscape rectangles.
v2:(from Anusha)
- Change 180 degree rotation to follow the rest, use
igt_swap(), make flip variable a bool. Format the
patch correctly (Ville, Petri Latvala)
v3: (From Anusha)
- Correct the name of subtests in order to avoid duplication
of names (Arek)
Signed-off-by: Anusha Srivatsa <anusha.srivatsa@intel.com>
Signed-off-by: Joseph Garvey <joseph1.garvey@intel.com>
Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>
Cc: Petri Latvala <petri.latvala@intel.com>
Cc: Arkadiusz Hiler <arkadiusz.hiler@intel.com>
Reviewed-by: Petri Latvala <petri.latvala@intel.com>
|
|
display->n_pipes is zero-indexed, so N returned in
igt_display_get_n_pipes is already not a valid pipe. This patch
prevents kms_ccs from going nuts when testing the first unexisting pipe.
Signed-off-by: Gabriel Krisman Bertazi <krisman@collabora.co.uk>
Reviewed-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
Reviewed-by: Arkadiusz Hiler <arkadiusz.hiler@intel.com>
Reviewed-by: Ben Widawsky <ben@bwidawsk.net>
|
|
This patch gets rid of the Android support, deleting all the hacks and
moving code around to the places it belongs.
Android build is not really maintained properly and rots rather fast.
With recent push for Meson here and Android going for Soong it will only
accelerate.
It's a good time to drop the illusion of providing any support.
Cc: Daniel Vetter <daniel.vetter@intel.com>
Cc: Kalyan Kondapally <kalyan.kondapally@intel.com>
Cc: Petri Latvala <petri.latvala@intel.com>
Cc: Radoslaw Szwichtenberg <radoslaw.szwichtenberg@intel.com>
Signed-off-by: Arkadiusz Hiler <arkadiusz.hiler@intel.com>
Reviewed-by: Juha-Pekka Heikkila <juhapekka.heikkila@gmail.com>
Acked-by: Petri Latvala <petri.latvala@intel.com>
|
|
The rotation property sucks because it may affect whether
drmModeSetPlane succeeds or not. Add some code to handle
this.
First try to set rotation directly, if that succeeds we
return immediately. If it fails we disable the plane, set
the rotation property and run the rest of the code.
This will hopefully make legacy rotation work in more cases when
scaling is not supported.
Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>
|
|
igt_output_from_connector should be used for disconnected outputs
too, this is useful for chamelium testing, where disconnected outputs
may reappear.
Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
Reviewed-by: Lyude Paul <lyude@redhat.com>
|
|
A lot of code duplicates this, but it should be handled in the core.
Add it and use it after igt_display_init(), the tests have to be
converted one by one.
Changes since v1:
- Merely reset rotation to HW value.
Changes since v2:
- Compile.
Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
Reviewed-by: Lyude Paul <lyude@redhat.com>
|
|
When we only print mode objects that have changed properties, we
reduce a lot of the spam. Fortunately we have a single bitfield
now that gets printed when something is changed. Use that to decrease
the amount of spam.
Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
Reviewed-by: Petri Latvala <petri.latvala@intel.com>
|
|
kmstest_get_crtc was skipping because at that point the crtc was not
active yet, instead we should only use igt_assert_plane_visible
directly. Unexport kmstest_get_crtc, since nothing here should need it.
While at it fix a small leak in igt_assert_plane_visible, the only
remaining user.
Additionally, it' s not allowed to obtain crc on a disabled pipe, so
wait until the pipe is enabled before allocating the crc.
Changes since v1:
- Move igt_pipe_crc_new until after pipe is enabled.
- Move test_init() into test_setup(), it's redundant..
- Remove pipe_crc from data, no need to have it there.
Changes since v2:
- Increment fb pointer for igt_plane_set_fb, in order to set a different
fb on each plane correctly.
Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
Reviewed-by: Mika Kahola <mika.kahola@intel.com>
|
|
igt_pipe_get_property is about to be removed, so use
igt_pipe_obj_get_prop instead. This requires adding 2 more properties
to the crtc property list. Also get rid of the Broadcast RGB call,
this is already handled in igt_kms.
Change order for DEGAMMA_LUT and GAMMA_LUT around, else this test will
fail if legacy gamma is set. In the legacy path, this will update
GAMMA_LUT to the new size before DEGAMMA_LUT is set.
Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
Reviewed-by: Mika Kahola <mika.kahola@intel.com>
|
|
This can be handled by generic properties.
Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
Reviewed-by: Mika Kahola <mika.kahola@intel.com>
|
|
igt_pipe_get_property has been replaced by igt_pipe_obj_get_prop.
Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
Reviewed-by: Mika Kahola <mika.kahola@intel.com>
|
|
Some tests need to get the current kernel value for properties
as part of the test. Add get_prop functions that will retrieve
the current kernel value.
Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
Reviewed-by: Mika Kahola <mika.kahola@intel.com>
|
|
This allows test to test whether a property is supported, in
a nice and clean way. It removes the need for special case
functions like igt_plane_supports_rotation.
Convert the users of igt_plane_supports_rotation and remove the
extra check in drm_plane_commit, this is already checked below
when setting plane properties.
Changes since v1:
- Use the correct has_prop in kms_crtc_background_color.c
Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
Reviewed-by: Mika Kahola <mika.kahola@intel.com>
|
|
Setting broadcast rgb was only used by chamelium, but is now handled
in igt_display by default. This means that chamelium doesn't need to
set it, and this can be hidden. The broadcast RGB property is intel
connector specific, so rename the enum to intel_broadcast_rgb_mode.
Keep the property and enum public in case someone wants to test the
property later.
Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
Reviewed-by: Mika Kahola <mika.kahola@intel.com>
|
|
With the replace_prop_blob functions we can safely replace the blob for
any property, without having to care about error handling ourselves.
This will for example allow overriding color management blobs, or for
kms_atomic set invalid mode blobs.
The color management blob functions are removed, they can now be
replaced by direct calls to replace the properties.
Changes since v1:
- Fix chamelium tests.
Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
Reviewed-by: Mika Kahola <mika.kahola@intel.com>
|