summaryrefslogtreecommitdiff
path: root/tests
AgeCommit message (Collapse)Author
2019-02-13i915/gem_ctx_sseu: Fix 32-bit buildGuillaume Tucker
This fixes a compiler warning treated as an error when building for 32-bit architectures since their pointer size does not match the size of drm_i915_gem_context_param.value which is 64 bits: CC i915/gem_ctx_sseu.o i915/gem_ctx_sseu.c: In function ‘test_ggtt_args’: i915/gem_ctx_sseu.c:384:9: error: cast to pointer from integer of different size [-Werror=int-to-pointer-cast] munmap((void *)arg.value, 4096); It was found while building for arm with gcc 6.3.0 and I suspect the same problem would arise for i386 or other 32-bit architectures. The uintptr_t type is by definition an unsigned integer of the same length as a pointer on a given architecture, so this should fix the problem for all architectures up to 64 bits. Signed-off-by: Guillaume Tucker <guillaume.tucker@collabora.com> Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
2019-02-13Revert "igt_command_line.sh: Abort if run as root"Arkadiusz Hiler
This reverts commit 845c9fb45b734aef95e2fb2317d0c02567e06a68. To unblock GitLab's CI while a proper solution is in the works. Signed-off-by: Arkadiusz Hiler <arkadiusz.hiler@intel.com> Acked-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2019-02-13tests/core_unauth_vs_render: new test for the relaxed DRM_AUTH handlingEmil Velikov
As the inline comment says, this test checks that the kernel allows unauthenticated master with render capable, RENDER_ALLOW ioctls. The kernel commit has extra details why. v2: - drop RUN_AS_ROOT guard - call check_auth() on the {,un}authenticated device - check the device is PRIME (import) capable - check the device has render node - tweak expectations based on above three - elaborate why we care only about -EACCES v3: - fold into existing core_auth.c - move igt_assert within the subtest - make has_prime_import() an igt_require() - check for BADF before and after, as requested. Not strictly needed. - swap igt_info+drm_open_driver with comment + __drm_open_driver Former calls igt_skip() which is problematic with igt_fork(). Signed-off-by: Emil Velikov <emil.velikov@collabora.com> Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch> (irc)
2019-02-13tests/core_setmaster_vs_auth: drop __linux__ includes hunkEmil Velikov
Seeming copy/paste from another test. None of the includes are required. Signed-off-by: Emil Velikov <emil.velikov@collabora.com> Acked-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2019-02-12i915/gem_exec_latency: Eliminate the wakeup penaltyChris Wilson
The first dispatch incurs the cost of waking up the device, so also measure after issuing a spinner to keep the device awake as we submit. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Reviewed-by: Antonio Argenziano <antonio.argenziano@intel.com>
2019-02-12i915/gem_exec_latency: Normalize results into nsChris Wilson
Present the latency results in nanoseconds not RCS cycles. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Reviewed-by: Antonio Argenziano <antonio.argenziano@intel.com>
2019-02-12igt_command_line.sh: Abort if run as rootArkadiusz Hiler
`ninja test` invokes igt_command_line.sh for each test binary to check the behavior of some of the switches. One of the verified things is that the test exists with non-zero status when requesting invalid subtest. `--run-subtest` results in igt_fixtures being executed - this fiddles with the device and sysfs knobs. Let's exit early, if we are root, to save people form unintentional side-effects and strange failures. Cc: Petri Latvala <petri.latvala@intel.com> Cc: Andi Shyti <andi.shyti@intel.com> Signed-off-by: Arkadiusz Hiler <arkadiusz.hiler@intel.com> Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2019-02-12i915/gem_mmap_gtt: Impose a timeout for "hang"Chris Wilson
Only wait a maximum of 2 more seconds for the hang children to complete, to catch deadlocks in a timely fashion. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Cc: Mika Kuoppala <mika.kuoppala@intel.com> Reviewed-by: Mika Kuoppala <mika.kuoppala@intel.com>
2019-02-11igt: tests: chamelium: Add YUV formats testsMaxime Ripard
The NV12, NV16, NV21, NV61, YUV420, YVU420, YUV422 and YVU422 are YUV formats that are currently supported in IGT. We'll want to test those formats in addition to the RGB formats, so let's add some subtests. One thing worth noting is some hardware isn't able to output a pixel-perfect image, so we do the same kind of comparison than for VGA. Reviewed-by: Lyude Paul <lyude@redhat.com> Reviewed-by: Paul Kocialkowski <paul.kocialkowski@bootlin.com> Signed-off-by: Maxime Ripard <maxime.ripard@bootlin.com>
2019-02-11igt: tests: chamelium: Convert VGA tests to do_test_displayMaxime Ripard
The VGA tests were run so far as part of a separate function. However, the only difference between that function and the do_test_display function was the kind of comparison we wanted to use. Indeed, VGA being an analog output, we can't rely on a pixel perfect image, and thus only compare the CRCs, but we need to make some more advanced comparison. Let's add a new check method, add support for the analog check to do_test_display and remove the old version. Reviewed-by: Lyude Paul <lyude@redhat.com> Reviewed-by: Paul Kocialkowski <paul.kocialkowski@bootlin.com> Signed-off-by: Maxime Ripard <maxime.ripard@bootlin.com>
2019-02-11igt: tests: chamelium: Start to unify testsMaxime Ripard
The various tests in kms_chamelium are really variants of one another but share little code. In addition to the duplication, this gets in the way of the introduction of more tests, or to be able to run all the tests on all the output, which isn't the case at the moment, with the HDMI and DP tests and the VGA tests being different. Start by introducing a check parameter to the do_test_display function, that will tell which test method we want to use to compare the frames. Reviewed-by: Lyude Paul <lyude@redhat.com> Reviewed-by: Paul Kocialkowski <paul.kocialkowski@bootlin.com> Signed-off-by: Maxime Ripard <maxime.ripard@bootlin.com>
2019-02-08i915/gem_exec_scheduler: Disable alarm before exiting childChris Wilson
Still the blighted Starting subtest: pi-ringfull-bsd child 0 died with signal 14, Alarm clock Subtest pi-ringfull-bsd: FAIL (0.133s) So let's make sure our timer cannot fire later on during exit. References https://bugs.freedesktop.org/show_bug.cgi?id=109584 Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Cc: Joonas Lahtinen <joonas.lahtinen@linux.intel.com> Reviewed-by: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
2019-02-08i915/gem_exec_schedule: Rebuild signal handler in childChris Wilson
Make sure that the SIGARLM handler is captured so that we don't accidentally shoot ourselves in the foot instead of merely waking up the execbuf. The test is hitting child 0 died with signal 14, Alarm clock when we expect it to be hitting the inherited signal handler across the fork. Which is odd. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Reviewed-by: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
2019-02-05tests/gem_media_vme: Shut down half of subslices to avoid gpu hang on ICLTony Ye
On Icelake we need to turn off subslices not containing the VME block or the VME kernel will hang. v2: (Tvrtko Ursulin) * Remove libdrm usage for setting context param. * Cleanup bitmask operation. * Only apply the workaround for ICL. v3: (Tvrtko Ursulin) * Added hang detector. (Chris Wilson) v4: (Tvrtko Ursulin) * Rebase for hang detector moved to previous patch. * Tidy curly braces. v5: (Tvrtko Ursulin) * Whitespace tidy. (Joonas) Signed-off-by: Tony Ye <tony.ye@intel.com> Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com> Cc: Tony Ye <tony.ye@intel.com> Reviewed-by: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
2019-02-05tests/gem_media_vme: Simple test to exercise the VME blockTony Ye
Simple test which exercises the VME fixed function block. v2: (Tvrtko Ursulin) * Small cleanups like copyright date, tabs, remove unused bits. v3: (Tony Ye) * Added curbe data entry for dst surface. * Read the dst surface after the VME kernel being executed. v4: (Tony Ye) * Added the media_vme.gxa kernel source code and compile instructions. v5: (Tvrtko Ursulin) * Added hang detector. v6: (Tvrtko Ursulin) * Replace gem_read with gem_sync. (Chris Wilson) Signed-off-by: Tony Ye <tony.ye@intel.com> Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com> Cc: Tony Ye <tony.ye@intel.com> Reviewed-by: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
2019-02-05tests/gem_ctx_sseu: Dynamic (sub)slice programming testsLionel Landwerlin
Verify that the per-context dynamic SSEU uAPI works as expected. v2: Add subslice tests (Lionel) Use MI_SET_PREDICATE for further verification when available (Lionel) v3: Rename to gem_ctx_rpcs (Lionel) v4: Update kernel API (Lionel) Add 0 value test (Lionel) Exercise invalid values (Lionel) v5: Add perf tests (Lionel) v6: Add new sysfs entry tests (Lionel) v7: Test rsvd fields Update for kernel series changes v8: Drop test_no_sseu_support() test (Kelvin) Drop drm_intel_*() apis (Chris) v9: by Chris: Drop all do_ioctl/do_ioctl_err() Use gem_context_[gs]et_param() Use gem_read() instead of mapping memory by Lionel: Test dynamic sseu on/off more Tvrtko Ursulin: v10: * Various style tweaks and refactorings. * New test coverage. v11: * Change platform support to just Gen11. * Simplify availability test. (Chris Wilson) * More invalid pointer tests. (Chris Wilson) v12: * Fix MAP_FIXED use (doh!). * Fix get/set copy&paste errors. * Drop supported platform test. (Chris Wilson) * Add mmap__gtt test. (Chris Wilson) v13: * Commit message tweaks. * Added reset/hang/suspend tests. (Chris Wilson) * Assert spinner is busy. (Chris Wilson) * Remove some more ABI assumptions. (Chris Wilson) v14: * Use default resume time. (Chris Wilson) * Trigger hang after rpcs read batch has been submitted. (Chris Wilson) v15: * Adjust for uAPI restrictions. v16: * Build system changes. v17: * Remove all subtests which read the RPCS register. (Joonas Lahtinen) v18: * Tidy curly braces. (Joonas Lahtinen) v19: * Check flags/rsvd MBZ. v20: * Rebase for engine_class/engine_instance uapi change. v21: * Fixed meson.build. Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com> Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com> Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk> # v14 Reviewed-by: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
2019-02-04tests/kms_cursor_crc.c: Remove framebuffer at the end of the testMamta Shukla
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>
2019-02-04tests/kms_cursor_crc.c: Improve test_cursor_alpha()Mamta Shukla
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
2019-02-04i915/gem_mocs_settings: Allow hangs around reset testsChris Wilson
To inject a GPU hang, we should ask the kernel first if it is legal to do so. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Reviewed-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com> Reviewed-by: Katarzyna Dec <katarzyna.dec@intel.com>
2019-02-04i915/perf_pmu: Add trailing '\n' to an igt_assert_fChris Wilson
A missing newline at the end of an assert, so add it for clarity in the error message. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Reviewed-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
2019-02-02i915/query: Update topology info to match realityChris Wilson
CI has a HSW GT1 with a single subslice. Accept this as a possible truth value. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=106600 Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Cc: Lionel Landwerlin <lionel.g.landwerlin@intel.com> Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
2019-02-01tests/kms_frontbuffer_tracking: Fix skips when PSR is not available.Maarten Lankhorst
Use psr.can_test to determine we can disable PSR, and not skip because PSR is unavailable. Cc: Dhinakaran Pandiyan <dhinakaran.pandiyan@intel.com> Cc: José Roberto de Souza <jose.souza@intel.com> Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com> Reviewed-by: José Roberto de Souza <jose.souza@intel.com>
2019-01-31i915/gem_cpu_reloc: Do the can-store-dword check at startChris Wilson
igt doesn't handle skipping from inside igt_fork very gracefully and crashes instead of reporting the lack of requirements. One solution would be to fix igt, but far easier is to just move the requirement checking around to do it before we even fork. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=109493 Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Reviewed-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
2019-01-31sw_sync: Initialise struct before useChris Wilson
sw_sync: ../lib/igt_core.c:1592: __igt_fork_helper: Assertion `!proc->running' Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=108889 Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Reviewed-by: Jani Nikula <jani.nikula@intel.com>
2019-01-30i915/gem_eio: 64 batches may be too many for some devices!Chris Wilson
Actually measure how many batches we can fit into a ring before blocking, or else we may end up hanging the device earlier than expected! v2: Mostly conservative. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=109014 Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Cc: Mika Kuoppala <mika.kuoppala@intel.com> Reviewed-by: Mika Kuoppala <mika.kuoppala@intel.com>
2019-01-30intel-ci: Drop gem_exec_nop from BATChris Wilson
This pair, gem_exec_nop/{series,parallel}, are very light stress tests of which we already perform the same sequence inside i915_selftests/live_requests. We keep basic uABI coverage (i.e. plain old gem_execbuf) via the likes of gem_exec_basic and gem_exec_reloc so all gem_exec_nop adds are nefarious HW details, much less likely to spot if a test is of sound quality for further testing (and again, we have alternate coverage of the same HW stress). Between the pair of subtests, gem_exec_nop takes about 20s of BAT. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Cc: Joonas Lahtinen <joonas.lahtinen@linux.intel.com> Cc: Mika Kuoppala <mika.kuoppala@intel.com> Cc: Petri Latvala <petri.latvala@intel.com> Cc: Tomi Sarvela <tomi.p.sarvela@intel.com> Reviewed-by: Mika Kuoppala <mika.kuoppala@intel.com> Acked-by: Petri Latvala <petri.latvala@intel.com>
2019-01-30i915/gem_eio: Check for allow-hang prior to issuing a resetChris Wilson
Check that we are allowed to hang/reset the GPU before we actually do so for the first time. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Reviewed-by: Mika Kuoppala <mika.kuoppala@linux.intel.com>
2019-01-30i915/selftest: Allow filtering of individual subtestsChris Wilson
Take an environment variable, SELFTESTS=foo,bar, and pass that along to the kernel (as i915.st_filter=foo,bar) to provide fine grained test selection. This can be either as an exact match to select only that test, or to exclude only test. For example, SELFTESTS=igt_vma_create,igt_vma_pin1 i915_selftest --run mock_vma SELFTESTS=!igt_vma_create i915_selftest --run mock_vma v2: Replace NULL with the empty string. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Reviewed-by: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
2019-01-30i915/gem_workarounds: Require GPU resetsChris Wilson
Check that we are allowed to reset the GPU prior to execution. v2: Push the require checking up into a subgroup Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Reviewed-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
2019-01-29i915/pm_rpm: Check for functional GEM before useChris Wilson
Check the GPU (using GEM) is up and operational before submitting commands. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Reviewed-by: Antonio Argenziano <antonio.argenziano@intel.com>
2019-01-29i915/perf_pmu: Check for hangs allowedChris Wilson
Check we can reset the GPU before running the reset test. 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-01-29i915/gem_exec_capture: Check the strlen() for an empty fileChris Wilson
igt_sysfs_get() only returns NULL if the open() fails, and a valid string otherwise. So if the read() fails with ENODEV (because sysfs doesn't provide the driver with an ->open() callback), we return an empty string, and "No error captured" otherwise. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=109481 Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Reviewed-by: Antonio Argenziano <antonio.argenziano@intel.com>
2019-01-29automake: Remove VC4/V3D build supportDaniel Vetter
Eric is using meson nowadays. v2: Fix up the test filter, meson lists now contain more than in the automake lists. Cc: Eric Anholt <eric@anholt.net> Reviewed-by: Eric Anholt <eric@anholt.net> Acked-by: Petri Latvala <petri.latvala@intel.com> Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
2019-01-29automake: Ditch all EXTRA_DIST directivesDaniel Vetter
We're not using automake to build tarballs anymore. Acked-by: Petri Latvala <petri.latvala@intel.com> Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
2019-01-29tests/core_auth: Merge getclient subtestsDaniel Vetter
Emil has another auth test which could use the check_auth function, so best to merge them all. We need a subtest group and put the tests which need to fully control who's master and how many open drm fd there are first. Cc: Emil Velikov <emil.l.velikov@gmail.com> Acked-by: Emil Velikov <emil.velikov@collabora.com> Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
2019-01-29tests/gem_exec_capture: Compare instead of assign in an assertPetri Latvala
Signed-off-by: Petri Latvala <petri.latvala@intel.com> Cc: Chris Wilson <chris@chris-wilson.co.uk> Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
2019-01-28tests: Add variable refresh rate testsNicholas Kazlauskas
There are 3 tests for basic variable refresh rate functionality. The tests measure flipping at the average between the current mode refresh rate and the minimum supported variable refresh rate. It tests that VRR is enabled and that the difference between flip timestamps converges to the requested rate. It also tests this under both S3 and DPMS. Potential ideas for future tests: - Test behavior inside VRR range with a stepping test - Test behavior outside of VRR range - Multi-monitor (limited by no async pageflips in DRM atomic API) Cc: Harry Wentland <harry.wentland@amd.com> Cc: Leo Li <sunpeng.li@amd.com> Cc: Manasi Navare <manasi.d.navare@intel.com> Signed-off-by: Nicholas Kazlauskas <nicholas.kazlauskas@amd.com> Reviewed-by: Harry Wentland <harry.wentland@amd.com>
2019-01-28tests/kms_color: Assert gamma look up table sizesPetri Latvala
If the properties for gamma tables exist, their sizes must be non-zero. Signed-off-by: Petri Latvala <petri.latvala@intel.com> Cc: Lionel Landwerlin <lionel.g.landwerlin@intel.com> Reviewed-by: Arkadiusz Hiler <arkadiusz.hiler@intel.com>
2019-01-28tests: Make a fb-tiling subtest to check for invalid tiling changes.Maarten Lankhorst
In 2013 we prevented changing the tiling of an active framebuffer: commit 80075d492f8773209e26d11d6bb13ba624ef95a4 Author: Daniel Vetter <daniel.vetter@ffwll.ch> Date: Wed Oct 9 21:23:52 2013 +0200 drm/i915: prevent tiling changes on framebuffer backing storage After this we no longer have any use for the bad-tiling subtest, and only have to make sure changing tiling on a fb is not allowed. Remove the original bad-tiling subtest, and add a i915_fb_tiling subtest for this case. Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com> [mlankhorst: Fix build system changes] Reviewed-by: Juha-Pekka Heikkila <juhapekka.heikkila@gmail.com>
2019-01-28tests/kms_rotation_crc: Fix multiplane-rotation-cropping* testsJuha-Pekka Heikkila
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>
2019-01-27tests/kms_flip: Add test to check suspend/resumeShayenne Moura
This patch adds one test to evaluate suspend/resume operations using kms_flip. v2: Reduce test time to 10 (Daniel) Signed-off-by: Shayenne Moura <shayenneluzmoura@gmail.com> Reviewed-by: Rodrigo Siqueira <rodrigosiqueiramelo@gmail.com> Signed-off-by: Rodrigo Siqueira <rodrigosiqueiramelo@gmail.com>
2019-01-24i915/gem_mmap_gtt: Reset faster and longer to catch fencing errorsChris Wilson
Performing a GPU reset clobbers the fence registers, affecting which addresses the tiled GTT mmap access. If the driver does not take precautions across a GPU reset, a client may read the wrong values (but only within their own buffer as the fence will only be degraded to I915_TILING_NONE, reducing the access area). However, as this requires performing a read using the indirect GTT at exactly the same time as the reset occurs, it can be quite difficult to catch, so repeat the test many times and across all cores simultaneously. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Reviewed-by: Mika Kuoppala <mika.kuoppala@linux.intel.com>
2019-01-24i915/gem_exec_capture: Really confirm error capturing is enablingChris Wilson
If the device has error capturing disabled, we still allow previous error state to be cleared by a write to sysfs/error. To actually confirm that we can capture a fresh error state, we have to perform a read(). Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Reviewed-by: Katarzyna Dec <katarzyna.dec@intel.com>
2019-01-23tests: drop openssl dependency in favor of glib sha1 implementationJani Nikula
We already depend on glib which has sha1, so we don't really need openssl just for sha1. The opensll dependency was added in commit caea9c5b3aa1 ("igt/gem_userptr: Check read-only mappings"). Cc: Chris Wilson <chris@chris-wilson.co.uk> Cc: Tvrtko Ursulin <tvrtko.ursulin@linux.intel.com> Cc: Daniel Vetter <daniel@ffwll.ch> Cc: Tomi Valkeinen <tomi.valkeinen@ti.com> Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk> Signed-off-by: Jani Nikula <jani.nikula@intel.com>
2019-01-22tests/psr: Add the same test coverage that we have for PSR1 to PSR2José Roberto de Souza
The main tests for PSR1 check if hardware tracking is detecting changes in planes when modifing it in different ways and now those tests will also run for PSR2 if supported by source and sink. v4: Dynamic generating PSR1 and PSR2 tests instead of copy and paste tests twice. Cc: Rodrigo Vivi <rodrigo.vivi@intel.com> Cc: Dhinakaran Pandiyan <dhinakaran.pandiyan@intel.com> Acked-by: Rodrigo Vivi <rodrigo.vivi@intel.com> Reviewed-by: Dhinakaran Pandiyan <dhinakaran.pandiyan@intel.com> Signed-off-by: José Roberto de Souza <jose.souza@intel.com>
2019-01-22test/psr: Add a generic function to setup each testJosé Roberto de Souza
When the PSR2 tests were added it will be necessary switch between PSR versions, so lets add test_setup() and make it call setup_test_plane() and assert if PSR is active as it is the base for every test. Cc: Dhinakaran Pandiyan <dhinakaran.pandiyan@intel.com> Reviewed-by: Dhinakaran Pandiyan <dhinakaran.pandiyan@intel.com> Signed-off-by: José Roberto de Souza <jose.souza@intel.com>
2019-01-22lib/psr: Add PSR2 support to the remaning psr functionsJosé Roberto de Souza
Add the mode parameter to psr_enable() and psr_sink_support() so PSR1 and PSR2 can be tested separated. For now all PSR tests will run only with PSR1 and the tests for PSR2 will come in the future. Cc: Dhinakaran Pandiyan <dhinakaran.pandiyan@intel.com> Reviewed-by: Dhinakaran Pandiyan <dhinakaran.pandiyan@intel.com> Signed-off-by: José Roberto de Souza <jose.souza@intel.com>
2019-01-22lib/psr: Make psr_wait_entry and psr_wait_update aware of the PSR version testedJosé Roberto de Souza
This way we can test both PSR version separated. v4: Dropping psr_state_check() to psr_active_check() Cc: Dhinakaran Pandiyan <dhinakaran.pandiyan@intel.com> Reviewed-by: Dhinakaran Pandiyan <dhinakaran.pandiyan@intel.com> Signed-off-by: José Roberto de Souza <jose.souza@intel.com>
2019-01-22lib/psr: Rename psr_wait_exit to psr_wait_updateJosé Roberto de Souza
This is a initial preparation for PSR2 test support, as in PSR2 a update to screen could mean that PSR is still active and the screen will be update by a selective update this renamed is necessary. Cc: Dhinakaran Pandiyan <dhinakaran.pandiyan@intel.com> Reviewed-by: Dhinakaran Pandiyan <dhinakaran.pandiyan@intel.com> Signed-off-by: José Roberto de Souza <jose.souza@intel.com>
2019-01-21tests/testdisplay: Speed up testdisplay for ciVille Syrjälä
No point in sleeping 5 seconds between each modeset when running in ci. So let's just make the default sleep interval 0 seconds and leave it up to the user to bump it via -s when running interactively. On a KBL + LSPCON + a 4k HDMI display with 36 modes listed: time ./tests/testdisplay - real 3m12,026s - user 0m1,920s - sys 0m1,241s + real 0m14,681s + user 0m3,135s + sys 0m1,340s Cc: Martin Peres <martin.peres@linux.intel.com> Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com> Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>