summaryrefslogtreecommitdiff
path: root/tests
AgeCommit message (Collapse)Author
2019-04-01tests/plane_lowres: Test each plane individuallyJosé Roberto de Souza
ICL has some many planes per pipe that it is causing this test to skip due bandwidth limitation when combined with 4K displays. The objective of this test is test the visibility of the planes when switching between high and low resolution, more information in the patch that added this test 12e34d8c909a ("tests/kms_plane_lowres: Plane visibility after atomic modesets"). So it was setting all the planes the tested pipe in the bottom left of the display using the height of high resolution, checking the visibility and then switching to the low resolution mode and checking again the visibility and now it is expected that all planes would be invisible. So to overcome ICL bandwidth issues, here it is testing each plane individually. Reviewed-by: Mika Kahola <mika.kahola@intel.com> Cc: Maarten Lankhorst <maarten.lankhorst@linux.intel.com> Cc: Mika Kahola <mika.kahola@intel.com> Signed-off-by: José Roberto de Souza <jose.souza@intel.com>
2019-04-01lib: Share the 1024x768 mode among testsJosé Roberto de Souza
Three test were duplicating this 1024x768 mode so lets move it to lib and share it. Reviewed-by: Mika Kahola <mika.kahola@intel.com> Signed-off-by: José Roberto de Souza <jose.souza@intel.com>
2019-04-01tests/kms_plane_lowres: Search for modes of the connector being testedJosé Roberto de Souza
get_lowres_mode() was looking for the desired mode over all connectors what could cause commit to fail due incompatibility. Reviewed-by: Mika Kahola <mika.kahola@intel.com> Cc: Mika Kahola <mika.kahola@intel.com> Signed-off-by: José Roberto de Souza <jose.souza@intel.com>
2019-04-01i915/gem_exec_schedule: Verify that using HW semaphores doesn't blockChris Wilson
We may use HW semaphores to schedule nearly-ready work such that they are already spinning on the GPU waiting for the completion on another engine. However, we don't want for that spinning task to actually block any real work should it be scheduled. v2: No typeof autos v3: Don't cheat, check gen8 as well Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Cc: Tvrtko Ursulin <tvrtko.ursulin@intel.com> Reviewed-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
2019-04-01kms_busy: Use igt_waitchildren_timeout()Chris Wilson
Replace the convoluted raising of SIGALRM from the child with an interruptible sleep in the parent with the equivalent and far more natural igt_waitchildren_timeout(). Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=103182 Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2019-03-30i915_pm_rpm: remove gem-execbuf-stress-extra-wait because same as ↵Caz Yokoyama
gem-execbuf-stress Extra 5sec delay does not add any value more than gem-execbuf-stress. It waits until suspend state after a job is added by gem_execbuf(). There is no need to do more when GPU becomes suspended state. I confirm this by looking at pm_runtime_force_suspend() which exits on suspend state. Signed-off-by: Caz Yokoyama <caz.yokoyama@intel.com> Cc: Chris Wilson <chris@chris-wilson.co.uk> Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2019-03-30i915_pm_rpm: gem-execbuf-stress subtest fasterCaz Yokoyama
By clean up idle work, gem-execbuf-stress subtest runs 1.2 sec. I divide "i915_pm_rpm: remove gem-execbuf-stress-extra-wait because same as gem-execbuf-stress" into 2 patches. This is one of them. Cc: Chris Wilson <chris@chris-wilson.co.uk> Signed-off-by: Caz Yokoyama <caz.yokoyama@intel.com> Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2019-03-29Revert "lib/igt_device: Move intel_get_pci_device under igt_device"Ville Syrjälä
One significant usecase for intel_reg/etc. is to be able to examine the hardware state *before* loading the driver. If the tool forces the driver to load we've totally lost that capability. This reverts commit 8ae86621d6fff60b6e20c6b0f9b336785c935b0f. Cc: Michał Winiarski <michal.winiarski@intel.com> Cc: Chris Wilson <chris@chris-wilson.co.uk> Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com> Acked-by: Jani Nikula <jani.nikula@intel.com> Acked-by: Michał Winiarski <michal.winiarski@intel.com>
2019-03-29tests/kms_rmfb: Ignore plane configuration errorsVille Syrjälä
We may not be able to turn on all the planes (eg. due to memory bandwidth limitations). Let's accept that fact and simply turn on as many planes as we can. Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch> Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
2019-03-29tests/kms_plane: Test all modifiers as wellVille Syrjälä
Instead of just testing each pixel format let's test every format+modifier combo. Obviously testing with solid filled fbs isn't the most effective way to detect tiling problems, but we can't really do much more if we want to keep comparing YUV vs. RGB results (unless we start to render the RGB content in a way that matches the YUV subsampling behaviour of the hardware). Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch> Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
2019-03-29tests/kms_plane: Eliminate modeset between every planeVille Syrjälä
Move the pipe/primary plane stuff outside the plane loop so that we can avoid all that overhead (including a modeset) when switching from one plane to another. Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch> Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
2019-03-29tests/kms_plane: Reduce the plane size 64x64Ville Syrjälä
Reduce the plane size further to speed up the test. 64x64 is the universal i915 minimum cursor size so we'll use that. And since we chose wisely we'll make cursors use the reduced size as well. Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch> Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
2019-03-29tests/kms_plane: Remove the upscaling requirementVille Syrjälä
No point in requiring upscaling when trying to use a small fb to test pixel formats. Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch> Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
2019-03-28tests/kms_lease: Check crtc used in atomic ioctlDaniel Vetter
We not only need to check that userspace is allowed to use the objects it's changing, but also the objects it's using as property values. The only ones relevant for leases are the CRTC_ID properties on connectors and planes. Current kernels fail this. Cc: Keith Packard <keithp@keithp.com> Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com> Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
2019-03-28tests/kms_lease: Handle new errno from idr/xa double insertDaniel Vetter
The conversion from idr to xarray will change the errno for already inserted object ids from ENOSPC to EBUSY. Allow both. Cc: Matthew Wilcox <willy@infradead.org> Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com> Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
2019-03-28tests/kms_lease: Adjust to kernel errno changesDaniel Vetter
I dropped a superfluous check for negative object id (the kernel did a cast to s32, despite that object ids are always unsigned). Which changes the errno from EINVAL to ENOENT. Allow both. Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2019-03-28tests/kms_lease: test implicit cursor plane usageDaniel Vetter
Figured I'll only test the SetCursor interface since in the kernel it's all the same anyway, it's just libdrm that splits it up. Current kernels fail this. Cc: Keith Packard <keithp@keithp.com> Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com> Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
2019-03-28tests/kms_lease: test implicit primary plane usage in setcrtc ioctlDaniel Vetter
Again we need to make sure that a lease can't use planes it's not allowed to through legacy ioctls. SetCrtc is a bit more tricky, since we should still allow to shut down a CRTC, e.g. when we're allowed to use other planes on that CRTC. Current kernels fail this. Cc: Keith Packard <keithp@keithp.com> Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com> Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
2019-03-28tests/kms_lease: test implicit primary plane usage in page_flip ioctlDaniel Vetter
We need to make sure that legacy ioctls don't operate on a lease if the lesse doesn't have access to the implicitly used primary plane. Current kernels fail this. Cc: Keith Packard <keithp@keithp.com> Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com> Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
2019-03-28gem_exec_latency: Initialize variance to zeroPetri Latvala
It's just added to in a loop later without any initialization or direct assignment. Signed-off-by: Petri Latvala <petri.latvala@intel.com> Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
2019-03-27i915/gem_exec_big: 128MiB not enough slack? Let out the rope!Chris Wilson
Even with 128MiB reserved for other use, a single pass of gem_exec_big runs out of memory. Give in and halve our batch size, that has to be enough slack! As to why it keeps on failing, is left as an exercise to the reader -- we have to solve the mm/ mystery one day, as eventually it will be our only remaining source of bugs! Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Cc: Tvrtko Ursulin <tvrtko.ursulin@linux.intel.com> Reviewed-by: Tvrtko Ursulin <tvrtko.ursulin@linux.intel.com>
2019-03-26tests/kms_chamelium: fix typo in check_analog_bridgeSimon Ser
This function checks whether a port is an analog bridge. Analog bridges provide their own EDID thus the vendor should be different from "IGT". There was a typo that made the function always return true for VGA ports. The condition was essentially: thing != 'I' || thing != 'T' which is always true. Apparently this didn't cause any harm, but it's probably better to fix it anyway in case some tests were skipped and shouldn't. Signed-off-by: Simon Ser <simon.ser@intel.com> Acked-by: Antonio Argenziano <antonio.argenziano@intel.com>
2019-03-26i915/gem_sync: Make switch-default asymmetricChris Wilson
To make the demonstration of the cheeky preemption more impactful, make the second context a nop to contrast the first being 1024 MI_STORE_DWORD_IMM. Then if we execute and wait on the second context before executing the first, the client latency is even more drastically reduced. To more clearly show any effect on wait reordering, measure the alternative path and present both. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Reviewed-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
2019-03-26i915/gem_ctx_param: Remove kneecappingChris Wilson
The invalid set/get tests do not serve the purpose of detecting whether or not invalid parameters are indeed detected correctly -- simply because the kernel is the arbiter of what is invalid and this test second guesses that and is wrong. The intent of this test was to ensure that we didn't include any holes in the parameter space that may have been used for nefarious undisclosed purposes, i.e. the maintainer's job backed up by reviewers. As proving no holes is impossible without fuzzing/exhaustive search and a whitelist, accept defeat and just check whether the very last parameter (which should be unused for a long, long time) is invalid. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Cc: Joonas Lahtinen <joonas.lahtinen@linux.intel.com> Reviewed-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
2019-03-26i915/gem_exec_big: Add a single shot testChris Wilson
CI complains that the exhaustive test of trying every size up to the limit is too slow, so add a simple test that tries to submit one extreme batch buffer and check all the relocations land. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=105555 Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Reviewed-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
2019-03-26kms_fence_pin_leak: Ask for the GPU before useChris Wilson
Check that the GPU even exists before submitting a batch. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=109589 Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Reviewed-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
2019-03-26i915/gem_exec_nop: poll-sequential requires ordering between ringsChris Wilson
In order to correctly serialise the order of execution between rings, we need to flag the scratch address as being written. Make it so. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Reviewed-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
2019-03-26i915/gem_exec_whisper: Measure total power consumedChris Wilson
Show the total power consumed across all the whispers. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Reviewed-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
2019-03-26i915/gem_exec_schedule: Measure semaphore power consumptionChris Wilson
How much energy does spinning on a semaphore consume relative to plain old spinning? Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Reviewed-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
2019-03-25tests/kms_dp_dsc: Disable DSC even if enabling failedDhinakaran Pandiyan
The test leaves the debugfs flag enabled if the driver failed to enable DSC. And as it turns out, the feature gets enabled only after the test completes and consequently affects PSR2 tests that follow. Let's make sure the test cleans up correctly, even though the DSC test itself needs to be fixed. Also included some formatting fixes within the function. Cc: José Roberto de Souza <jose.souza@intel.com> Signed-off-by: Dhinakaran Pandiyan <dhinakaran.pandiyan@intel.com> Reviewed-by: José Roberto de Souza <jose.souza@intel.com>
2019-03-25i915: Mark up some forgotten set-domainChris Wilson
It is the user's responsibility to manage their domains. In libdrm, when you mmap a pointer, it calls set-domain automatically, but igt requires the caller to manage it explicitly, so do so. The vast majority already do correct manage the domain as they use the pointer into the mmap, just a few have been missed over the years. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
2019-03-25tests/kms_ccs: Use igt_plane_has_format_mod()Ville Syrjälä
Replace the open coded IN_FORMATS parsing with igt_plane_has_format_mod() now that we have such a thing. v2: Remove all the extra cruft too Deal with data->ccs_modifier Cc: Dhinakaran Pandiyan <dhinakaran.pandiyan@intel.com> Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com> Reviewed-by: Dhinakaran Pandiyan <dhinakaran.pandiyan@intel.com>
2019-03-25tests/testdisplay: fix heap overflowSimon Ser
v2: also simplify the code by using dirname(3). v3: dirname may modify in-place its argument, duplicate the string Signed-off-by: Simon Ser <simon.ser@intel.com> Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
2019-03-22tests/kms_cursor_legacy: Fix assertion failure due to vblank mismatchNischala Yelchuri
For the !modeset case, after a pageflip is performed on both crtc's, vblank counter is advanced by 1 when compared to its original value. For the modeset case, when pageflips and modesets are interleaved, vblank counter does not always advance by 1 as nonblocking modeset could fail, in which case we do not need vblank_matches. v2: Remove the assert statement instead of changing the condition Cc: Maarten Lankhorst <maarten.lankhorst@intel.com> Signed-off-by: Nischala Yelchuri <nischala.yelchuri@intel.com> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=105454 Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
2019-03-22tests/kms_available_modes_crc limit tested fb formatsJuha-Pekka Heikkila
This test is causing too much useless noise. Limit tested fb formats to DRM_FORMAT_C8 and DRM_FORMAT_XBGR2101010 for now. These two formats are currently not tested otherwise thus they're left here for now. DRM_FORMAT_XBGR2101010 need to be included into IGT supported formats and DRM_FORMAT_C8 test need to be moved elsewhere, maybe into kms_plane. Signed-off-by: Juha-Pekka Heikkila <juhapekka.heikkila@gmail.com> Reviewed-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
2019-03-22tests/kms_plane_scaling: Minimum width and height for planar YUV formats on ↵Mika Kahola
i915 devices Use minimum of 16x16 size for i915 devices only as other HW's may have different limitations. The default is 8x8. Suggested-by: Ville Syrjala <ville.syrjala@linux.intel.com> Signed-off-by: Mika Kahola <mika.kahola@intel.com> Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
2019-03-21i915/gem_mmap_gtt: Check that the initial pagefault is non-blockingChris Wilson
Historically, the GTT pagefault invoked set-domain(GTT) to transparently handle swapin. However, this implied that the GTT faults were synchronous with GPU rendering, which was not the desired ABI, as synchronisation is explicit via calls to GEM_WAIT or GEM_SET_DOMAIN. In MMAP_GTT_VERSION, this accidental ABI is removed and so we test it is gone and does not come back. For completeness, we verify that the other mmap paths didn't block on initial pagefaulting. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Reviewed-by: Matthew Auld <matthew.auld@intel.com>
2019-03-21tests/kms_plane_scaling: Ensure minimum height and width for planar uyv formatsMika Kahola
Let's ensure that we test with minimum width and height of 16 for all planar uyv formats. References: https://bugs.freedesktop.org/show_bug.cgi?id=110098 Signed-off-by: Mika Kahola <mika.kahola@intel.com> Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
2019-03-20tests/kms_ccs: Test Yf CCS modifier too.Dhinakaran Pandiyan
Extend the test to Yf tiled CCS, no reason not to. v2: Add a comma after the last modifier (Ville) Signed-off-by: Dhinakaran Pandiyan <dhinakaran.pandiyan@intel.com> Cc: Ville Syrjälä <ville.syrjala@linux.intel.com> Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
2019-03-20tests/kms_ccs: Refactor code to add CCS modifiers.Dhinakaran Pandiyan
Currently only Y tiled CCS modifier is tested, rewrite the functions so that we can add support for other CCS modifiers. Cc: Ville Syrjälä <ville.syrjala@linux.intel.com> Signed-off-by: Dhinakaran Pandiyan <dhinakaran.pandiyan@intel.com> Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
2019-03-20i915/gem_shrink: Open the device before using it!Chris Wilson
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=110212 Fixes: 8ae86621d6ff ("lib/igt_device: Move intel_get_pci_device under igt_device") Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Cc: Michał Winiarski <michal.winiarski@intel.com> Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
2019-03-20i915/gem_mocs_settings/mocs-isolation: Filter out missing ringsChris Wilson
Don't try to evaluate whether reads executed on an absent ring do anything. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Reviewed-by: Mika Kuoppala <mika.kuoppala@linux.intel.com>
2019-03-20lib/igt_device: Move intel_get_pci_device under igt_deviceMichał Winiarski
It allows us to make things a little bit more generic. Also, we now require fd rather than doing guesswork when it comes to pci address. v2: Use readlinkat rather than string concat, move stuff around, provide a version that does not assert. (Chris) v3: Print addr on failure, avoid assignment in conditionals. (Chris) Signed-off-by: Michał Winiarski <michal.winiarski@intel.com> Cc: Chris Wilson <chris@chris-wilson.co.uk> Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
2019-03-20lib/igt_sysfs: Remove idx from sysfs_openMichał Winiarski
Similar to sysfs_path - more explicit more better. Signed-off-by: Michał Winiarski <michal.winiarski@intel.com> Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
2019-03-20lib: Kill drm_get_card()Michał Winiarski
It's not operating on FD, and we've provided a nice reimplementation that does. Let's use it instead. Signed-off-by: Michał Winiarski <michal.winiarski@intel.com> Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
2019-03-20lib/igt_device: Introduce igt_device_get_card_indexMichał Winiarski
And use it! But let's start small. Rather than going with "and by the way, here's the card index" from igt_sysfs_path, we're making things more explicit. v2: Drop idx comment. (Chris) Signed-off-by: Michał Winiarski <michal.winiarski@intel.com> Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
2019-03-20tests/i915_pm_rps: Use sysfs helpersMichał Winiarski
Doing this lets us avoid drm_get_card, which we plan to remove eventually. v2: We were extermally unlikely to find rps knobs in current dir. Signed-off-by: Michał Winiarski <michal.winiarski@intel.com> Cc: Chris Wilson <chris@chris-wilson.co.uk> Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
2019-03-20tests/perf: Simplify generic read/write, use sysfs helpersMichał Winiarski
Doing this lets us avoid drm_get_card, which we plan to remove eventually. v2: Don't break the test Signed-off-by: Michał Winiarski <michal.winiarski@intel.com> Cc: Chris Wilson <chris@chris-wilson.co.uk> Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
2019-03-20tests/gem_exec_blt: Drop benchmark mode, use igt_sysfsMichał Winiarski
The "benchmark" mode is no longer used. While I'm here, let's also move things around and start to use igt_sysfs, rather implementing own set of helpers. Signed-off-by: Michał Winiarski <michal.winiarski@intel.com> Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
2019-03-19tests/i915/gem_mmap_wc: Add invalid params testsAntonio Argenziano
Add some invalid parameters tests for the MMAP IOCTL when the MMAP_WC flag is supplied. v2: - Expand test space. (Chris) Signed-off-by: Antonio Argenziano <antonio.argenziano@intel.com> Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>