summaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2017-10-10tests/kms_lease: add tests for lease ioctls [v2]HEADmasterKeith Packard3-0/+599
Validate that the leasing API creates leases that allow access to a subset of the available resources and that lease revocation works. v2: from Dave Airlie <airlied@redhat.com> * Update ioctl numbers to latest proposed values. * Fix commit message * Add tests for get_lease and list_lessees Signed-off-by: Keith Packard <keithp@keithp.com>
2017-10-10tests/kms_sequence: Add tests for new CRTC get/queue sequence ioctls [v2]Keith Packard5-1/+321
These ioctls replace drmWaitVBlank and add ns time resolution and 64-bit sequence numbers to comply with the Vulkan API specifications. The tests were derived from the existing kms_vblank tests with the 'wait' variant elided as the new API doesn't provide a mechanism for blocking in the kernel. v2: from Dave Airlie <airlied@redhat.com> * Add local definitions of new ioctls to avoid requiring latest libdrm. * Remove FIRST_PIXEL_OUT as that has been removed from the proposed kernel patches. Signed-off-by: Keith Packard <keithp@keithp.com>
2017-10-10intel_aubdump: Default to 48-bit AUBs when the gen is unknownJordan Justen1-10/+16
v2: * Use 48-bit rather than 64-bit (Ken) * Use 'addr_bits' rather than 'use_64bit' Signed-off-by: Jordan Justen <jordan.l.justen@intel.com> Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
2017-10-10syncobj: Add a test for SYNCOBJ_CREATE_SIGNALEDJason Ekstrand2-0/+15
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 Ekstrand2-0/+916
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 Ekstrand1-58/+19
Signed-off-by: Jason Ekstrand <jason@jlekstrand.net> Reviewed-by: Dave Airlie <airlied@redhat.com>
2017-10-10lib: Add some syncobj helpers (v2)Jason Ekstrand4-0/+362
[airlied: added some initial gtk-doc for the helper library.] Reviewed-by: Dave Airlie <airlied@redhat.com> Signed-off-by: Jason Ekstrand <jason@jlekstrand.net>
2017-10-09tests/kms_draw_crc: Skip tests for unsupported formatsVille Syrjälä1-3/+20
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-09lib/igt_kms: Don't assert on non-existent planeVille Syrjälä1-3/+3
Skip when a test can't find a plane by the index. Previously in commit 5426dc0a889a ("lib/kms: Skip rather than fail when a suitable plane can't be found") we added similar handling for tests trying to find a non-existent plane by type. Saves from every test with hardcoded plane numbers having to check the number of planes available. 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 Wilson1-15/+107
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 Wilson1-0/+80
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>
2017-10-05igt/gem_workarounds: Add hibernation coverageChris Wilson1-7/+9
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Reviewed-by: Mika Kuoppala <mika.kuoppala@linux.intel.com>
2017-10-05igt/gem_workarounds: Reduce manual list to combinatorial loopsChris Wilson1-26/+24
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Reviewed-by: Mika Kuoppala <mika.kuoppala@linux.intel.com>
2017-10-05igt/gem_workarounds: Also test new fd (implicit default context)Chris Wilson1-0/+25
To complete the picture also test a new fd with its implicit default context. Now we have a test for a longstanding fd, new client, new context. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Reviewed-by: Mika Kuoppala <mika.kuoppala@linux.intel.com>
2017-10-05igt/gem_workarounds: Also exercise fresh contexts not the persistent defaultChris Wilson1-8/+27
v2: Actually exercise the new context Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Cc: Mika Kuoppala <mika.kuoppala@linux.intel.com> Reviewed-by: Mika Kuoppala <mika.kuoppala@linux.intel.com>
2017-10-04igt/gem_workarounds: Read the workaround registers from the active contextChris Wilson1-66/+84
The workarounds are only valid whilst the GPU is active. To be sure we are reading the registers in the right state, issue the reads from the GPU. v2: Show ignored write-only failures as debug. v3: PAGE_ALIGN. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Cc: Mika Kuoppala <mika.kuoppala@linux.intel.com> Reviewed-by: Mika Kuoppala <mika.kuoppala@linux.intel.com>
2017-10-04Update NEWS, bump version to 1.20.Petri Latvala3-2/+45
Signed-off-by: Petri Latvala <petri.latvala@intel.com> Acked-by: Arkadiusz Hiler <arkadiusz.hiler@intel.com>
2017-10-04tests/perf: split array of formats descriptionsLionel Landwerlin1-112/+106
The I915_OA_FORMAT_C4_B8 format has different offset on Haswell & Gen8. Let's split the format lists so we don't mix them. Reported-by: Ville Syrjälä <ville.syrjala@linux.intel.com> Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com> Reviewed-by: Matthew Auld <matthew.auld@intel.com>
2017-10-04tests/perf: add support for CoffeelakeLionel Landwerlin1-0/+10
Using the same timestamp frequency as Skylake/Kabylake. Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com> Reviewed-by: Matthew Auld <matthew.auld@intel.com>
2017-10-04tests/perf: prevent power management to kick in when necessaryLionel Landwerlin1-23/+41
Some of our tests measure that the OA unit produces reports at expected time intervals (as configured through the PERF_OPEN ioctl). It turns out the power management plays a role in the decision of the OA unit to write reports to memory. Under normal circumstances we don't really mind if the unit misses one report here or there, but for our tests it makes pretty difficult to verify whether we've made a mistake in the configuration. To work around this, let's prevent power management to kick in by holding /dev/cpu_dma_latency opened for the following tests : - enable-disable - blocking - polling - buffer-fill - oa-exponents Many thanks to Chris Wilson for suggesting this! Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com> Reviewed-by: Matthew Auld <matthew.auld@intel.com>
2017-10-04tests/perf: estimate number of blocking/polling based on time spentLionel Landwerlin1-9/+33
Blocking & polling tests define an amount of time to spend in the test and then estimate the number of syscalls that should successfully return. The problem is that while running the test we might spend slightly more time than initiallly planned. This change estimates the number of syscalls based on time spent after the fact. Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com> Reviewed-by: Matthew Auld <matthew.auld@intel.com>
2017-10-04tests/perf: make buffer-fill more reliableLionel Landwerlin1-17/+103
Filling rate of the buffer must discard context switch reports as they do not depend upon the periodicity, instead they're a factor on the amount of different applications concurrently running on the system. Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com> Tested-by: Matthew Auld <matthew.auld@intel.com> Reviewed-by: Matthew Auld <matthew.auld@intel.com>
2017-10-04tests/perf: make enable-disable more reliableLionel Landwerlin1-6/+89
Estimation of the amount of reports can only refer to periodic ones, as context switch reports completely depend on what happens on the system. Also generate some load to prevent clock frequency changes to impact our measurement. Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com> Reviewed-by: Matthew Auld <matthew.auld@intel.com>
2017-10-04tests/perf: rework oa-exponent testLionel Landwerlin1-134/+599
New issues that were discovered while making the tests work on Gen8+ : - we need to measure timings between periodic reports and discard all other kind of reports - it seems periodicity of the reports can be affected outside of RC6 (frequency change), we can detect this by looking at the amount of clock cycles per timestamp deltas v2: Drop some unused variables (Matthew) Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com> Reviewed-by: Matthew Auld <matthew.auld@intel.com>
2017-10-04tests/perf: remove frequency related changesLionel Landwerlin1-132/+9
Experience shows that most of the issues we face with periodicity of the reports produced by the OA unit are related to power management, not frequency. Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com> Reviewed-by: Matthew Auld <matthew.auld@intel.com>
2017-10-04tests/perf: rc6: try to guess when rc6 is disabledLionel Landwerlin1-0/+13
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com> Reviewed-by: Matthew Auld <matthew.auld@intel.com>
2017-10-04tests/perf: update max buffer size for reading reportsLionel Landwerlin1-4/+4
Make it clear that we're using a 16Mb buffer. Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com> Reviewed-by: Matthew Auld <matthew.auld@intel.com>
2017-10-04tests/perf: add per context filtering test for gen8+Robert Bragg1-32/+742
Signed-off-by: Robert Bragg <robert@sixbynine.org> Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com> Reviewed-by: Matthew Auld <matthew.auld@intel.com>
2017-10-04tests/perf: make stream_fd a global variableLionel Landwerlin1-56/+65
When debugging unstable tests on new platforms we currently we don't cleanup everything well in between different tests. Since only a single OA stream fd can be opened at a time, having the stream_fd as a global variable helps us cleanup the state between tests. Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com> Reviewed-by: Matthew Auld <matthew.auld@intel.com>
2017-10-04lib/igt_kms: Disable crtc in legacy path when output is unsetMaarten Lankhorst1-1/+1
When the output is unset, but the fb is still valid we still have to perform a disable on the crtc. This ixes the following crash in kms_color (although previous commit does as well): (gdb) bt 0 igt_output_get_mode (output=output@entry=0x0) at igt_kms.c:2828 1 0x000055555556f0d5 in igt_primary_plane_commit_legacy(..) at igt_kms.c:2341 2 igt_plane_commit (fail_on_error=true, s=COMMIT_LEGACY, ..) at igt_kms.c:2394 3 igt_pipe_commit (fail_on_error=true, s=COMMIT_LEGACY, ..) at igt_kms.c:2435 4 do_display_commit (display=0x7fffffffe5d8, s=COMMIT_LEGACY, ..) at igt_kms.c:2667 5 0x000055555556f38e in igt_display_commit2 (display=<optimized out>, s=<optimized out>) at igt_kms.c:2777 6 0x000055555555ef84 in run_tests_for_pipe (data=.., p=PIPE_B) at kms_color.c:1053 7 0x000055555555f610 in __real_main1189 () at kms_color.c:1206 8 0x000055555555cbc7 in main (argc=<optimized out>, argv=<optimized out>) at kms_color.c:1189 Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com> Reviewed-by: Mika Kahola <mika.kahola@intel.com>
2017-10-04tests/kms_color: Unset plane fb on teardown, v2.Maarten Lankhorst1-6/+12
Valgrind is slightly unhappy when we leave the fb set: ==1804== Invalid read of size 4 ==1804== at 0x122F83: igt_plane_get_fb_id (igt_kms.c:2074) ==1804== by 0x122F83: igt_primary_plane_commit_legacy (igt_kms.c:2339) ==1804== by 0x122F83: igt_plane_commit (igt_kms.c:2394) ==1804== by 0x122F83: igt_pipe_commit (igt_kms.c:2435) ==1804== by 0x122F83: do_display_commit (igt_kms.c:2667) ==1804== by 0x12338D: igt_display_commit2 (igt_kms.c:2777) ==1804== by 0x112F83: run_tests_for_pipe (kms_color.c:1053) ==1804== by 0x11360F: __real_main1189 (kms_color.c:1206) ==1804== by 0x110BC6: main (kms_color.c:1189) ==1804== Address 0x1ffeffeb20 is on thread 1's stack ==1804== 160 bytes below stack pointer Add the missing calls to igt_plane_set_fb, and fix the crash. Changes since v1: - Fix compilation! Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com> Reviewed-by: Mika Kahola <mika.kahola@intel.com>
2017-10-04Fix compilation on some distrosAusmus, James3-0/+3
Some distros (such as Gentoo) are removing the include of sys/sysmacros.h from sys/types.h. Explicitly include sysmacros.h in files where we use the minor() and major() functions. Signed-off-by: James Ausmus <james.ausmus@intel.com> Reviewed-by: Petri Latvala <petri.latvala@intel.com>
2017-10-03lib: Fixup __gem_create() to be 64b safe.Chris Wilson2-2/+2
We want to create very large objects, larger than the 2G limit imposed by using ints. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Cc: Arkadiusz Hiler <arkadiusz.hiler@intel.com> Reviwed-by: Mika Kuoppala <mika.kuoppala@linux.intel.com>
2017-10-03meson: Disable the intel overlay on non-x86 builds.Eric Anholt1-1/+3
It's got calls to rmb/wmb that end up not linking successfully. Signed-off-by: Eric Anholt <eric@anholt.net> Reviewed-by: Petri Latvala <petri.latvala@intel.com>
2017-10-03meson: Fix build of igt_x86-using tests on non-x86 platforms.Eric Anholt2-1/+16
Just stub out the features return value, and return an empty string. Signed-off-by: Eric Anholt <eric@anholt.net> Reviewed-by: Petri Latvala <petri.latvala@intel.com>
2017-10-03Fix rlim_cur compiler warnings when building on ARM.Eric Anholt2-2/+3
Signed-off-by: Eric Anholt <eric@anholt.net> Reviewed-by: Petri Latvala <petri.latvala@intel.com>
2017-10-03lib: Report the error from __gem_create()Chris Wilson4-25/+17
We have two style of ioctl wrappers. The principle interface does error checking on behalf of the caller (to avoid having lots of repetitious code in each test), and for the few cases where the error is important for the test, we also expose a double underscore version. Fix up __gem_create() to follow this pattern and report the negative error code returned by the kernel. 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>
2017-10-03lib: Reduce dependency on glibPetri Latvala6-2/+40
In commit ebd6eb69f57b ("Make igtrc configuration common, with configurable suspend/resume delay") .igtrc handling was moved to igt_core from igt_chamelium. That made everything in IGT depend on GLIB by accident. In short, igt_core.h declared a variable of type GKeyFile*, requiring glib.h. Everything that tried to #include igt_core.h required glib.h to be available, by use of GLIB_CFLAGS. This "worked" so far because CAIRO_CFLAGS contained GLIB_CFLAGS. As the variable is only used by other stuff in lib/, stuff it in its own header file to leave igt_core.h without a dependency to glib.h. Also add a couple of missing #ifdef HAVE_GLIBs around. Reported-by: Felipe De Jesus Ruiz Garcia <felipe.de.jesus.ruiz.garcia@intel.com> Signed-off-by: Petri Latvala <petri.latvala@intel.com> Reviewed-by: Arkadiusz Hiler <arkadiusz.hiler@intel.com>
2017-10-03gem_exec_schedule: Add missing #includePetri Latvala1-0/+1
gem_exec_schedule used sigaction() without #include <signal.h> CC: Chris Wilson <chris@chris-wilson.co.uk> Signed-off-by: Petri Latvala <petri.latvala@intel.com> Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
2017-10-03kms_atomic_interruptible: Add missing #includePetri Latvala1-0/+2
kms_atomic_interruptible used signal() without #include <signal.h> CC: Maarten Lankhorst <maarten.lankhorst@linux.intel.com> Signed-off-by: Petri Latvala <petri.latvala@intel.com> Reviewed-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
2017-10-03lib/igt_kms: Commit primary plane when a modeset is forced on a pipeMaarten Lankhorst1-1/+1
In between tests, some tests can do the following sequence: (pipe C configured with FB) igt_plane_set_fb(primary (pipe C), NULL); /* Clear rotation property first */ igt_display_commit2(display, COMMIT_UNIVERSAL); /* disable pipe */ igt_display_commit2(display, COMMIT_LEGACY); This would result in PIPE_C not being properly disabled, which will cause an error on the next mode. This can be seen when running the full kms_rotation_crc testcase without --subtest, it will fail on exhaust-fences because the bad-tiling subtest wasn't able to disable pipe C correctly. Testcase: kms_rotation_crc Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com> Reviewed-by: Mika Kahola <mika.kahola@intel.com>
2017-10-03lib/igt_kms: Change output->pending_crtc_idx_mask to output->pending_pipeMaarten Lankhorst5-30/+26
igt_output_set_pipe with PIPE_ANY used to mean that we bind the output to any pipe, but this is now a deprecated alias for PIPE_NONE, and means the output will be unbound. Because of this it's better to change output->pending_crtc_idx_mask to an enum pipe, because only a single choice may be given for a pipe. Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com> Reviewed-by: Mika Kahola <mika.kahola@intel.com>
2017-10-02meson: Follow suit with the renaming of kms_pipe_colorPetri Latvala1-1/+1
CC: Maarten Lankhorst <maarten.lankhorst@linux.intel.com> Signed-off-by: Petri Latvala <petri.latvala@intel.com> Reviewed-by: Arkadiusz Hiler <arkadiusz.hiler@intel.com>
2017-10-02meson: Distribute meson build system filesPetri Latvala10-4/+43
Signed-off-by: Petri Latvala <petri.latvala@intel.com> Acked-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2017-10-02docs: Distribute audio.txt and chamelium.txtPetri Latvala1-0/+5
Signed-off-by: Petri Latvala <petri.latvala@intel.com> Acked-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2017-10-02lib: Handle intel_aub.h like the other stub filesPetri Latvala1-0/+1
Signed-off-by: Petri Latvala <petri.latvala@intel.com> Acked-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2017-10-02lib: Remove media_fill.cPetri Latvala1-16/+0
media_fill.c has been unused from around 2014 when its contents moved to intel_batchbuffer.c. Signed-off-by: Petri Latvala <petri.latvala@intel.com> Acked-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2017-10-02demos: Remove final filePetri Latvala1-12/+0
demos/Makefile.am was left behind. Nuke it. Signed-off-by: Petri Latvala <petri.latvala@intel.com> Acked-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2017-10-02benchmarks: Add ezbench.d files to distPetri Latvala3-1/+18
Signed-off-by: Petri Latvala <petri.latvala@intel.com> Acked-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2017-10-02benchmarks: Add wsim files to distPetri Latvala3-0/+34
Signed-off-by: Petri Latvala <petri.latvala@intel.com> Acked-by: Daniel Vetter <daniel.vetter@ffwll.ch>