Age | Commit message (Collapse) | Author |
|
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>
|
|
This will allow us to find a matching encoder based on a pipe only.
Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
Reviewed-by: Ander Conselvan de Oliveira <conselvan2@gmail.com>
|
|
This is the same as using config.pipe because the order of crtcs will
never change.
Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
Reviewed-by: Ander Conselvan de Oliveira <conselvan2@gmail.com>
|
|
igt_crtc_prop_names and igt_atomic_crtc_properties have different orders of
properties, which is fixed in this patch.
Signed-off-by: Robert Foss <robert.foss@collabora.com>
Signed-off-by: Marius Vlad <marius.c.vlad@intel.com>
|
|
Change igt_wait_for_vblank() to use kmstest_get_vbl_flag() helper function.
Signed-off-by: Robert Foss <robert.foss@collabora.com>
Signed-off-by: Marius Vlad <marius.c.vlad@intel.com>
|
|
This function formats a pipe_id into the format expected by DRM while
processing DRM_IOCTL_WAIT_VBLANK.
Signed-off-by: Robert Foss <robert.foss@collabora.com>
Signed-off-by: Marius Vlad <marius.c.vlad@intel.com>
|
|
Switch igt_assert to igt_assert_lte to provide more diagnostic
information.
Signed-off-by: Robert Foss <robert.foss@collabora.com>
Signed-off-by: Marius Vlad <marius.c.vlad@intel.com>
|
|
Fix issue where the plane counting fails due to the number and
configuration of planes being unlike the intel configuration.
Signed-off-by: Robert Foss <robert.foss@collabora.com>
Signed-off-by: Marius Vlad <marius.c.vlad@intel.com>
|
|
Increase the number of planes supported to 10.
kmstest_plane_name only previously supported 4 planes,
this patch adds support for up to 10 planes.
Signed-off-by: Robert Foss <robert.foss@collabora.com>
Signed-off-by: Marius Vlad <marius.c.vlad@intel.com>
|
|
This reverts commit 4a1859781f154513f19cd6392e04f50dbe6c030a.
This commit wasn't ready yet, should never have been committed.
|
|
All pipes are now updated in the loop first, before connectors
are read out. The mode_id and active crtc properties are added,
and crtc_id for connectors. These are required to do a modeset,
and the behavior during atomic commits is changed slightly too.
A lot of code will do the following:
- Init.
- igt_output_set_pipe(output, pipe);
- commit.
Since legacy setcrtc and atomic commit differ, there are some
differences in how we commit pipes and connectors too.
For atomic we set output->crtc during igt_output_set_pipe,
and use it in atomic commit. This may be set to NULL, in which
case the output is disconnected from the crtc. Unlike legacy
we won't attempt to bind all connectors to all pipes, only
the ones that were explicitly set.
As a test, convert kms_rmfb.c
Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
|
|
for_each_valid_output_on_pipe.
There are a lot of places where we do either
for_each_pipe {
igt_subtest_f(... "-pipe-C", pipe_name())
for_each_connected_output()
/* Run subtest */
}
or:
igt_subtest_f(...) {
for_each_pipe()
for_each_connected_output()
/* Run subtest */
}
The former should be replaced with for_each_valid_output_on_pipe,
the latter with for_each_pipe_with_valid_output.
Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
|
|
relative path. Fix by passing the correct dirfd.
Signed-off-by: Marius Vlad <marius.c.vlad@intel.com>
CC: Chris Wilson <chris@chris-wilson.co.uk>
Reviewed-By: Chris Wilson <chris@chris-wilson.co.uk>
|
|
There are two paths to force enable a connector, via debugfs and via
sysfs. sysfs has the advantage of being a stable interface and of
updating the connector after application (allowing us to not force a
reprobe from userspace).
v2: Don't assume Intel only
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>
|
|
On Cherryview PIPE_C can only be connected to PORT_D (bspec).
The driver properly reports the crtc_mask for the encoder, however the
mismatch between pipe and port is not reported back to the test.
Add support for detecting this case so the test can be skipped.
v2: Apply review comments (Marius)
Signed-off-by: Gabriel Feceoru <gabriel.feceoru@intel.com>
Signed-off-by: Marius Vlad <marius.c.vlad@intel.com>
|
|
Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
|
|
This function uses an intel-specific ioctl to fetch a mapping between pipes and
crtc ids, but this technique is outdated as the crtc id is now always
equivalent to its index in the array of crtcs returned by the kernel.
Signed-off-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
|
|
For those tests that now pass on drivers other than i915, call
drm_open_driver_master with DRIVER_ANY.
Also do so from igt_enable_connectors.
Signed-off-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
Reviewed-by: Daniel Stone <daniels@collabora.com>
Acked-by: Daniel Vetter <daniel.vetter@ffwll.ch>
|
|
Which basically just calls DRM_IOCTL_MODE_MAP_DUMB and is similar to
gem_mmap__gtt().
Signed-off-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
Reviewed-by: Daniel Stone <daniels@collabora.com>
Acked-by: Daniel Vetter <daniel.vetter@ffwll.ch>
|
|
In order to test drivers that don't have support for proper buffer
objects, add a wrapper for creating dumb buffer objects that will be
called from the lib code for those subtests that don't need to care.
Signed-off-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
Reviewed-by: Daniel Stone <daniels@collabora.com>
Acked-by: Daniel Vetter <daniel.vetter@ffwll.ch>
|
|
This fixes potential crashes when the framebuffer is unset from a
given plane.
v2: s/with/within/ typo in header
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Cc: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
Cc: Marius Vlad <marius.c.vlad@intel.com>
Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>
Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Signed-off-by: Marius Vlad <marius.c.vlad@intel.com>
|
|
v2: Rename CTM_MATRIX property to CTM
v3: Add support for atomic commits
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Matt Roper <matthew.d.roper@intel.com>
Signed-off-by: Matt Roper <matthew.d.roper@intel.com>
|
|
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Matt Roper <matthew.d.roper@intel.com>
Signed-off-by: Matt Roper <matthew.d.roper@intel.com>
|
|
Cc: Marius Vlad <marius.c.vlad@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
|
|
Co-Author : Marius Vlad <marius.c.vlad@intel.com>
Co-Author : Pratik Vishwakarma <pratik.vishwakarma@intel.com>
So far we have had only two commit styles, COMMIT_LEGACY
and COMMIT_UNIVERSAL. This patch adds another commit style
COMMIT_ATOMIC which makes use of drmModeAtomicCommit()
v2: (Marius)
i)Set CRTC_ID to zero while disabling plane
ii)Modified the log message in igt_atomic_prepare_plane_commit
https://patchwork.freedesktop.org/patch/71945/
v3: (Marius)Set FB_ID to zero while disabling plane
https://patchwork.freedesktop.org/patch/72179/
v4: (Maarten) Corrected the typo in commit message
https://patchwork.freedesktop.org/patch/72598/
v5: Added check for DRM_CLIENT_CAP_ATOMIC in igt_display_init
(Marius)
i)Removed unused props from igt_display_init
ii)Removed unused ret. Changed function to void
iii)Declare the variable before checking if we have
DRM_CLIENT_CAP_ATOMIC.
https://patchwork.freedesktop.org/patch/73505/
v6: (Jani) Corrected typo in commit message
v7: Added is_atomic check for DRM_CLIENT_CAP_ATOMIC in
igt_display_init and igt_atomic_commit
v8: (Matthew Auld) Replaced for loops by for_each_connected_output and
for_each_plane_on_pipe
(Lionel) Populate properties only if the value has changed
Remove the resetting of values in disable case
Note : I've used Maarten's diff patch
v9: (Lionel) Added resetting of rotation property
v10: (Marius) Modified the macro declaration to avoid shadow declaration
warning, also removed one unused variable
Signed-off-by: Mayuresh Gharpure <mayuresh.s.gharpure@intel.com>
Signed-off-by: Pratik Vishwakarma <pratik.vishwakarma@intel.com>
Signed-off-by: Mayuresh Gharpure <mayuresh.s.gharpure@intel.com>
Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
|
|
This was originally added to work around a race, but then that's
broken now. And set_vt_mode generally never results in a test binary
crash, so overkill.
I want to get rid of this interface since I spotted some abuse.
Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
|
|
All the tests I wrote always assumed that every connector supported
CRTC 0. This is not the case for BSW and possibly others, so fix the
tests before the CI reports more failures.
Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
|
|
Move it from pm_rpm.c to lib/igt_kms and remove the hardcoded version
from kms_frontbuffer_tracking. I'm also planning to add other callers.
Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
|
|
The debug message in igt_fb_set_size() was copy pasted
from igt_fb_set_position() and not adjusted to say the
right thing. Fix it up.
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
|
|
Fixup some fallout from the connector probing changes so testdisplay -m
will pick up newly hotplugged displays correctly.
Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org.
|
|
igt_kms.c: In function ‘igt_crtc_set_background’:
igt_kms.c:1940:2: warning: format ‘%lu’ expects argument of type ‘long unsigned int’, but argument 5 has type ‘uint64_t’ [-Wformat=]
LOG(display, "%s.%d: crtc_set_background(%lu)\n",
^
intel_firmware_decode.c: In function ‘csr_open’:
intel_firmware_decode.c:169:2: warning: format ‘%zd’ expects argument of type ‘signed size_t’, but argument 3 has type ‘__off_t’ [-Wformat=]
printf("Firmware: %s (%zd bytes)\n", filename, st.st_size);
^
intel_gpu_top.c: In function ‘main’:
intel_gpu_top.c:683:10: warning: format ‘%lu’ expects argument of type ‘long unsigned int’, but argument 3 has type ‘uint64_t’ [-Wformat=]
stats[i] - last_stats[i]);
^
hsw_compute_wrpll.c: In function ‘main’:
hsw_compute_wrpll.c:644:3: warning: format ‘%li’ expects argument of type ‘long int’, but argument 7 has type ‘long long int’ [-Wformat=]
igt_fail_on_f(ref->r2 != r2 || ref->n2 != n2 || ref->p != p,
^
gem_gtt_hog.c: In function ‘__real_main155’:
gem_gtt_hog.c:177:2: warning: format ‘%lu’ expects argument of type ‘long unsigned int’, but argument 4 has type ‘unsigned int’ [-Wformat=]
igt_info("Time to execute %lu children: %7.3fms\n",
^
kms_flip.c: In function ‘run_test_step’:
kms_flip.c:985:3: warning: format ‘%u’ expects argument of type ‘unsigned int’, but argument 10 has type ‘__time_t’ [-Wformat=]
igt_assert_f(end - start > 0.9 * frame_time(o) &&
^
kms_flip.c:985:3: warning: format ‘%u’ expects argument of type ‘unsigned int’, but argument 11 has type ‘__suseconds_t’ [-Wformat=]
kms_frontbuffer_tracking.c: In function ‘setup_sink_crc’:
kms_frontbuffer_tracking.c:1364:3: warning: format ‘%ld’ expects argument of type ‘long int’, but argument 4 has type ‘ssize_t’ [-Wformat=]
igt_info("Unexpected sink CRC error, rc=:%ld errno:%d %s\n",
^
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
|
|
Add a new subtest that makes sure old stale modes get pruned from the
connector's mode list when the EDID changes.
v2: s/drmModeGetConnector/drmModeGetConnectorCurrent/ since
kmstest_force_edid() already takes care of doing the heavier
call for us (Daniel)
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Acked-by: Daniel Vetter <daniel.vetter@ffwll.ch>
|
|
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
|
|
Speeds up testcases except for those where we want to exercise the
probing itself. The only exceptions left where we do a full probe are
- pm_rpm: We use it to make sure the kernel doesn't get things wrong
with power domains, so we really want to exercise the full probe
paths. And there the only place really is the specific validation
done with the data gathered by get_drm_info.
- kmstest_force_ functions: Newer kernels should be better at
re-probing state when the force sysfs fields change, but better safe
than sorry.
v2: I also consolidated the start_n_modes and start_connectors while
at it - move one of the fixup hunks to this patch that accidentally
got misplaced (Thomas).
Cc: Thomas Wood <thomas.wood@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
|
|
The setcrtc ioctl ignores the fb_id when there's no mode specified.
So passing -1 doens't make much sense. When there is a more, -1 means
to preserve the current fb.
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
|
|
Signed-off-by: Thomas Wood <thomas.wood@intel.com>
|
|
Apply the new API to all call sites within the test suite using the following
semantic patch:
// Semantic patch for replacing drm_open_any* with arch-specific drm_open_driver* calls
@@
identifier i =~ "\bdrm_open_any\b";
@@
- i()
+ drm_open_driver(DRIVER_INTEL)
@@
identifier i =~ "\bdrm_open_any_master\b";
@@
- i()
+ drm_open_driver_master(DRIVER_INTEL)
@@
identifier i =~ "\bdrm_open_any_render\b";
@@
- i()
+ drm_open_driver_render(DRIVER_INTEL)
@@
identifier i =~ "\b__drm_open_any\b";
@@
- i()
+ __drm_open_driver(DRIVER_INTEL)
Signed-off-by: Micah Fedke <micah.fedke@collabora.co.uk>
Signed-off-by: Thomas Wood <thomas.wood@intel.com>
|
|
Signed-off-by: Thomas Wood <thomas.wood@intel.com>
|
|
And drop the now unnecessary universal plane definitions. The 2.4.55
version is already quite old, so we should be fine.
Thanks to Thomas Wood for quickly spotting this.
Signed-off-by: Paulo Zanoni <paulo.r.zanoni@>
|
|
Signed-off-by: Thomas Wood <thomas.wood@intel.com>
|