Age | Commit message (Collapse) | Author |
|
[72/1181] Compiling C object tests/kms_cursor_crc.p/kms_cursor_crc.c.o
../tests/kms_cursor_crc.c: In function ‘run_size_tests.constprop’:
../tests/kms_cursor_crc.c:702:50: warning: ‘%d’ directive output may be truncated writing between 1 and 11 bytes into a region of size between 4 and 14 [-Wformat-truncation=]
702 | snprintf(name, sizeof(name), "%dx%d", w, h);
| ^~
../tests/kms_cursor_crc.c:702:46: note: directive argument in the range [-2147483648, 1024]
702 | snprintf(name, sizeof(name), "%dx%d", w, h);
| ^~~~~~~
Signed-off-by: Ashutosh Dixit <ashutosh.dixit@intel.com>
Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
|
|
Sanitize the system state before starting the subtest.
Signed-off-by: Bhanuprakash Modem <bhanuprakash.modem@intel.com>
Reviewed-by: Swati Sharma <swati2.sharma@intel.com>
|
|
Convert the existing subtests to dynamic subtests at pipe level.
V2:
* Fix nested igt_fixture in igt_subtest.
V3:
* Add output name to subtest
Signed-off-by: Bhanuprakash Modem <bhanuprakash.modem@intel.com>
Reviewed-by: Swati Sharma <swati2.sharma@intel.com>
|
|
other tests
Use same test path for alpha and size tests as all other tests. This allow
to remove duplicate code.
Signed-off-by: Juha-Pekka Heikkila <juhapekka.heikkila@gmail.com>
Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
|
|
Draw with alpha information included.
Signed-off-by: Juha-Pekka Heikkila <juhapekka.heikkila@gmail.com>
Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
|
|
This is so it can be taken into use also in alpha tests. While
at it take alpha into account on fb creation by clearing alpha
to zero
Signed-off-by: Juha-Pekka Heikkila <juhapekka.heikkila@gmail.com>
Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
|
|
DRM_FORMAT_MOD_LINEAR is the more sensible name for
DRM_FORMAT_MOD_NONE. Use the better name.
Reviewed-by: Petri Latvala <petri.latvala@intel.com>
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
|
|
Reset display structure settings and commit them in before starting
test in case some earlier test left tail.
Separate hw and sw test runs for optimizing test.
Simple cleanup.
Signed-off-by: Juha-Pekka Heikkila <juhapekka.heikkila@gmail.com>
Acked-by: Petri Latvala <petri.latvala@intel.com>
Reviewed-by: Mika Kahola <mika.kahola@intel.com>
|
|
Use the definition from kernel headers.
Signed-off-by: Lucas De Marchi <lucas.demarchi@intel.com>
Acked-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Reviewed-by: Ashutosh Dixit <ashutosh.dixit@intel.com>
|
|
take out frontbuffer usage from this test as it may fail this test
on frontbuffer related issues instead of cursor issues
v2(vsyrjala): fix cursor size change test to run only one loop
Signed-off-by: Juha-Pekka Heikkila <juhapekka.heikkila@gmail.com>
Reviewed-by: Mika Kahola <mika.kahola@intel.com>
|
|
Avoid creating full screen size fbs in a loop just to throw them
away.
Signed-off-by: Juha-Pekka Heikkila <juhapekka.heikkila@gmail.com>
Reviewed-by: Mika Kahola <mika.kahola@intel.com>
|
|
Run the standard set of tests using the max cursor size
if the other tests didn't already cover it.
v2: Use igt_require_f() to explain why the max-size tests skips (Lyude)
Reviewed-by: Lyude Paul <lyude@redhat.com>
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
|
|
Refactor the common size tests into their own function and
just call it twice.
Reviewed-by: Lyude Paul <lyude@redhat.com>
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
|
|
The test works fine even if the max cursor size is not square.
Reviewed-by: Lyude Paul <lyude@redhat.com>
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
|
|
Since pre-nve4 only has two cursor sizes (32x32 and 64x64), we should at
least test both of them.
Signed-off-by: Lyude Paul <lyude@redhat.com>
Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Cc: Martin Peres <martin.peres@free.fr>
Cc: Ben Skeggs <bskeggs@redhat.com>
Cc: Jeremy Cline <jcline@redhat.com>
|
|
Currently we just assume that every cursor size up to data->cursor_max_w/h will
be supported by the driver, and check for support of nonsquare cursors by
checking if we're running on i915 and if so, which variant of Intel hardware
we're running on. This isn't really ideal as we're about to enable 32x32 cursor
size tests for nouveau, and Intel hardware doesn't support cursor sizes that
small.
So, fix this by removing has_nonsquare_cursors() and replacing it with a more
generic require_cursor_size() function which checks whether or not the driver
we're using supports a given cursor size by attempting a test-only atomic
commit.
v3:
* Also probe for cursor support on systems without atomic support
Signed-off-by: Lyude Paul <lyude@redhat.com>
Cc: Martin Peres <martin.peres@free.fr>
Cc: Ben Skeggs <bskeggs@redhat.com>
Cc: Jeremy Cline <jcline@redhat.com>
Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
|
|
Add igt_wait_for_vblank() once restore image is done and
frontbuffer mark as dirty.
Cc: Juha-Pekka Heikkila <juha-pekka.heikkila@intel.com>
Cc: Kahola, Mika <mika.kahola@intel.com>
Signed-off-by: Mohammed Khajapasha <mohammed.khajapasha@intel.com>
Reviewed-by: Mika Kahola <mika.kahola@intel.com>
|
|
Rendercopy implementation is stripped to use cairo for restoring image.
With cairo, no more crc errors are observed and dead code is removed.
Cc: Heikkila, Juha-pekka <juha-pekka.heikkila@intel.com>
Signed-off-by: Kamati Srinivas <srinivasx.k@intel.com>
Reviewed-by: Juha-Pekka Heikkila <juhapekka.heikkila@gmail.com>
|
|
Pass crtc_offset parameter to read a vblank event for a pipe
to vblank helper functions.
Signed-off-by: Mohammed Khajapasha <mohammed.khajapasha@intel.com>
Reviewed-by: Arkadiusz Hiler <arkadiusz.hiler@intel.com>
|
|
When a subtest fails, it skips the cleanup, and its pipe_crc remains allocated.
As a consequence, the following subtest also fails (timeout) when trying to
create a new one. This patch releases any remaining pipe_crc to enable the
creation of a new one for the next subtest.
Signed-off-by: Melissa Wen <melissa.srw@gmail.com>
Reviewed-by: Arkadiusz Hiler <arkadiusz.hiler@intel.com>
|
|
Add descriptions for some subtests and detail a little more the comments in
test_cursor_alpha.
Signed-off-by: Melissa Wen <melissa.srw@gmail.com>
Signed-off-by: Arkadiusz Hiler <arkadiusz.hiler@intel.com>
Reviewed-by: Arkadiusz Hiler <arkadiusz.hiler@intel.com>
|
|
The function igt_put_cairo_ctx currently requires three parameters, but only
one of them is used in it. This patch removes the useless parameters, making
the code more readable and cohesive. It also applies the change to all
occurrences of the function in the code.
Signed-off-by: Melissa Wen <melissa.srw@gmail.com>
Reviewed-by: Arkadiusz Hiler <arkadiusz.hiler@intel.com>
|
|
UV FBs have two color surfaces so extend the igt_buf struct accordingly
to support blitting such FBs.
The patch is produced with the coccinelle patch below.
No functional changes.
@@
@@
struct igt_buf {
...
- uint32_t stride;
...
- uint32_t size;
+ struct {
+ uint32_t stride;
+ uint32_t size;
+ } surface[2];
...
};
@@
struct igt_buf b;
@@
<...
(
- b.stride
+ b.surface[0].stride
|
- b.size
+ b.surface[0].size
)
...>
@@
struct igt_buf *b;
@@
<...
(
- b->size
+ b->surface[0].size
|
- b->stride
+ b->surface[0].stride
)
...>
@@
identifier I;
expression E1;
expression E2;
@@
(
struct igt_buf I = {
- .size = E1,
- .stride = E2,
+ .surface[0] = {
+ .size = E1,
+ .stride = E2,
+ },
};
|
struct igt_buf I = {
- .size = E1,
+ .surface[0] = {
+ .size = E1,
+ },
};
|
struct igt_buf I = {
- .stride = E1,
+ .surface[0] = {
+ .stride = E1,
+ },
};
)
v2:
- Rebase on latest upstream. (Mika)
Cc: Mika Kahola <mika.kahola@intel.com>
Signed-off-by: Imre Deak <imre.deak@intel.com>
Reviewed-by: Mika Kahola <mika.kahola@intel.com>
|
|
Having crc running continuously cause this test sometime
fill crc buffer, fix this problem as well as do some generic
cleanups.
v2: Take out gem_sync()
v3: Use rendercopy if available, otherwise Cairo surface for restoring
test image
v4: take out useless assert and restructure a bit
Signed-off-by: Juha-Pekka Heikkila <juhapekka.heikkila@gmail.com>
Reviewed-by: Stanislav Lisovskiy <stanislav.lisovskiy@intel.com>
|
|
Removing igt_skip_on_simulation() from all the kms tests
since this feature is not supported anymore.
v2: Rebase
Signed-off-by: Swati Sharma <swati2.sharma@intel.com>
Signed-off-by: Karthik B S <karthik.b.s@intel.com>
Reviewed-by: Martin Peres <martin.peres@linux.intel.com>
|
|
starting pipe crc causes modeset on psr panels which take
lot of time. Fix this by starting crc only in the beginning
and stop at the end of test.
Signed-off-by: Juha-Pekka Heikkila <juhapekka.heikkila@gmail.com>
Reviewed-by: Petri Latvala <petri.latvala@intel.com>
|
|
instead of 0.5 use 1.0 for white color, this is due to bit replication
effect. Also set cairo to use same blending mode as what HW uses.
Signed-off-by: Juha-Pekka Heikkila <juhapekka.heikkila@gmail.com>
Reviewed-by: Mika Kahola <mika.kahola@intel.com>
|
|
Instead of doing direct drm calls, we can use the core to do it for
us. This can be used to increase logging verbosity, but it will also
allow us to test on overlay planes by changing all references from
DRM_PLANE_TYPE_CURSOR to DRM_PLANE_TYPE_OVERLAY.
This fails on gen9-10 because of the alpha rounding error bug, but it
can be useful for testing if the tests themselves are broken.
Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
Reviewed-by: Juha-Pekka Heikkila <juhapekka.heikkila@gmail.com>
|
|
By handling display cleanup in init, we recover better when subtests fail.
With igt_display_reset, a lot of custom cleanup is now gone,
and we don't have to half-heartedly clean up at the end of every subtest.
Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
Reviewed-by: Juha-Pekka Heikkila <juhapekka.heikkila@gmail.com>
|
|
Instead of running tests on all pipes and all outputs,
change the tests to only run once on each pipe, with
igt_get_single_output_for_pipe() to select an output.
This way we'll test all pipes and all outputs at least once,
but not all combinations. This reduces the amount of time
required for each test with dual/triple outputs.
In order to reduce the test time further, only run the
DPMS/suspend tests once for each pipe. They should not
be dependent on cursor size.
Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
Reviewed-by: Juha-Pekka Heikkila <juhapekka.heikkila@gmail.com>
|
|
Use igt_remove_fb(data->drm_fd, &data->fb) to remove locally
created framebuffer at the end of the hardware test loop in
test_cursor_size() function for cursor-size-change subtest in
kms_cursor_crc.
Signed-off-by: Mamta Shukla <mamtashukla555@gmail.com>
Reviewed-by: Harry Wentland <harry.wentland@amd.com>
Reviewed-by: Rodrigo Siqueira <rodrigosiqueiramelo@gmail.com>
|
|
In the kms_cursor_crc, the subtest to check exterme alpha values failed due
to different CRCs observed in hardware and software rendering. This patch fixes
CRC mismatch error in cursor-alpha-opaque and cursor-alpha-transparent subtests
by improving the order in which cursor was rendered in hardware test. Changes
made in test_cursor_alpha() to ensure cursor rendering in hardware test and
acquire CRC value:
- Add drmModeSetCursor() to set cursor image.
- Remove igt_display_commit() to reduce the chance of getting crc values cleared
before it is acquired.
- Add igt_remove_fb() to remove locally created framebuffer after disabling the
cursor plane in HW test
Also, aligned this function with test_cursor_size and after these changes
got passing results for alpha blending support added in VKMS CRC API.
Signed-off-by: Mamta Shukla <mamtashukla555@gmail.com>
Reviewed-by: Harry Wentland <harry.wentland@amd.com>
Reviewed-by: Rodrigo Siqueira <rodrigosiqueiramelo@gmail.com>
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=109350
|
|
Add test to check extreme alpha values i.e. fully opaque and fully transparent
for cursor plane and verify by calculating hardware and software CRC.
Signed-off-by: Mamta Shukla <mamtashukla555@gmail.com>
Reviewed-by: Harry Wentland <harry.wentland@amd.com>
|
|
Simple rule of thumb, if a kms_* test calls igt_display_init() in its
global fixture, skip the entire test if the driver has disabled KMS.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Acked-by: Antonio Argenziano <antonio.argenziano@intel.com>
|
|
So that this test can be run in drivers other than i915.
Remove devid and only check it if the driver is i915.
Signed-off-by: Haneen Mohammed <hamohammed.sa@gmail.com>
Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
|
|
This will allow support for NV12 in the future, where igt_get_cairo_ctx
will return a RGB image to draw with, which will be converted in
igt_put_cairo_ctx so tests don't have to add special support for NV12.
This is the same as cairo_destroy + checking for errors, but not all
tests use this correctly so it's better to have a single handler for it.
Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
|
|
On CHV pipe C when the cursor is visible with a negative X coordinate
a FIFO Underrun will occur. The kernel worked around this by disallowing
cursor updates on pipe C at negative X coordinates when the cursor is
visible.
This was done in the following kernel commit:
commit ef8dd37af85a8f37ca3a29074647511e52c56181
Author: Ville Syrjälä <ville.syrjala@linux.intel.com>
Date: Fri Dec 18 19:24:39 2015 +0200
drm/i915: Workaround CHV pipe C cursor fail
kms_chv_cursor_fail was created to test this issue, but it also happens
in kms_cursor_crc, so workaround it there too.
Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>
Acked-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=97960
|
|
IVB+ have the cursor "FBC" feature, meaning they support a
somewhat limited form of non-square cursors. Let's test that.
Signed-off-by: Ville Syrjälä <ville.syrjala@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>
|
|
Add changes reflecting the new support for dynamic number of planes per pipe.
Signed-off-by: Robert Foss <robert.foss@collabora.com>
Reviewed-by: Mika Kahola <mika.kahola@intel.com>
|
|
Use the proper iterator macros to prevent ever having an invalid config.
Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
|
|
To have a more accurate idea about any suspend/resume issues we can
perform the s/r until various phases in the s/r sequence. This way we
can isolate the given problem as being a device driver, kernel core or
BIOS related issue. Actual subtests using these new s/r phases will be
added as follow-up.
While at it also add the freeze suspend target, it's something we also
would need to test.
Signed-off-by: Imre Deak <imre.deak@intel.com>
|
|
We've had bugs in the past that caused cursor updates to be synced to
vblank, resulting in sluggish cursor movement. Add a test to try to
make sure we don't regress and reintroduce these bugs.
Cc: kalyan.kondapally@intel.com
Signed-off-by: Matt Roper <matthew.d.roper@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>
|
|
Add a header that includes all the headers for the library. This allows
reorganisation of the library without affecting programs using it and
also simplifies the headers that need to be included to use the library.
Signed-off-by: Thomas Wood <thomas.wood@intel.com>
|
|
Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
|
|
There was some confusion about whether we restore cursors correctly
after dpms and suspend/resume. Apparently we still do!
Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
|
|
Because of hash collisions tests should only ever compare crc
checksums for equality. Checking for inequality can result in random
failures.
To ensure this only expose and igt_assert function and use that.
Follow-up patches will rework the code for tests which don't follow
this requirement and try to compare for CRC inequality.
v2: Rebase on top of Matt's kms_plane changes.
Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
|