Age | Commit message (Collapse) | Author |
|
Make certain viewports are divisible by four due to intel
hw workarounds for NV12.
Signed-off-by: Juha-Pekka Heikkila <juhapekka.heikkila@gmail.com>
Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
|
|
Add NV12 support for testing where available.
Signed-off-by: Juha-Pekka Heikkila <juhapekka.heikkila@gmail.com>
Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
|
|
rendered test image had off-by-one error in size calculation
which was failing some tests on certain resolutions and plane
sizes.
Signed-off-by: Juha-Pekka Heikkila <juhapekka.heikkila@gmail.com>
Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
|
|
My gcc is unhappy otherwise:
[191/829] Compiling C object 'tests/te...otation_crc@exe/kms_rotation_crc.c.o'.
../tests/kms_rotation_crc.c: In function ‘test_multi_plane_rotation’:
../tests/kms_rotation_crc.c:497:2: warning: ‘static’ is not at beginning of declaration [-Wold-style-declaration]
const static struct {
^~~~~
../tests/kms_rotation_crc.c:524:2: warning: ‘static’ is not at beginning of declaration [-Wold-style-declaration]
const static uint32_t formatlist[] = {DRM_FORMAT_RGB565,
^~~~~
Fixes
commit 14c1b132c8f829637c55fb071a9a2e5ce00e7ed8
Author: Juha-Pekka Heikkila <juhapekka.heikkila@gmail.com>
Date: Fri Nov 30 15:34:36 2018 +0200
tests/kms_rotation_crc: Add multi plane tests
v2: Trim extra space while at it (Petri).
Cc: Juha-Pekka Heikkila <juhapekka.heikkila@gmail.com
Cc: Ankit Nautiyal <ankit.k.nautiyal@intel.com>
Reviewed-by: Petri Latvala <petri.latvala@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
|
|
Add three new tests which try primary and sprite planes
next to each other with different plane formats, rotations
and tiling modes.
multiplane-rotation subtest run test through with both planes
fully visible.
multiplane-rotation-cropping-top will crop primary plane to
left/top corner and sprite plane to right/top corner while running
rotation tests.
multiplane-rotation-cropping-bottom will crop primary plane to
left/bottom corner and sprite plane to right/bottom corner while
running rotation tests.
v2 (Nautiyal, Ankit K): Use rectangular figures instead of
square figures and fix associated code to perform correctly.
Adjust plane positions according to screen size to avoid
putting planes outside screen.
v3 (Nautiyal, Ankit K): Minor detail fix.
Signed-off-by: Juha-Pekka Heikkila <juhapekka.heikkila@gmail.com>
Reviewed-by: Ankit Nautiyal <ankit.k.nautiyal@intel.com>
|
|
Leaving crc running nobody reading it may fail tests randomly
with dmesg comment "*ERROR* Overflow of CRC buffer, userspace
reads too slow."
v2 (Maarten Lankhorst): Don't change clean up code but just add
flag for starting crc and stop it at end of test.
bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=105748
Signed-off-by: Juha-Pekka Heikkila <juhapekka.heikkila@gmail.com>
Reviewed-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.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>
|
|
Switch all fb size handling to 64bits to accomodate >4GiB
framebuffers.
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
|
|
gen11 enables 90/270 rotation for RGB565 mode. IGT would need support for
C8 mode to enable running this subtest on gen11 and later.
v2 (Mika Kahola): Combine gen checks into one comparison. Update
comment on why bad-pixel-format is disabled beyond gen11.
Signed-off-by: Juha-Pekka Heikkila <juhapekka.heikkila@gmail.com>
Reviewed-by: Mika Kahola <mika.kahola@intel.com>
|
|
igt_pipe_crc_get_current()
This is a more race free of accomplishing the same.
Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>
|
|
Two tests uses the very same wait_for_pageflip() routine. These tests are
'kms_rotation_crc' and 'kms_flip_tiling'. In order to decrease code
repetition, let's move this function as part of kms function collection
in igt_kms.
No functional changes.
Signed-off-by: Mika Kahola <mika.kahola@intel.com>
Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
|
|
The test is modified to test all pixel formats on a plane, unless
the pixel format is overridden by the subtest.
Attempting to test all pixel formats requires even more runtime and
the overhead of toggling crc collection to capture a single CRC
becomes significant, so keep the crc collection enabled during the entire test.
This reduces the runtime from ~24s to ~16s per subtest on SKL.
Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
Reviewed-by: Mika Kahola <mika.kahola@intel.com>
Tested-by: Vidya Srinivas <vidya.srinivas@intel.com>
|
|
This seems to open code igt_calc_fb_size and igt_create_fb, just use both.
Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
Reviewed-by: Mika Kahola <mika.kahola@intel.com>
Tested-by: Vidya Srinivas <vidya.srinivas@intel.com>
|
|
This won't clean up resources between subtests, so if subtests fail
the next subtest will clean up everything. This allows all subtests
even if one fails.
Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
Reviewed-by: Mika Kahola <mika.kahola@intel.com>
Tested-by: Vidya Srinivas <vidya.srinivas@intel.com>
|
|
This is already tested by the rotation tests, which require Y-tiled
for 90° and 270° rotations.
Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
Reviewed-by: Mika Kahola <mika.kahola@intel.com>
Tested-by: Vidya Srinivas <vidya.srinivas@intel.com>
|
|
The -flip tests are the same, but with a pageflip at the end,
since the test is otherwise the same, run the test once with flips
always enabled when possible.
Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
Reviewed-by: Mika Kahola <mika.kahola@intel.com>
Tested-by: Vidya Srinivas <vidya.srinivas@intel.com>
|
|
Instead of 2 functions doing the same thing, consolidate to a single function.
Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
Reviewed-by: Mika Kahola <mika.kahola@intel.com>
Tested-by: Vidya Srinivas <vidya.srinivas@intel.com>
|
|
bad-tiling test didn't work, LOCAL_DRM_FORMAT_MODE_NONE == 0, so
the fb was created with tiling = Y, but because test_bad_format
was set but override_tiling wasn't, we fell through to the success
case. Always assume failure if test_bad_format is set, and pass X
tiled for fb, so the format override works.
Also clear variables after subtests in main, so if the next subtest
doesn't run we still clear the variables.
Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
Reviewed-by: Mika Kahola <mika.kahola@intel.com>
Tested-by: Vidya Srinivas <vidya.srinivas@intel.com>
|
|
This cleans up the tests slightly.
Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
Reviewed-by: Mika Kahola <mika.kahola@intel.com>
Tested-by: Vidya Srinivas <vidya.srinivas@intel.com>
|
|
Add support to create planar framebuffers, but don't add formats
that support them yet. This first requires conversion to the RGB24 format.
Changes since v1:
- Don't crash in igt_create_bo_with_dimensions().
Changes since v2:
- Zero offsets for dumb fb too.
Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
Reviewed-by: Mika Kahola <mika.kahola@intel.com>
[mlankhorst: Change memset(4 * ..) to memset(ARRAY_SIZE(format->plane_bpp) * ..)]
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
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 test was flipping the primary plane instead of the sprite plane.
Flip the correct plane to make the test pass properly.
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=102691
Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
Reviewed-by: Mika Kahola <mika.kahola@intel.com>
Tested-by: Marta Lofstedt <marta.lofstedt@intel.com>
Acked-by: Marta Lofstedt <marta.lofstedt@intel.com>
|
|
To the best of my recollection the page flipping test was added
simply to start exercising page flips with 90/270 rotation.
There is no need to do 60 flips which can take quite some time,
because we do 60 flips against each pipe and each fb geometry.
Also, calling this a stress test is also not matching the
original idea of the test.
v2:
Several changes:
1. Remove the stress from the name and reduce the number of
flips to one only.
2. Move the page flip before CRC collection for a more useful
test.
3. Add more flipping tests, for different rotation and sprite
planes.
4. Convert to table driven subtest generation.
v3: Remove extended.testlist from the patch.
v4:
Collect a flip fb crc and check it after flip. This way we test
not only the flip succeeded but the right image is displayed.
Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
Cc: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Katarzyna Dec <katarzyna.dec@intel.com>
Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk> (v3)
Reviewed-by: Katarzyna Dec <katarzyna.dec@intel.com>
|
|
I've erroneously assumed the rotation tests only work on gen9+,
and didn't test what would happen on older platforms.
Add an extra testcase that tries to fill the whole screen, and only
run that test on gen8 and lower for the primary plane.
This fixes the testcases failing since the following commit:
commit a7fe05b0a784a7a7c58d36842426579a6e00f5a0
Author: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
Date: Tue Jun 6 16:41:12 2017 +0200
tests/kms_rotation_crc: Implement stricter rotation tests
Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
|
|
This will force less watermarks to be allcoated to the sprite plane,
making it easy to hit a underrun!
Unfortunately the FIFO underrun wasprevented by skl_plane_downscale_amount,
but fixed with Ville's patch series.
Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
|
|
This makes kms_rotation_crc also test a case where a small strip is
tested on the top or left side of the screen. It allows us to ensure
more accurately that the rotation is shown correctly on the screen.
Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
|
|
No functional changes yet, just making sure that it works
as expected.
Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
|
|
DRM_EVENT_CONTEXT_VERSION is the latest context version supported by
whatever version of libdrm is present. igt was blindly asserting it
supported whatever version that may be, even if it actually didn't.
With libdrm 2.4.78, setting a higher context version than 2 will attempt
to call the page_flip_handler2 vfunc if it was non-NULL, which being a
random chunk of stack memory, it might well have been.
Set the version as 2, which should be bumped only with the appropriate
version checks.
Signed-off-by: Daniel Stone <daniels@collabora.com>
Reviewed-by: Petri Latvala <petri.latvala@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>
|
|
Some tests were failing to set size after rotation, which resulted in
some tests failing.
Another reason was that the test assumed that vdisplay < hdisplay, this
is not the case for a 4k DP-MST display, which runs in 1920x2160 mode.
The vtcon switching test was also bogus and caused failures. It's not
always true and even on a system with fbcon I was seeing a test failure
because the vt never switched.
Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
|
|
Use the proper iterator macros to prevent ever having an invalid config.
For the record, this test seemed to have bitrotten and doesn't currently
pass. This might have happened when fixing atomic commit support,
but it definitely needs some love.
Signed-off-by: Maarten Lankhorst <maarten.lankhorst@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>
|
|
Modified kms_rotation_crc to follow COMMIT_ATOMIC path if ATOMIC support is
available from driver. If ATOMIC support is not present, tests
will follow COMMIT_UNIVERSAL path.
v2: (Marius)
Updated commit message
https://patchwork.freedesktop.org/patch/76040/
v3: (Marius)
Added description in commit message
https://patchwork.freedesktop.org/patch/79492/
Signed-off-by: Pratik Vishwakarma <pratik.vishwakarma@intel.com>
[mcvlad: Re-worked a little comment description]
Signed-off-by: Marius Vlad <marius.c.vlad@intel.com>
|
|
Missed an error whilst rebasing and trying to modify the previous patch
to keep this function intact... Instead, I now have to add this patch to
restore gem_available_aperture_size() and its one usage.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
|
|
For many tests, the relevant aperture is not the ppGTT but the internal
global GTT managed by the kernel. Use this limit appropriately.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
|
|
The default is too low for panels that are 30 fps or lower.
Bump the timeout to 50 ms to prevent spurious errors on those
displays.
Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
|
|
(v3)
In this subtest, as a first step, MAX_FENCES+1 number of framebuffers are
created backed up by objects that have multiple GGTT views (normal and
rotated). Next, we have the i915 driver instantiate a normal view followed
by a rotated view. We continue doing the above MAX_FENCES + 1 times.
v2:
- Add a igt_require() to check if there is enough GTT space left for
MAX_FENCES+1 framebuffers. (Tvrtko)
- Make data2 local to test_plane_rotation_exhaust_fences(). (Tvrtko)
- If there is a failure, deallocate all the previously allocated
framebuffers before asserting.
v3: Close the gem handle if set_tiling or addfb fails. (Tvrtko)
Cc: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
Signed-off-by: Vivek Kasireddy <vivek.kasireddy@intel.com>
Reviewed-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
|
|
Signed-off-by: Daniel Stone <daniels@collabora.com>
|
|
The main goal of this subtest is to trigger the following warning in
the function i915_gem_object_get_fence():
if (WARN_ON(!obj->map_and_fenceable))
To trigger this warning, the subtest first creates a Y-tiled object and
an associated framebuffer with the Y-fb modifier. Furthermore, to
prevent the map_and_fenceable from being set, we make sure that
the object does not have a normal VMA by refraining from rendering to the
object and by setting the rotation property upfront before calling commit.
v2: Do not call paint_squares and just use one output.
v3: Convert an if condition to igt_require and move the plane rotation
requirement further up before the fb allocation.
Cc: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
Signed-off-by: Vivek Kasireddy <vivek.kasireddy@intel.com>
Reviewed-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
|
|
Do some page flipping on the rotated plane just to exercise
that code path.
v2: Actually render to flip fb and fixed flip counter.
Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
Cc: Sonika Jindal <sonika.jindal@intel.com>
Cc: Arun R Murthy <arun.r.murthy@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>
|
|
commit 1e8df16778b0d8fd8102b3ee799b028f8f961089
Author: Sonika Jindal <sonika.jindal@intel.com>
Date: Wed May 20 13:40:48 2015 +0530
drm/i915/skl: Swapping 90 and 270 to be compliant with Xrand
Changed the rotation direction so IGT needs to be told.
Reviewed-by: Sonika Jindal <sonika.jindal@intel.com>
Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>
Cc: Sonika Jindal <sonika.jindal@intel.com>
Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
|