summaryrefslogtreecommitdiff
path: root/tests
AgeCommit message (Collapse)Author
2017-11-06tests/perf: Fix a bunch of warnings on 32-bit systemsThierry Reding
Data types are defined differently on 32-bit systems, causing gcc to complain about printf format specifiers not matching the size of the variables passed in. Use PRIu64 and %zu where appropriate. Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com> Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com> Signed-off-by: Thierry Reding <treding@nvidia.com>
2017-11-06igt/gem_exec_fence: Add subtest for invalid flagsTvrtko Ursulin
We need to check that the kernel rejects attempts to pass in unknown flags. Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com> Cc: Chris Wilson <chris@chris-wilson.co.uk> Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
2017-11-03tests/debugfs_test: Pretty print subdirectoriesMaarten Lankhorst
Instead of: (debugfs_test:1499) DEBUG: Reading file "data" (debugfs_test:1499) DEBUG: Could not open file "data" with error: Input/output error Print: (debugfs_test:1360) DEBUG: Entering subdir crtc-2 (debugfs_test:1360) DEBUG: Entering subdir crc (debugfs_test:1360) DEBUG: Reading file "data" (debugfs_test:1360) DEBUG: Could not open file "data" with error: Input/output error (debugfs_test:1360) DEBUG: Reading file "control" Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com> Reviewed-by: Arkadiusz Hiler <arkadiusz.hiler@intel.com>
2017-10-26igt/gem_exec_latency: Wire up an interloper for preemptionChris Wilson
For measuring the cost of preemption, inject a low priority spinner between the two measurements; the difference between the preemption and the normal dispatch includes both the cost of the spinner dispatch and of preempting it. Close enough for us to estimate the cost of preemption, though we don't measure the cost of preemption on the local ring! Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> CC: Michał Winiarski <michal.winiarski@intel.com>
2017-10-25igt/drv_hangman: Skip aliased I915_EXEC_BSDChris Wilson
If the system has bsd2, we do not know which ring the kernel will alias I915_EXEC_BSD onto and so we do not what the matching string should be. Skip the unknown. v2: Deny the aliased I915_EXEC_BSD exists at all; be specific! Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=103324 Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> CC: Michał Winiarski <michal.winiarski@intel.com>
2017-10-25igt/gem_exec_nop: Headless requires DRM_MASTER for modesettingChris Wilson
Since the headless subtest wants to compare execution latency of a headless mode vs a single head, it needs to be able to do a modeset and ergo it requires DRM_MASTER. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Reviewed-by: Michał Winiarski <michal.winiarski@intel.com>
2017-10-25igt/gem_fd_exhaustion: Remove stale assertChris Wilson
__gem_create() doesn't touch the outparam *handle on failure, so we can no longer assert that it zero. This is reasonable to remove as it is just testing the library itself and not the kernel, so no loss in coverage. We already had to remove the false assertion that gem_create() must fail following fd exhaustion (as we can not prevent the kernel from freeing VFS fdspace in between calls). The last remaining change is that we do no need to rely on an external path for open() as dup() will do the job of exhausting the fdtable. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=103365 Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Reviewed-by: Michał Winiarski <michal.winiarski@intel.com>
2017-10-24igt/prime_mmap_coherency: Remove manual gem_sync() callsChris Wilson
Emphasize that we want to test synchronisation using the dmabuf API (prime_sync_start, prime_sync_end) and so drop the manual synchronisation using the GEM API (gem_sync). Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2017-10-24igt/drv_misssed_irq: Skip on gucChris Wilson
Since the driver's guc submission method requires the breadcrumbs irq for feeding requests to the guc, we cannot simply simulate a missing irq by disabling the interrupts. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Cc: Michał Winiarski <michal.winiarski@intel.com> Reviewed-by: Michał Winiarski <michal.winiarski@intel.com>
2017-10-24tests/kms_atomic_transition: Do not update unbound planes.Maarten Lankhorst
kms_atomic_transition was updating already disabled planes and committing them nonblockingly. This results in sporadic -EBUSY failures because planes that are unbound have their own timeline. The solution is not unbinding already unbound planes, making the test pass. There was also a related kernel bug causing failures in the same way, but that is now fixed. While at it, only check for fd completion in the nonblocking case, in the blocking case it's theoretically possible the commit completes before we check the that the commit didn't complete, most probably when the test is run in a debugger. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=102671 Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com> Reviewed-by: Petri Latvala <petri.latvala@intel.com>
2017-10-23tests/kms_plane_lowres: Rework tests to work without fbcon, v3.Maarten Lankhorst
kmstest_get_crtc was skipping because at that point the crtc was not active yet, instead we should only use igt_assert_plane_visible directly. Unexport kmstest_get_crtc, since nothing here should need it. While at it fix a small leak in igt_assert_plane_visible, the only remaining user. Additionally, it' s not allowed to obtain crc on a disabled pipe, so wait until the pipe is enabled before allocating the crc. Changes since v1: - Move igt_pipe_crc_new until after pipe is enabled. - Move test_init() into test_setup(), it's redundant.. - Remove pipe_crc from data, no need to have it there. Changes since v2: - Increment fb pointer for igt_plane_set_fb, in order to set a different fb on each plane correctly. Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com> Reviewed-by: Mika Kahola <mika.kahola@intel.com>
2017-10-20tests/kms_concurrent: Fix testcase fails.Maarten Lankhorst
igt_pipe_refresh was added for the forked helper, we could just call it from the fork to prevent races against MODE_ID. The static 1024x768 mode is allocated on the stack and returned, which will result in a garbage mode. Make the fallback mode global to prevent this. igt_output_set_pipe is unneeded, override_mode is enough to force the right mode. Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=103342 Reviewed-by: Mika Kahola <mika.kahola@intel.com>
2017-10-20tests/kms_atomic: Convert/rewrite tests to use igt_kms framework, v2.Maarten Lankhorst
Now that we can set individual properties through the igt_kms api, we no longer need to duplicate functionality from igt_kms. Set invalid properties directly, and rewrite kms_atomic.c to use igt_display. This will allow us to remove a lot of code in kms_atomic.c, and benefit from how igt_kms can set up a valid configuration, instead of having to inherit it from fbcon. Changes since v1: - Fix test failure when atomic_invalid_params is run standalone. Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com> Cc: Daniel Stone <daniels@collabora.com> [mlankhorst: Use kmstest_set_connector_dpms (mkahola)] Reviewed-by: Mika Kahola <mika.kahola@intel.com>
2017-10-20tests/chamelium: Remove reliance on output->config.pipeMaarten Lankhorst
IGT has an api that can find a matching pipe for a given connector, so use that. igt_output_override_mode already forces a modeset on an affected pipe since an earlier commit, so the second call to igt_output_set_pipe can be removed. Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com> Reviewed-by: Mika Kahola <mika.kahola@intel.com>
2017-10-20tests/kms_color: Rework tests slightly to work better with new atomic apiMaarten Lankhorst
igt_pipe_get_property is about to be removed, so use igt_pipe_obj_get_prop instead. This requires adding 2 more properties to the crtc property list. Also get rid of the Broadcast RGB call, this is already handled in igt_kms. Change order for DEGAMMA_LUT and GAMMA_LUT around, else this test will fail if legacy gamma is set. In the legacy path, this will update GAMMA_LUT to the new size before DEGAMMA_LUT is set. Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com> Reviewed-by: Mika Kahola <mika.kahola@intel.com>
2017-10-20lib/igt_kms: Remove igt_crtc_set_background()Maarten Lankhorst
This can be handled by generic properties. Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com> Reviewed-by: Mika Kahola <mika.kahola@intel.com>
2017-10-20lib/igt_kms: Add igt_$obj_has_prop functions, v2.Maarten Lankhorst
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>
2017-10-20lib/igt_kms: Unexport broadcast rgb API.Maarten Lankhorst
Setting broadcast rgb was only used by chamelium, but is now handled in igt_display by default. This means that chamelium doesn't need to set it, and this can be hidden. The broadcast RGB property is intel connector specific, so rename the enum to intel_broadcast_rgb_mode. Keep the property and enum public in case someone wants to test the property later. Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com> Reviewed-by: Mika Kahola <mika.kahola@intel.com>
2017-10-20lib/igt_kms: Export property blob functions for output/pipe/plane, v2.Maarten Lankhorst
With the replace_prop_blob functions we can safely replace the blob for any property, without having to care about error handling ourselves. This will for example allow overriding color management blobs, or for kms_atomic set invalid mode blobs. The color management blob functions are removed, they can now be replaced by direct calls to replace the properties. Changes since v1: - Fix chamelium tests. Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com> Reviewed-by: Mika Kahola <mika.kahola@intel.com>
2017-10-20lib/igt_kms: Rework pipe properties to be more atomic, v7.Maarten Lankhorst
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. This has been the most involved one, since legacy pipe commit still handles a lot of the properties differently from the rest. Changes since v1: - Dump all changed properties on commit. - Fix bug in igt_pipe_refresh(). Changes since v2: - Set pipe ACTIVE property changed flag on init. Changes since v3: - Add a missing igt_pipe_refresh() to kms_atomic_interruptible. Changes since v4: - Perform error handling when setting custom crtc properties. Changes since v5: - Only attempt to commit changes properties. Changes since v6: - Clear OUT_FENCE_PTR on succesful commit. Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com> Reviewed-by: Mika Kahola <mika.kahola@intel.com>
2017-10-20lib/igt_kms: Rework plane properties to be more atomic, v5.Maarten Lankhorst
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>
2017-10-20lib/igt_kms: Rework connector properties to be more atomic, v2.Maarten Lankhorst
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. Changs since v1: - Mention which properties we set to what. - Assert the property to be set is valid. Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com> Reviewed-by: Mika Kahola <mika.kahola@intel.com>
2017-10-19tests/pm_rps: Move some test logic out of boost functionRadoslaw Szwichtenberg
Moving code out of the boost function will allow its usage in other/new test scenarios. Signed-off-by: Radoslaw Szwichtenberg <radoslaw.szwichtenberg@intel.com> Reviewed-by: Sagar Arun Kamble <sagar.a.kamble@intel.com>
2017-10-19lib/i915: Move submission related helpers to lib/i915/gem_submissionMichał Winiarski
Since I accidentally broke the build for some, by putting the pretty printer for submission inside ifdef HAVE_PROCPS, it's time to move the whole thing into lib/i915 while fixing this mistake. Let's also rename the pretty printer and add a doc to it as well as the section. Fixes: f6dfe556659f ("lib: Extract helpers for determining submission method") Signed-off-by: Michał Winiarski <michal.winiarski@intel.com> Cc: Arkadiusz Hiler <arkadiusz.hiler@intel.com> Cc: Chris Wilson <chris@chris-wilson.co.uk> Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
2017-10-19igt/prime_mmap_coherency: Call prime_sync_start before read after writeChris Wilson
We never declared that we were about to read from the mmap after copying into it using the BLT (a missed call to prime_sync_start); leaving its coherency ill-defined. For completeness, add the missing prime_sync_end() as well. v2: Another prime_sync_start/end around the is-zero check in test_read_flush() Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=103168 Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2017-10-18tests/intel-ci: Remove fast-feedback-simulation.testlistArkadiusz Hiler
Signed-off-by: Arkadiusz Hiler <arkadiusz.hiler@intel.com> Acked-by: Radoslaw Szwichtenberg <radoslaw.szwichtenberg@intel.com> Acked-by: Petri Latvala <petri.latvala@intel.com>
2017-10-18tests: Clean up igt_skip_on_simulation() usesArkadiusz Hiler
General update to reflect current state of things. Signed-off-by: Arkadiusz Hiler <arkadiusz.hiler@intel.com> Acked-by: Radoslaw Szwichtenberg <radoslaw.szwichtenberg@intel.com> Acked-by: Petri Latvala <petri.latvala@intel.com>
2017-10-18tests: remove kms_fbc_crcDaniel Vetter
This was the predecessor test to kms_frontbuffer_tracking, which not just tests fbc, and also in a much more through-out fashion. Both tests authored by Paulo, but looking at git history there's a clear switch with the introduction of kms_frontbuffer_tracking. After that only maintenance commits to kms_fbc_crc. Not point having redundant tests, so lets remove the old one. This will cut a bit more than 3 minutes of test-time from kbl-shard. Cc: Paulo Zanoni <paulo.r.zanoni@intel.com> Acked-by: Paulo Zanoni <paulo.r.zanoni@intel.com> Acked-by: Ville Syrjälä <ville.syrjala@linux.intel.com> Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
2017-10-17igt/pm_rc6_residency: Allow some leeway on the upper %% boundChris Wilson
As we use rounding when converting from hw clocks to time, we may report a residency greater than wallclock (by a small margin), so allow us to overshoot by 5% (just due to our inaccuracy). Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Reviewed-by: Sagar Arun Kamble <sagar.a.kamble@intel.com>
2017-10-17igt/prime_mmap_coherency: Only assert correct usage of sync APIChris Wilson
Ignore the unexpected success when the CPU cache is randomly flushed that makes !llc appear to work without sync. It happens, the cpu cache is a fickle beast that we do not have sole control over. Instead limit the test to detect failures when the API is being adhered to. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=103168 Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
2017-10-17lib/i915: Extract context priority setparam to a helperMichał Winiarski
Another example of something that is used across different tests, and should be moved to lib. v2: Break the trend of expanding ioctl_wrappers Signed-off-by: Michał Winiarski <michal.winiarski@intel.com> Cc: Arkadiusz Hiler <arkadiusz.hiler@intel.com> Cc: Chris Wilson <chris@chris-wilson.co.uk> Cc: Katarzyna Dec <katarzyna.dec@intel.com> Cc: Petri Latvala <petri.latvala@intel.com> Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk> Reviewed-by: Katarzyna Dec <katarzyna.dec@intel.com> Acked-by: Arkadiusz Hiler <arkadiusz.hiler@intel.com>
2017-10-17lib/i915: Extract helpers for determining scheduler capabilitiesMichał Winiarski
Couple of tests are using either determining scheduler capabilities or pretty printing. Let's move those to helpers in lib. We can also keep the value obtained from getparam static. v2: Break the trend of expanding ioctl_wrappers Signed-off-by: Michał Winiarski <michal.winiarski@intel.com> Cc: Arkadiusz Hiler <arkadiusz.hiler@intel.com> Cc: Chris Wilson <chris@chris-wilson.co.uk> Cc: Katarzyna Dec <katarzyna.dec@intel.com> Cc: Petri Latvala <petri.latvala@intel.com> Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk> Reviewed-by: Katarzyna Dec <katarzyna.dec@intel.com> Acked-by: Arkadiusz Hiler <arkadiusz.hiler@intel.com>
2017-10-17lib: Extract helpers for determining submission methodMichał Winiarski
Couple of tests are using either determining submission method, or pretty printing. Let's move those to helpers in lib. v2: s/igt_show/gem_show Signed-off-by: Michał Winiarski <michal.winiarski@intel.com> Cc: Arkadiusz Hiler <arkadiusz.hiler@intel.com> Cc: Chris Wilson <chris@chris-wilson.co.uk> Cc: Katarzyna Dec <katarzyna.dec@intel.com> Cc: Petri Latvala <petri.latvala@intel.com> Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk> Reviewed-by: Katarzyna Dec <katarzyna.dec@intel.com> Acked-by: Arkadiusz Hiler <arkadiusz.hiler@intel.com>
2017-10-16igt/gem_mocs_settings: Skip non-existent enginesChris Wilson
For per-engine checks, check the engine actually exists (important for bsd aliasing). Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=101905 Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Reviewed-by: Michał Winiarski <michal.winiarski@intel.com>
2017-10-16tests/drm_read: Change tests to not require fbconMaarten Lankhorst
The first active pipe might not be pipe A, and we shouldn't rely on fbcon for a working crtc. Use igt_kms to set up something basic, and use the kmstest helper to get an event from the correct pipe. Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com> Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
2017-10-12igt/gem_eio: Check hang/eio recovery during suspendChris Wilson
When we suspend, we do not want to be interrupted by a pending reset, or failure of that reset. After the resume, the errors should be noted as usual. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Reviewed-by: Michał Winiarski <michal.winiarski@intel.com>
2017-10-12tests/pm_backlight: Enable connected output to allow tests to succeed, v4.Maarten Lankhorst
If the connected output is disabled before this test is run, then the test will fail because actual_brightness stays at 0 instead of the value of the desired brightness. Fix this by reading intel_backlight/device for the output name, and enable that output at start of this test. Changes since v1: - Enable the connected output, instead of enabling all outputs. Changes since v2: - Set a dummy fb, just in case. Changes since v3: - Use igt_output_get_plane_type, not get_plane. Sample failure: IGT-Version: 1.20-g01c550a27986 (x86_64) (Linux: 4.14.0-rc3-fbconhax+ x86_64) (pm_backlight:1203) CRITICAL: Test assertion failure function test_and_verify, file pm_backlight.c:111: (pm_backlight:1203) CRITICAL: Failed assertion: ({ typeof(0) _a = (0); typeof(val - tolerance) _b = (val - tolerance); _a > _b ? _a : _b; }) <= result (pm_backlight:1203) CRITICAL: error: 91200 > 0 Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com> Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
2017-10-12tests/debugfs_test: Try to light all outputs to increase chances of finding ↵Maarten Lankhorst
fails, v3. Make sure read_all_entries has all outputs possible enabled, but also add a test that runs with all outputs disabled. This will maximize coverage of debugfs reading, and allows the test not to be dependent on fbcon for setup. Changes since v1: - Put framebuffers on all primary planes, to get a crc from i915_sink_src_eDP1. Changes since v2: - Use igt_output_get_plane_type, not igt_output_get_plane. Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com> [mlankhorst: Add comment suggested by ickle.] Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
2017-10-12meson: Make syncobj tests buildVille Syrjälä
Include igt_syncobj.c in libigt so that tests/syncobj_basic actually builds, and let's also build tests/syncobj_wait. v2: Also update lib_headers (Petri) Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com> Reviewed-by: Petri Latvala <petri.latvala@intel.com>
2017-10-12tests: Drop gem_bad_length as redundantDaniele Ceraolo Spurio
Most of the gem_bad_length code is compiled out because creating a zero-length object is not allowed anymore by i915 and thus it is not possible to execute it. The remaining part checks that creation of a zero-length object does indeed fail, which is also checked by gem_create/create-invalid-size. The only difference between the 2 tests is that gem_bad_length checks specifically for EINVAL while create-invalid-size only looks for failure, so after adding the EINVAL check to create-invalid-size it is safe to drop gem_bad_length. v2 (Joonas): - Clarify header line, split the patch, fix Meson build and add Cc: Signed-off-by: Daniele Ceraolo Spurio <daniele.ceraolospurio@intel.com> Signed-off-by: Joonas Lahtinen <joonas.lahtinen@linux.intel.com> Cc: Chris Wilson <chris@chris-wilson.co.uk> Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
2017-10-12igt/drv_hangman: Convert from local recursive batch to igt_spin_tChris Wilson
Replace the local recursive batch execbuf with the equivalent igt_spin_t. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Reviewed-by: Arkadiusz Hiler <arkadiusz.hiler@intel.com>
2017-10-11igt/syncobj_wait: Don't close the timeline early in wait_snapshotJason Ekstrand
Closing the sw_sync timeline now signals any remaining fences upon it; but test_wait_snapshot requires the fence to continue to be busy so that the __syncobj_wait() will return with -ETIME. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=103188 References: ea4d5a270b57 ("dma-buf/sw_sync: force signal all unsignaled fences on dying timeline") Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk> Tested-by: Chris Wilson <chris@chris-wilson.co.uk> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2017-10-11igt/syncobj_wait: Close the sw_sync timeline after the testChris Wilson
Closing the sw_sync timeline now signals any remaining fences upon it; but test_wait_interrupted requires the fence to be busy for the __syncobj_wait() not to immediately return with -ETIME (and so be interrupted instead). Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=103187 References: ea4d5a270b57 ("dma-buf/sw_sync: force signal all unsignaled fences on dying timeline") Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Cc: Jason Ekstrand <jason@jlekstrand.net> Cc: Dave Airlie <airlied@redhat.com> Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
2017-10-11igt/syncobj_wait: Replace open-coded calls to __syncobj_wait()Chris Wilson
Remove the bare igt_ioctl(SYNCOBJ_WAIT) in favour of __syncobj_wait() for tidier error reporting. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Cc: Jason Ekstrand <jason@jlekstrand.net> Cc: Dave Airlie <airlied@redhat.com> Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
2017-10-10syncobj: Add a test for SYNCOBJ_CREATE_SIGNALEDJason Ekstrand
Reviewed-by: Dave Airlie <airlied@redhat.com> Signed-off-by: Jason Ekstrand <jason@jlekstrand.net>
2017-10-10tests/syncobj: Add some wait and reset tests (v7)Jason Ekstrand
This adds both trivial error-checking tests as well as more complex tests which actually test whether or not waits do what they're supposed to do. They only currently work on i915 but it should be simple to hook them up for other drivers by simply implementing the little function pointer hook provided at the top for triggering a syncobj. v2: - Actually add the reset tests. v3: - Only do one execbuf for trigger - Use do_ioctl and do_ioctl_err - Better check for syncobj support - Add local_/LOCAL_ defines of things - Use a timer instead of a pthread v4: - Use ioctl wrappers - Use VGEM instead of i915 - Combine a bunch of the simple tests into one function v5: - Combinatorially generate basic tests - Use sw_sync instead of using vgem directly - Add even more tests v6: - Rebase on the new SYNCOBJ_RESET API - Add tests for SYNCOBJ_SIGNAL v7: - Improve the signal and reset bad pad tests Reviewed-by: Dave Airlie <airlied@redhat.com> [airlied: fix build] Signed-off-by: Jason Ekstrand <jason@jlekstrand.net>
2017-10-10tests/syncobj: Convert the basic test over to the helpersJason Ekstrand
Signed-off-by: Jason Ekstrand <jason@jlekstrand.net> Reviewed-by: Dave Airlie <airlied@redhat.com>
2017-10-09tests/kms_draw_crc: Skip tests for unsupported formatsVille Syrjälä
10bpc formats aren't supported on all platforms, so skip the test when we can't create the framebuffer. Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com> Reviewed-by: Petri Latvala <petri.latvala@intel.com>
2017-10-09igt/gem_fence_thrash: Use streaming reads for verifyChris Wilson
At the moment, the verify tests use an extremely brutal write-read of every dword, degrading performance to UC. If we break those up into cachelines, we can do a wcb write/read at a time instead, roughly 8x faster. We lose the accuracy of the forced wcb flushes around every dword, but we are retaining the overall behaviour of checking reads following writes instead. To compensate, we do check that a single dword write/read before using wcb aligned accesses. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Reviewed-by: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
2017-10-05igt/gem_exec_scheduler: Add small priority sorting smoketestChris Wilson
Not a test that inspects strict ordering of execution, but one that makes sure that we can survive a small bit of stress. From each cpu we submit a small number of batches at different priorities to different engines, with the expectation that they pass through unscathed. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Cc: Michał Winiarski <michal.winiarski@intel.com Cc: Joonas Lahtinen <joonas.lahtinen@linux.intel.com> Reviewed-by: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>