summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
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-29automake: Drop runner build supportDaniel Vetter
Main use case here is CI, which already builds using meson. Acked-by: Petri Latvala <petri.latvala@intel.com> Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
2019-01-29automake: Point builders at mesonDaniel Vetter
Apparently all the doc changes aren't good enough yet ... Acked-by: Petri Latvala <petri.latvala@intel.com> Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
2019-01-29automake: drop assembler/shader-debugger automake supportDaniel Vetter
Seems to have seen no activity in past years, dropping the automake support hopefully doesn't upset anyone. Acked-by: Petri Latvala <petri.latvala@intel.com> Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
2019-01-29automake: Drop manpage build supportDaniel Vetter
We've already thrown out the gtkdoc build support from the automake files, let's do the same with the manpages build. Acked-by: Petri Latvala <petri.latvala@intel.com> Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
2019-01-29automake: Drop gtkdoc build remnantsDaniel Vetter
If you have gtkdoc installed, then autogen.sh stopped working ever since: commit ad821d1dc5d0eea4ac3a0e8e29c56c7f66191108 Author: Daniel Vetter <daniel.vetter@ffwll.ch> Date: Thu Dec 13 13:43:55 2018 +0100 autoconf: Drop gtkdoc support 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-28lib/igt_x86: Mock-use variable to silence static analysisPetri Latvala
x86_features_to_string() uses a repeatable pattern that increments a pointer for each feature string, leaving a dead assignment for the last one. Add a (void)line to the end just to silence static analysis. Signed-off-by: Petri Latvala <petri.latvala@intel.com> Cc: Chris Wilson <chris@chris-wilson.co.uk> Reviewed-by: Arkadiusz Hiler <arkadiusz.hiler@intel.com>
2019-01-28lib/igt_kms: Aid static analyzer with the control flowPetri Latvala
If we first find n amount of ':' in a string, the amount is still n when we walk through it the second time. Signed-off-by: Petri Latvala <petri.latvala@intel.com> Cc: Joonas Lahtinen <joonas.lahtinen@linux.intel.com> Reviewed-by: Arkadiusz Hiler <arkadiusz.hiler@intel.com>
2019-01-28igt_aux: Handle empty pm_test file gracefullyPetri Latvala
Signed-off-by: Petri Latvala <petri.latvala@intel.com> Cc: Imre Deak <imre.deak@intel.com> Reviewed-by: Arkadiusz Hiler <arkadiusz.hiler@intel.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-28overlay: Write out the assumption for kernel-provided dataPetri Latvala
The code assumes (correctly) that perf_event_header's size is non-zero. Write that out so static analysis also knows it. Signed-off-by: Petri Latvala <petri.latvala@intel.com> Cc: Chris Wilson <chris@chris-wilson.co.uk> 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-24lib/igt_gt: Move assert with setting 'reset' parameter after IGT env checkKatarzyna Dec
We are trying to set reset parameter earlier than checking IGT env. Let's move it after checking IGT env to avoid setting reset parameter when hang injection is disabled. Cc: Chris Wilson <chris@chris-wilson.co.uk> Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk> Signed-off-by: Katarzyna Dec <katarzyna.dec@intel.com>
2019-01-24gitlab-CI: Stop installing openssl packagesPetri Latvala
As we stopped using them in 70749c70926f ("tests: drop openssl dependency in favor of glib sha1 implementation"), stop using them in gitlab. Signed-off-by: Petri Latvala <petri.latvala@intel.com> Cc: Arkadiusz Hiler <arkadiusz.hiler@intel.com> Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2019-01-23lib/draw: Align mmap requests to page boundariesChris Wilson
Since we trust fb->size as either calculated by calc_fb_size() or the supplied by the user, it invariably isn't page aligned. The mmap routines and ioctls only deal in pages... Not sure if fb->size should be page aligned, but that may break some other drawing tests, so opt to just fix up the mmap requests. 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-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-22lib/psr: Only care about DEEP_SLEEP state for PSR2José Roberto de Souza
To check if PSR is active it search for SRDENT for PSR1 and it was searching for SLEEP for PSR2 but it should really seach for DEEP_SLEEP as in this state display block is actualy saving a substancial amount of power. 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 support to new modified i915_edp_psr_status outputJosé Roberto de Souza
The kernel patch 'drm/i915: Refactor PSR status debugfs' changed the output of i915_edp_psr_status, so adding support to the new output here while keeping the support to the old one for a while. In psr_active() we were overdoing, we just need to check the source state to know if PSR is active and doing that we keep compability to old and new i915_edp_psr_status output. Cc: Rodrigo Vivi <rodrigo.vivi@intel.com> Cc: Dhinakaran Pandiyan <dhinakaran.pandiyan@intel.com> Reviewed-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-22lib: Include the size in the error message for mlockChris Wilson
Knowing how much we tried to allocate would be useful if one should need to debug why it failed. References: https://bugs.freedesktop.org/show_bug.cgi?id=109439 Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Reviewed-by: Antonio Argenziano <antonio.argenziano@intel.com>
2019-01-22runner: Implement --dry-runPetri Latvala
Actually implement --dry-run to not execute tests. With dry-run active, attempting to execute will figure out the list of things to execute, serialize them along with settings, and stop. This will be useful for CI that wants to post-mortem on failed test rounds to generate a list of tests that should have been executed and produce json result files (full of 'notrun') for proper statistics. Signed-off-by: Petri Latvala <petri.latvala@intel.com> Cc: Andi Shyti <andi.shyti@intel.com> Cc: Martin Peres <martin.peres@linux.intel.com> Cc: Arkadiusz Hiler <arkadiusz.hiler@intel.com> Cc: Tomi Sarvela <tomi.p.sarvela@intel.com> Reviewed-by: Martin Peres <martin.peres@linux.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>
2019-01-21lib/drmtest: Don't read from NULL in set_forced_driverPetri Latvala
The only caller so far never passes NULL so no effects today. Signed-off-by: Petri Latvala <petri.latvala@intel.com> Cc: Rodrigo Siqueira <rodrigosiqueiramelo@gmail.com> Cc: Daniel Vetter <daniel.vetter@ffwll.ch> Reviewed-by: Rodrigo Siqueira <rodrigosiqueiramelo@gmail.com>
2019-01-21lib/igt_core: Initialize fds in igt_system_quietPetri Latvala
This avoids calling close() with uninitialized ints if some dup() calls succeed and others don't. Signed-off-by: Petri Latvala <petri.latvala@intel.com> Cc: Abdiel Janulgue <abdiel.janulgue@linux.intel.com> Reviewed-by: Abdiel Janulgue <abdiel.janulgue@linux.intel.com>
2019-01-21lib/igt_core: Handle all failures to read .igtrcPetri Latvala
Parse error is not the only way to fail loading the file. A common other error is the file not existing. Handle all failures to read .igtrc by releasing the key store immediately. Signed-off-by: Petri Latvala <petri.latvala@intel.com> Cc: Paul Kocialkowski <paul.kocialkowski@bootlin.com> Cc: Arkadiusz Hiler <arkadiusz.hiler@intel.com> Reviewed-by: Paul Kocialkowski <paul.kocialkowski@bootlin.com>
2019-01-21lib/igt_core: Assert that optarg is presentPetri Latvala
If getopt_long is told an argument is required, it will give it. Signed-off-by: Petri Latvala <petri.latvala@intel.com> Cc: Arkadiusz Hiler <arkadiusz.hiler@intel.com> Reviewed-by: Arkadiusz Hiler <arkadiusz.hiler@intel.com>
2019-01-21lib/igt_audio: Initialize freq in audio_signal_detect()Petri Latvala
It's not clear to the static analyzer that freq is assigned when handling the previous frame and then used in the next. In fact, it wasn't clear to me either before staring at the code for some minutes. Initializing it to something makes both of us happier. Signed-off-by: Petri Latvala <petri.latvala@intel.com> Cc: Paul Kocialkowski <paul.kocialkowski@bootlin.com> Reviewed-by: Paul Kocialkowski <paul.kocialkowski@bootlin.com>
2019-01-21lib/igt_alsa: Remove dead assignmentPetri Latvala
The execution can only reach the end (goto complete) or the new unconditional assignment a few lines below before the value is read again. Either it's really a dead assignment, or there's a bug with the execution flow. Leaning on the former. Signed-off-by: Petri Latvala <petri.latvala@intel.com> Cc: Paul Kocialkowski <paul.kocialkowski@bootlin.com> Reviewed-by: Paul Kocialkowski <paul.kocialkowski@bootlin.com>
2019-01-21benchmarks/gem_userptr_benchmark: Correctly free memoryPetri Latvala
if (p) free(p) does a useless check, free(NULL) is a valid call. Also assign NULL so we don't end up double-freeing memory if anyone reorders nr_bos to have a 0 after other values. Signed-off-by: Petri Latvala <petri.latvala@intel.com> Cc: Tvrtko Ursulin <tvrtko.ursulin@intel.com> Reviewed-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
2019-01-21lib/igt_kms: Assert that active crtcs have at least one planePetri Latvala
Signed-off-by: Petri Latvala <petri.latvala@intel.com> Cc: Mika Kahola <mika.kahola@intel.com> Cc: Robert Foss <robert.foss@collabora.com> Cc: Chris Wilson <chris@chris-wilson.co.uk> Reviewed-by: Mika Kahola <mika.kahola@intel.com>
2019-01-21lib/igt_kms: Make igt_display_init require at least one planePetri Latvala
Not only will the following calloc call end up allocating 0 bytes (undefined behaviour), but last_plane becomes (uint8_t)-1. Signed-off-by: Petri Latvala <petri.latvala@intel.com> Cc: Robert Foss <robert.foss@collabora.com> Cc: Maarten Lankhorst <maarten.lankhorst@linux.intel.com> Reviewed-by: Robert Foss <robert.foss@collabora.com>
2019-01-21benchmarks/wsim: Handle a parse errorPetri Latvala
Signed-off-by: Petri Latvala <petri.latvala@intel.com> Cc: Tvrtko Ursulin <tvrtko.ursulin@intel.com> Reviewed-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
2019-01-21lib: Avoid memcpying 0 bytes from NULLPetri Latvala
The behaviour of memcpying 0 bytes from NULL is semantically sound, but still undefined behaviour. Signed-off-by: Petri Latvala <petri.latvala@intel.com> Cc: Arkadiusz Hiler <arkadiusz.hiler@intel.com> Reviewed-by: Arkadiusz Hiler <arkadiusz.hiler@intel.com>
2019-01-21tests: Use correct type for callocPetri Latvala
No actual difference, size of a pointer is the same as pointer-to-pointer. Signed-off-by: Petri Latvala <petri.latvala@intel.com> Cc: Mika Kahola <mika.kahola@intel.com> Cc: Maarten Lankhorst <maarten.lankhorst@linux.intel.com> Reviewed-by: Mika Kahola <mika.kahola@intel.com>
2019-01-21lib/igt_kms: Use correct type for callocPetri Latvala
The type mismatch was char vs. unsigned char, both being size 1 so this didn't cause any actual issues other than noise in static analysis that doesn't believe 1 is equal to another type of 1. Signed-off-by: Petri Latvala <petri.latvala@intel.com> Cc: Abdiel Janulgue <abdiel.janulgue@linux.intel.com> Reviewed-by: Abdiel Janulgue <abdiel.janulgue@linux.intel.com>
2019-01-21lib/ioctl_wrappers: Help static analysis with execution flowPetri Latvala
If an ioctl fails, errno is set to non-zero, and static analysis doesn't quite get it. Add igt_assume()s where applicable. v2: Braces on both branches of an if (Chris) Signed-off-by: Petri Latvala <petri.latvala@intel.com> Cc: Chris Wilson <chris@chris-wilson.co.uk> Cc: Michał Winiarski <michal.winiarski@intel.com> Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
2019-01-21lib/i915/gem_context: Help static analysis with execution flowPetri Latvala
If an igt_ioctl fails, errno is set to non-zero, and static analysis doesn't quite get it. Add an igt_assume() to help. v2: Braces on both branches of an if (Chris) Signed-off-by: Petri Latvala <petri.latvala@intel.com> Cc: Chris Wilson <chris@chris-wilson.co.uk> Cc: Michał Winiarski <michal.winiarski@intel.com> Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
2019-01-21lib: Introduce BUILD_BUG_ON_INVALID and igt_assume()Petri Latvala
BUILD_BUG_ON_INVALID() is a macro that, like the kernel counterpart, expands to an expression that generates no code. Useful for making sure an expression is valid code while producing no side effects. igt_assume() is an assert-like macro that is used to give hints to static analysis of code. If static analysis is not used (as detected by STATIC_ANALYSIS_BUILD), igt_assume() expands to a BUILD_BUG_ON_INVALID, otherwise expands to an assert(). v2: Make sure the expression in igt_assume is still parsed without static analysis. (Chris) v3: Also introduce BUILD_BUG_ON_INVALID as standalone Signed-off-by: Petri Latvala <petri.latvala@intel.com> Cc: Arkadiusz Hiler <arkadiusz.hiler@intel.com> Cc: Chris Wilson <chris@chris-wilson.co.uk> Cc: Michał Winiarski <michal.winiarski@intel.com> Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
2019-01-18tests/kms_modes_available_crc: Fix NV12 failureDhinakaran Pandiyan
The size of the UV plane is not calculated correctly - height is not tile aligned. Make use of the stride and offset values intitialized in the previous patch to calculate plane size. The next step would be to rewrite the test to make use of library functions, but for now this should fix NV12. Cc: Juha-Pekka Heikkila <juhapekka.heikkila@gmail.com> Signed-off-by: Dhinakaran Pandiyan <dhinakaran.pandiyan@intel.com> Reviewed-by: José Roberto de Souza <jose.souza@intel.com>