Age | Commit message (Collapse) | Author |
|
This will make the IGT tests that use fences more useful, since they can
perform the waiting themselves when required.
To celebrate, also add plane-use-after-nonblocking-unbind-fencing,
the fence version of plane-use-after-nonblocking-unbind.
Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
Acked-by: Gustavo Padovan <gustavo.padovan@collabora.com>
|
|
All other atomic properties are reset in display_commit_changed,
which is the right place because TEST_ONLY commits don't need to
be reset.
Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
Acked-by: Gustavo Padovan <gustavo.padovan@collabora.com>
|
|
Changelog:
- v2: removed the forced overwrite of output->config.default_mode
- v1: original submission by Brian
igt_display_commit isn't refreshing all outputs anymore, which means
that an override mode may never get picked up.
Instead of forcing a reprobe to handle copying the override_mode into
default_mode, just change igt_output_get_mode() to return the
override_mode if it's been set, and remove the old code which would
directly overwrite default_mode.
This should be more robust, as igt_output_get_mode() will always return
the correct mode, without needing the output to be reprobed.
This change means that output->config.default_mode always contains the
"non-overridden" default mode.
Signed-off-by: Brian Starkey <brian.starkey@arm.com>
Signed-off-by: Liviu Dudau <liviu.dudau@arm.com>
Reviewed-by: Arkadiusz Hiler <arkadiusz.hiler@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>
|
|
First unindent before calling check_return, else when an expected
failure happens, the unindent never happens.
Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
|
|
Most KMS users open code this.
Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
|
|
In trying to fix igt_display_init() for devices without cursors, I
actually made matters worse. Fix the assert.
Fixes: 545aa3398223 lib/igt_kms: Remove redundant cursor code
Signed-off-by: Brian Starkey <brian.starkey@arm.com>
Reviewed-by: Arkadiusz Hiler <arkadiusz.hiler@intel.com>
|
|
Somehow an incorrect commit was reverted.
This reverts commit cda2b91da9c5209d9b3eaac2d2c6f4778a58d4a0.
Signed-off-by: Petri Latvala <petri.latvala@intel.com>
|
|
This reverts commit 15ffbf378c3d9b3a75ac6b6ec6d96f917e9a7637.
Some how you need to put headers in the sources, but I've forgotten how
to do in the mess of automake/Android.
|
|
In at least SKL and GLK (possibly other devices too), using a cursor
plane to scan out an fb might result in a different pipe crc than when
using a regular plane at the same position with the same fb while using
the CSC logic to limit the color range. The differences could be caused
by the cursor plane being limited to 8 bpc while the regular planes
support higher bit depths, leading to slightly different values to be
used internally. This is evidenced by the failures happening with
specific color values, 0.5 for example, but that's mostly speculation.
To avoid misterious failures caused by limited range rgb, force all
tests to use full range. It is still possible for tests to override this
if necessary.
v2: Add more details to the commit message.
v3: Force all tests to use full range.
Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>
Signed-off-by: Ander Conselvan de Oliveira <ander.conselvan.de.oliveira@intel.com>
Reviewed-by: Mika Kahola <mika.kahola@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>
|
|
Wrapping fdopen() proved dangerous, the underlying fd is not refcounted,
and we must close it in the library or else we easily leak and exhaust
all fd. Since we can't provide igt_debugfs_fopen(), move the burden onto
the caller for those that require a stream FILE*.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
|
|
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>
|
|
The dynamic plane support means that there should never be gaps in the
pipe->planes array. This means we should never need to move the cursor
plane from the last slot to another.
Remove the unnecessary code, and add an assert that makes sure nothing
strange happened that broke the assignment logic.
Signed-off-by: Brian Starkey <brian.starkey@arm.com>
Reviewed-by: Robert Foss <robert.foss@collabora.com>
|
|
The dynamic plane support means that if there's no cursor plane, then
there is no space in the pipe->planes array for it, and thus assigning
a "drm_plane-less" plane is out-of-bounds and leads to heap corruption
and later crashes.
The "drm_plane-less" cursor plane isn't included in n_planes anyway,
which means there's no way to ever access it/know that it's there - so
just remove it entirely.
Fixes: 36656239ef96 lib/igt_kms: Implement dynamic plane count support
Signed-off-by: Brian Starkey <brian.starkey@arm.com>
Reviewed-by: Robert Foss <robert.foss@collabora.com>
|
|
If there's no primary plane, pipe->plane_primary == -1, and the assert
meant to check that it's valid will access pipe->planes[-1].
Fix that to check that pipe->plane_primary has been set instead.
Fixes: 36656239ef96 lib/igt_kms: Implement dynamic plane count support
Signed-off-by: Brian Starkey <brian.starkey@arm.com>
Reviewed-by: Robert Foss <robert.foss@collabora.com>
|
|
Remove a bunch of branches, functionally equivalent.
Changes since v1:
- Added back display->has_cursor_plane assignment
Signed-off-by: Brian Starkey <brian.starkey@arm.com>
Reviewed-by: Robert Foss <robert.foss@collabora.com>
|
|
In the loop looking for planes on a pipe, we always want to free up
the drm_plane afterwards.
Fixes: 36656239ef96 lib/igt_kms: Implement dynamic plane count support
Signed-off-by: Brian Starkey <brian.starkey@arm.com>
Reviewed-by: Robert Foss <robert.foss@collabora.com>
|
|
kms_plane_lowres subtest pipe-C-tiling-none crashes when reading out
number of crtc. This patch fixes the bug on crtc readout.
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=99653
Fixes: 9de635976c426b4c835083792c7d4d6e32aec615
("lib/igt_kms: Avoid depencency on static plane count")
Reviewed-by: Robert Foss <robert.foss@collabora.com>
Signed-off-by: Mika Kahola <mika.kahola@intel.com>
|
|
This can happen when a DP-MST disappears, handle the error by printing
a warning instead of crashing.
Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.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>
|
|
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 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>
|
|
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
|
|
The pipe may be reset when doing a modeset in a fork,
changing it back after the fork exited caused the output
not to be updated.
This resulted in a -EINVAL when doing atomic commit.
Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
|
|
Signed-off-by: Robert Foss <robert.foss@collabora.com>
Reviewed-by: Petri Latvala <petri.latvala@intel.com>
|
|
Avoid double free's by setting the free'd pointer to NULL after
free.
Signed-off-by: Robert Foss <robert.foss@collabora.com>
Reviewed-by: Petri Latvala <petri.latvala@intel.com>
|
|
Add missing descriptive igt_assert_t calls to calloc'd memory.
Signed-off-by: Robert Foss <robert.foss@collabora.com>
Reviewed-by: Petri Latvala <petri.latvala@intel.com>
|
|
Testcase for plane visibility after atomic modesets. The idea of the test
is the following:
- draw a blue screen with high resolution
- enable a yellow plane, visible, in lower-left corner
- set a new lower resolution mode (1024x768) that makes plane invisible
- check from debugfs 'i915_display_info' that the plane is invisible
- switch back to higher resolution mode
- check from debugfs 'i915_display_info' that the plane is visible again
- repeat number of iterations, default 64
v2: allow test to be run on non-Intel drivers (Daniel)
moved test for plane visibility to as helper function (Daniel)
moved get_vblank() function to be part of helper functions (Daniel)
rename 'tiling' parameter as 'modifier' (Daniel)
select a mode from a list so that the plane should be invisible.
use default 1024x768 mode only as a fallback if decent mode has not
been found (Daniel)
add tiling MODE_NONE (Daniel)
v3: draw as many overlay planes as the platform supports + cursor plane
on top of each other on lower-left corner
skip the test if i915_display_info file is not available
test plane visibility with igt_assert_plane_visibility() function
drop option for multiple test iterations (Daniel Vetter)
v4: switch 'for_each_connected_output()' to
'for_each_valid_output_on_pipe()'
skip Y and Yf tiling for generations older than 9 (Maarten)
Cc: Daniel Stone <daniel@fooishbar.org>
Cc: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
Reviewed-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
Signed-off-by: Mika Kahola <mika.kahola@intel.com>
|
|
This time add an explicit variable force_reprobe, which is set to true
on initial probe and might be set again (in a future patch) after a
hpd event.
Acked-by: Chris Wilson <chris@chris-wilson.co.uk>
Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
|
|
This reverts commit 20258f2353a266f8fe19e7392eb282e58dd87f6a.
This completely breaks igt running on bare hardware where it is required
that igt probes the connectors before use.
Cc: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
|
|
None of the tests depend on it any longer, so it's time to kill. :)
Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
|
|
Many GPUs have more then 3 pipes available, so hard limiting this to
I915_MAX_PIPES prevents us from using anything that relies on
igt_display_init() on non-intel systems (since we end up writing out of
bounds and seg faulting). Fix this by dynamically allocating
igt_display->pipes using the number of pipes we've detected on the GPU.
Signed-off-by: Lyude <lyude@redhat.com>
Reviewed-by: Abdiel Janulgue <abdiel.janulgue@linux.intel.com>
|
|
We've had support for universal planes since kernel version 3.15, so
there's not really a good reason to try supporting drivers that lack
plane support now. As well, the current has_universal_planes logic is
broken anyway as it makes the assumption that having display planes
always means we have both a primary plane and a cursor plane (this isn't
true on radeon/amdgpu and nouveau).
So, remove this, and just check for whether or not we have a cursor
plane.
Signed-off-by: Lyude <lyude@redhat.com>
Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>
|
|
So that debug logs contain the unexpected value.
Signed-off-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
Reviewed-by: Abdiel Janulgue <abdiel.janulgue@linux.intel.com>
|