Age | Commit message (Collapse) | Author |
|
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>
|
|
Due to the unconditional call to intel_get_drm_devid() in
kmstest_force_connector(), trying to use this function on anything that
isn't intel hardware results in the current fixture being skipped. So,
don't try to get the devid in kmstest_force_connector() unless we're on
an Intel chipset.
Signed-off-by: Lyude <lyude@redhat.com>
Reviewed-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
|
|
We still allow duplicates at this point, but when commit is called only
one output per display is allowed.
This fixes tests like kms_psr_sink_crc, which expect a valid pipe.
Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
|
|
This fixes a failure when running kms_flip after booting on a bare
system as nothing will have probed the connectors before hand.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
|
|
It's possible to make use of disconnected connectors, for example
when overriding the mode or testing connector properties that don't
need it to be connected. Support this by zeroing the mode in that
case. We still return false, but this is ignored by commit.
Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
|
|
In order for igt to run completely standalone, it must coldplug
connectors on first use by forcing the probe.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
|
|
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
|
|
A copy/paste error resulted in us using src_x for both the x and y
panning coordinates; make sure we use src_y instead for the appropriate
parameter.
Fixes: 0e29ce3265b ("igt_kms: Remove pan members from igt_plane, v2.")
Cc: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
Signed-off-by: Matt Roper <matthew.d.roper@intel.com>
Reviewed-by: Bob Paauwe <bob.j.paauwe@intel.com>
|
|
Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
|
|
Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
|
|
By passing a null argument.
Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
|
|
igt_output_set_scaling_mode is a simple way to update scaling mode,
igt_display_(try_)commit_atomic will allow you to call drmAtomicCommit
with custom flags, like TEST_ONLY, EVENT, NONBLOCKING or without
ALLOW_MODESET.
This is useful when you only want to do any of those things, for events
it can be useful to set the user_data pointer too, so export that to
users.
Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
|
|
Add the correct properties, add pipe_changed and mode_changed and go!
Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
Reviewed-by: Ander Conselvan de Oliveira <conselvan2@gmail.com>
|
|
This will make it easier to support TEST_ONLY commits.
Changes since v1:
- Fix color_mgmt_changed and background_changed being cleared
for legacy too. (anderco)
Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
|
|
They're duplicates with src_x/y, so just use those.
Changes since v1:
- Fix order of parameters in calls to igt_fb_set_position.
Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
Reviewed-by: Ander Conselvan de Oliveira <conselvan2@gmail.com>
|
|
Move properties to the pipe, they don't belong in the output
and make atomic commit use the pipes for crtc properties.
Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
Reviewed-by: Ander Conselvan de Oliveira <conselvan2@gmail.com>
|
|
None of the tests requires that a output bound to PIPE_ANY is assigned,
so don't do it. Fix the display commit to iterate over crtc's instead
oof outputs to properly disable pipes without outputs.
This also means that output->valid is only set after connecting a
output to a pipe, so no longer depend on it in for_each_connected_output
and similar macros.
New code should use PIPE_NONE to avoid confusion, PIPE_ANY is a
deprecated alias, and will be removed.
Changes since v1:
- Split out the property changes.
- Split out the commit changes.
Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
Reviewed-by: Ander Conselvan de Oliveira <conselvan2@gmail.com>
|
|
This can be split off from the PIPE_ANY -> PIPE_NONE commit by
making small changes to how igt_pipe_get_output works, next
commit restores the behavior.
Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
Reviewed-by: Ander Conselvan de Oliveira <conselvan2@gmail.com>
|
|
This is a small change required for changing PIPE_ANY to
PIPE_NONE, but it's a standalone change, so make it a separate commit.
Suggested-and-reviewed-by: Ander Conselvan de Oliveira <conselvan2@gmail.com>
Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
|