Age | Commit message (Collapse) | Author |
|
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>
|
|
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_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>
|
|
Found when compiling igt with clang:
[284/819] Compiling C object 'tests/kms_crtc_background_color@exe/kms_crtc_background_color.c.o'.
../tests/kms_crtc_background_color.c:140:48: warning: implicit conversion from enumeration type
'enum igt_atomic_crtc_properties' to different enumeration type 'enum igt_atomic_connector_properties' [-Wenum-conversion]
Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
Reviewed-by: Ville Syrjälä <ville.syrjala@linux.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>
|
|
Some warnings still exist, but they are about missing descriptions for
structs enums and their members.
Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
Reviewed-by: Arkadiusz Hiler <arkadiusz.hiler@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>
|
|
The next patch wants to call for_each_pipe_with_valid_output
with *pipe and *output, this fails miserably without these braces.
Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
Reviewed-by: Mika Kahola <mika.kahola@intel.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>
|
|
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>
|
|
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>
|
|
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>
|
|
In the future I want to allow tests to commit more properties,
but for this to work I have to fix all properties to work better
with atomic commit. Instead of special casing each
property make a bitmask for all property changed flags, and try to
commit all properties.
This has been the most involved one, since legacy pipe commit still
handles a lot of the properties differently from the rest.
Changes since v1:
- Dump all changed properties on commit.
- Fix bug in igt_pipe_refresh().
Changes since v2:
- Set pipe ACTIVE property changed flag on init.
Changes since v3:
- Add a missing igt_pipe_refresh() to kms_atomic_interruptible.
Changes since v4:
- Perform error handling when setting custom crtc properties.
Changes since v5:
- Only attempt to commit changes properties.
Changes since v6:
- Clear OUT_FENCE_PTR on succesful commit.
Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
Reviewed-by: Mika Kahola <mika.kahola@intel.com>
|
|
In the future I want to allow tests to commit more properties,
but for this to work I have to fix all properties to work better
with atomic commit. Instead of special casing each
property make a bitmask for all property changed flags, and try to
commit all properties.
Changes since v1:
- Remove special dumping of src and crtc coordinates.
- Dump all modified coordinates.
Changes since v2:
- Move igt_plane_set_prop_changed up slightly.
Changes since v3:
- Fix wrong ordering of set_position in kms_plane_lowres causing a test failure.
Changes since v4:
- Back out resetting crtc position in igt_plane_set_fb() and
document it during init. Tests appear to rely on it being preserved.
Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
Reviewed-by: Mika Kahola <mika.kahola@intel.com>
|
|
In the future I want to allow tests to commit more properties,
but for this to work I have to fix all properties to work better
with atomic commit. Instead of special casing each
property make a bitmask for all property changed flags, and try to
commit all properties.
Changs since v1:
- Mention which properties we set to what.
- Assert the property to be set is valid.
Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
Reviewed-by: Mika Kahola <mika.kahola@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>
|
|
This tests the various parts of atomic that I want to make
interruptible. Running with --debug shows the stats from
__igt_sigiter_continue, which can be used to make sure that
we don't fall over.
The default igt kms helpers use drmIoctl, which is not intercepted
by igt_while_interruptible. Only igt_ioctl is. This means we have
to call the ioctls manually here.
Changes since v1:
- Implement interruptible DPMS checking too.
- Use igt_ioctl + igt_while_interruptible, instead of the signal helper
shotgun.
Changes since v2:
- Bump whitespace to get rid of the weird double } at same indent.
- Use more newlines in the call to the atomic ioctl.
Changes since v3:
- Fix copyright on year. (Adrinael)
- Use do_ioctl instead of do_or_die(igt_ioctl) (ickle).
- Add test description. (Adrinael)
Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
Cc: Daniel Stone <daniels@collabora.com>
Acked-by: Daniel Vetter <daniel.vetter@ffwll.ch> #v1
Reviewed-by: Petri Latvala <petri.latvala@intel.com>
[mlankhorst: Document sleep values (Adrinael)]
|
|
With the conversion to atomic, this is already handled in the core.
Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
Reviewed-by: Mika Kahola <mika.kahola@intel.com>
|
|
Except for for_each_pipe_static they cannot be used outside of
fixtures/subtest. Assert this.
This will make the broken version of kms_ccs assert when run, which
also would have made $make check fail.
Cc: Daniel Stone <daniels@collabora.com>
Cc: Jason Ekstrand <jason@jlekstrand.net>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Reviewed-by: Petri Latvala <petri.latvala@intel.com>
|
|
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>
|
|
Name should not be driver-specific.
Signed-off-by: Leo (Sunpeng) Li <sunpeng.li@amd.com>
Reviewed-by: Arkadiusz Hiler <arkadiusz.hiler@intel.com>
|
|
Increasing max pipe count to 6 to support AMD GPU's.
Since some tests' behavior depends on this value, small changes are made
to remove this dependency:
* kms_ccs: Early abort if wanted_pipe is out-of-bounds.
* kms_concurrent: Check if pipe is within bounds first.
* kms_pipe_color: Prevent skipping of subsequent tests by placing
generated tests in a 'igt_subtest_group'.
* kms_plane: Move pipe and plane index checking to subtest group level.
v2: Change invalid pipe check on kmstest_pipe_name() to use
I915_MAX_PIPE
v3: Change tabs to spaces in 'enum pipe'
Signed-off-by: Leo (Sunpeng) Li <sunpeng.li@amd.com>
Reviewed-by: Arkadiusz Hiler <arkadiusz.hiler@intel.com>
Tested-by: Tomi Sarvela <tomi.p.sarvela@intel.com>
|
|
Most KMS users open code this.
Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
|
|
Based on the initial work by Marius Vlad.
v3: Bring back audio injection
v4: Make a helper for 3d/4k/audio HDMI injection (Petri)
Cc: Petri Latvala <petri.latvala@intel.com>
Reviewed-by: Petri Latvala <petri.latvala@intel.com>
Signed-off-by: Abdiel Janulgue <abdiel.janulgue@linux.intel.com>
|
|
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>
|
|
Now that igt_output_set_pipe handles refreshing igt_output,
we only have to be sure that there are no conflicting outputs
in igt_display_commit.
Reported-and-tested-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
|
|
The number of vblanks that pass whilst we read back the CRCs is depended
upon CPU scheduling -- we may take longer than expected and end up
reading more CRCs. Align the start of the loop to a vblank.
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=100132
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
|
|
Add support for the OUT_FENCE_PTR property to enable setting out fences for
atomic commits.
Signed-off-by: Gustavo Padovan <gustavo.padovan@collabora.co.uk>
Signed-off-by: Robert Foss <robert.foss@collabora.com>
Reviewed-by: Brian Starkey <brian.starkey@arm.com>
|
|
Add support for the IN_FENCE_FD property to enable setting in fences for atomic
commits.
Signed-off-by: Robert Foss <robert.foss@collabora.com>
Reviewed-by: Brian Starkey <brian.starkey@arm.com>
|
|
Signed-off-by: Gustavo Padovan <gustavo.padovan@collabora.co.uk>
Signed-off-by: Robert Foss <robert.foss@collabora.com>
Reviewed-by: Brian Starkey <brian.starkey@arm.com>
|
|
Due to the dyn n_planes implementation some attributes and functions
were made obsolete and cand be removed.
However to keep all of the tests building the obsolete code is
removed after all of the tests have been made compatible with the
dyn n_planes changes.
Signed-off-by: Robert Foss <robert.foss@collabora.com>
Reviewed-by: Mika Kahola <mika.kahola@intel.com>
|
|
In upcoming drm-misc-next changes, the number of planes per pipe has
been increased as more than one primary plane can be associated with
a pipe.
The simple fix for this would be to simply bump hardcoded value for
number of frames per pipe.
But a better solution would be to add support for dynamic number of
planes per pipe to i-g-t.
Signed-off-by: Robert Foss <robert.foss@collabora.com>
Reviewed-by: Mika Kahola <mika.kahola@intel.com>
|
|
Rename these properties to have them use the same naming convention
as the igt_*_t structs.
Signed-off-by: Robert Foss <robert.foss@collabora.com>
Reviewed-by: Mika Kahola <mika.kahola@intel.com>
|
|
Rework kmstest_crtc and kmstest_plane structs and their usage
to not depend on a static plane count.
Signed-off-by: Robert Foss <robert.foss@collabora.com>
Reviewed-by: Mika Kahola <mika.kahola@intel.com>
|
|
Add an index property which helps accessing the corresponding
igt_plane_t structure through the igt_*_get_plane() functions.
Signed-off-by: Robert Foss <robert.foss@collabora.com>
Reviewed-by: Mika Kahola <mika.kahola@intel.com>
|
|
A simple helper that checks whether or not the given connector has the
"Broadcast RGB" prop, and if so sets it to the given mode. Required for
working with the Chamelium since the Chamelium EDIDs enable limited
color ranges by default on i915 and break frame dump comparisons/CRCs.
Cc: Tomeu Vizoso <tomeu@tomeuvizoso.net>
Signed-off-by: Lyude <lyude@redhat.com>
|
|
A simple helper for getting the igt_output_t struct corresponding to the
given DRM connector id.
Cc: Tomeu Vizoso <tomeu@tomeuvizoso.net>
Signed-off-by: Lyude <lyude@redhat.com>
|
|
This adds some basic helpers for connecting to udev and watching for
sysfs hotplug events.
Cc: Tomeu Vizoso <tomeu@tomeuvizoso.net>
Signed-off-by: Lyude <lyude@redhat.com>
Changes since v1:
- Remove unused arg from documentation
Changes since v2:
- Make udev_monitor explicit so that we can use this for detecting FSMs
from the Chamelium in rpc calls
|