summaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2016-04-20igt/gem_exec_preempt: new test for scheduler/preemptionIGTDave Gordon3-0/+465
Signed-off-by: Dave Gordon <david.s.gordon@intel.com>
2016-04-20igt/gem_exec_fence: New testTvrtko Ursulin4-0/+1521
2016-04-20igt/gem_scheduler: Add gem_scheduler testDerek Morton6-0/+863
2016-04-14igt/gem_ctx_param_basic: Updated to support scheduler priority interfaceJohn Harrison2-1/+108
The GPU scheduler has added an execution priority level to the context object. There is an IOCTL interface to allow user apps/libraries to set this priority. This patch updates the context paramter IOCTL test to include the new interface. For: VIZ-1587 Signed-off-by: John Harrison <John.C.Harrison@Intel.com>
2016-04-14lib: intel_batchbuffer - allowed contexts to be submitted for any engineGeoff Miller1-3/+0
Previously only the render ring was allowed to have user contexts, so they were silently nullified for all other engines.
2016-04-14intel-gpu-tools: fix parenthesisation in #definesDave Gordon2-3/+3
This fixes some compiler warnings. In particular, the definition of MI_NOOP_ID_MASK was *incorrect* due to lack of required parentheses. Signed-off-by: Dave Gordon <david.s.gordon@intel.com>
2016-04-14igt/gem_exec_nop: Explain the parallel execution assertionChris Wilson1-1/+3
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2016-04-14lib: Fix doc warnings for real!Daniel Vetter2-2/+2
Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
2016-04-14tests: Open any driverTomeu Vizoso6-6/+6
For those tests that now pass on drivers other than i915, call drm_open_driver_master with DRIVER_ANY. Also do so from igt_enable_connectors. Signed-off-by: Tomeu Vizoso <tomeu.vizoso@collabora.com> Reviewed-by: Daniel Stone <daniels@collabora.com> Acked-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2016-04-14kms_addfb_basic: Get intel gen from within subtestTomeu Vizoso1-13/+23
Because determining the Intel GFX generation requires a call to DRM_IOCTL_I915_GETPARAM, move the code that requires it to a subtest that can be skipped on drivers other than i915. Signed-off-by: Tomeu Vizoso <tomeu.vizoso@collabora.com> Reviewed-by: Daniel Stone <daniels@collabora.com> Acked-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2016-04-14kms_addfb_basic: Move calls to gem_set_tiling to the subtestsTomeu Vizoso1-6/+3
So they don't cause unrelated subtests to be skipped when testing drivers other than i915. Signed-off-by: Tomeu Vizoso <tomeu.vizoso@collabora.com> Reviewed-by: Daniel Stone <daniels@collabora.com> Acked-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2016-04-14kms_addfb_basic: Split tiling_tests offTomeu Vizoso1-5/+45
Move tests requiring tiled BOs to the end so they don't cause unrelated subtests to be skipped when testing drivers with only dumb buffer support. Signed-off-by: Tomeu Vizoso <tomeu.vizoso@collabora.com> Reviewed-by: Daniel Stone <daniels@collabora.com> Acked-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2016-04-14kms_addfb_basic: move tiling functionality into each subtestTomeu Vizoso1-4/+4
Because calls to gem_set_tiling will cause the subtest to be skipped on drivers other than i915, move them to each subtest that needs them so the other subtests aren't skipped as well. Signed-off-by: Tomeu Vizoso <tomeu.vizoso@collabora.com> Reviewed-by: Daniel Stone <daniels@collabora.com> Acked-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2016-04-14kms_addfb_basic: call igt_create_bo_with_dimensionsTomeu Vizoso1-8/+16
Many tests can do their work on drivers other than i915 and even with just dumb buffers, so call igt_create_bo_with_dimensions instead of gem_create which will paper out the differences and call the proper ioctls or cause the subtest to be skipped if that's not possible. Signed-off-by: Tomeu Vizoso <tomeu.vizoso@collabora.com> Reviewed-by: Daniel Stone <daniels@collabora.com> Acked-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2016-04-14lib: Add igt_create_bo_with_dimensionsTomeu Vizoso2-24/+84
igt_create_bo_with_dimensions() is intended to abstract differences between drivers in buffer object creation. The driver-specific ioctls will be called if the driver that is being tested can satisfy the needs of the calling subtest, or it will be skipped otherwise. Signed-off-by: Tomeu Vizoso <tomeu.vizoso@collabora.com> Reviewed-by: Daniel Stone <daniels@collabora.com> Acked-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2016-04-14lib: Map dumb buffersTomeu Vizoso2-2/+16
If a buffer object is dumb, call DRM_IOCTL_MODE_MAP_DUMB when mapping it. Also, don't call DRM_IOCTL_I915_GEM_SET_DOMAIN on dumb buffers. Signed-off-by: Tomeu Vizoso <tomeu.vizoso@collabora.com> Reviewed-by: Daniel Stone <daniels@collabora.com> Acked-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2016-04-14lib: Add igt_dirty_fbTomeu Vizoso2-0/+15
Just wraps drmModeDirtyFB and for now invalidates the whole FB. Signed-off-by: Tomeu Vizoso <tomeu.vizoso@collabora.com> Reviewed-by: Daniel Stone <daniels@collabora.com> Acked-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2016-04-14lib: Add helper kmstest_dumb_map_bufferTomeu Vizoso2-0/+19
Which basically just calls DRM_IOCTL_MODE_MAP_DUMB and is similar to gem_mmap__gtt(). Signed-off-by: Tomeu Vizoso <tomeu.vizoso@collabora.com> Reviewed-by: Daniel Stone <daniels@collabora.com> Acked-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2016-04-14lib: Add wrapper for DRM_IOCTL_MODE_CREATE_DUMBTomeu Vizoso4-32/+41
In order to test drivers that don't have support for proper buffer objects, add a wrapper for creating dumb buffer objects that will be called from the lib code for those subtests that don't need to care. Signed-off-by: Tomeu Vizoso <tomeu.vizoso@collabora.com> Reviewed-by: Daniel Stone <daniels@collabora.com> Acked-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2016-04-14lib: Call intel_get_drm_devid only from intel codeTomeu Vizoso1-7/+8
It only makes sense when testing the i915 driver, so don't call it otherwise. Signed-off-by: Tomeu Vizoso <tomeu.vizoso@collabora.com> Reviewed-by: Daniel Stone <daniels@collabora.com> Acked-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2016-04-14lib: Assert we are on i915 from intel_get_drm_devidTomeu Vizoso1-0/+2
I915_PARAM_CHIPSET_ID is a i915-only thing, so if a subtest ends up calling it when testing another driver, the subtest (or the library) needs to be fixed. Signed-off-by: Tomeu Vizoso <tomeu.vizoso@collabora.com> Reviewed-by: Daniel Stone <daniels@collabora.com> Acked-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2016-04-14lib: Expose is_i915_deviceTomeu Vizoso2-1/+3
Lib and test code can use this function to avoid i915-specific behavior when running on other drivers. Signed-off-by: Tomeu Vizoso <tomeu.vizoso@collabora.com> Reviewed-by: Daniel Stone <daniels@collabora.com> Acked-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2016-04-14lib: Have gem_set_tiling require intelTomeu Vizoso1-0/+2
Before calling a i915-specific IOCTL, require i915. This allows us to skip subtests that are specific to that driver, though what should eventually happen is that tests don't generally call gem_set_tiling directly but go through an abstraction layer that constructs the buffer object in a driver-specific way. Signed-off-by: Tomeu Vizoso <tomeu.vizoso@collabora.com> Reviewed-by: Daniel Stone <daniels@collabora.com> Acked-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2016-04-14lib: add igt_require_intelTomeu Vizoso2-0/+7
Add function that requires that the driver we are talking to is i915. This allows us to skip subtests that are specific to that driver. Signed-off-by: Tomeu Vizoso <tomeu.vizoso@collabora.com> Reviewed-by: Daniel Stone <daniels@collabora.com> Acked-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2016-04-14lib: Rename is_intel to has_known_intel_chipsetTomeu Vizoso1-4/+6
As it reflects more clearly what the function actually does. Suggested-by: Chris Wilson <chris@chris-wilson.co.uk> Signed-off-by: Tomeu Vizoso <tomeu.vizoso@collabora.com> Reviewed-by: Daniel Stone <daniels@collabora.com> Acked-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2016-04-14igt/gem_ctx_create: Broaden per-engine testingChris Wilson1-3/+33
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2016-04-12igt/gem_exec_create: Add a "leak" testChris Wilson1-3/+11
Don't close the objects, but just mark them as unneded. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2016-04-12igt: Add a basic test to stress allocation of batchesChris Wilson2-0/+146
Run for 20s and don't expect to crash from memory exhaustion or sillies. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2016-04-12test/gem_mocs_settings: Testing MOCS register settingsPeter Antoine4-0/+598
The MOCS registers were added in Gen9 and define the caching policy. The registers are split into two sets. The first set controls the EDRAM policy and have a set for each engine, the second set controls the L3 policy. The two sets use the same index. The RCS registers and the L3CC registers are stored in the RCS context. The test checks that the registers are correct by checking the values by directly reading them via MMIO, then again it tests them by reading them from within a batch buffer. RCS engine is tested last as it programs the registers via a batch buffer and this will invalidate the test for workloads that don't use the render ring or don't run a render batch first. v2: Reorganised the structure. Added more tests. (Chris Wilson) v3: Fixed a few bugs. (Chris Wilson) v4: More Tidy-ups. (Chris Wilson) SKL does does not have a snoop bit. (Peter Antoine) Signed-off-by: Peter Antoine <peter.antoine@intel.com>
2016-04-11igt/gem_busy: fix compaction of multiple store commandsChris Wilson1-0/+1
Missed increment of the batch offset between commands. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2016-04-11igt/gem_concurrent_blit: Tweak num_buffers to just exceed targetChris Wilson1-6/+5
Remember that we allocate and use twice as many buffers as specified (we have a num_buffers array of src and dst) and so adjust the computation such that the combined allocation matches the target. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2016-04-11lib: Tidy presentations of pread/pwrite failuresChris Wilson1-16/+35
Make the assertion failure message readable if gem_read or gem_write fail. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2016-04-10igt/gem_concurrent_blit: Purge the libdrm caches before cloningChris Wilson1-10/+29
When forking, the entire VM is cloned including the VMA backed by GEM objects from the libdrm buffer cache. This is not only slow, but can also cause the system to exceed the maximum number of VMA and premature test failure. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2016-04-10igt/gem_shrink: Fix execution object offsetChris Wilson1-4/+4
An off-by-one caused us to execute the blank object rather than the batch. References: https://bugs.freedesktop.org/show_bug.cgi?id=94801 Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2016-04-09lib: Remove defunct stop_ringsChris Wilson4-168/+0
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2016-04-09igt/kms_flip: Convert over to real hang injectionChris Wilson1-74/+15
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2016-04-09igt/kms_pipe_crc_basic: Replace stop_rings with igt_hang_ringChris Wilson1-51/+4
We can inject a real GPU hang for greater effect! Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2016-04-08tests/pm_rps: Increase timeouts to 15 secondsVille Syrjälä1-2/+2
My BSW takes ~12 seconds to go back to idle after high load, so the current 10s timeouts are too short. Bump them up to 15s. Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
2016-04-05tools/intel_reg: Add extra pipe B registers for CHVVille Syrjälä2-0/+241
CHV pipe B has some extra features (programmable sprite CSC, primary plane windowing, primary plane scaler, fancier blending). Add all the relevant registers to the "quickdump" register list. Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
2016-04-05kms_atomic: Skip rather than fail on non-atomic driversMatt Roper1-1/+1
i915 does not yet support the atomic modesetting interface by default; at the moment it must be turned on explicitly via an 'i915.nuclear_pageflip' kernel command line option. We should skip (rather than fail) this IGT test when running on kernels that don't advertise support for atomic modesetting. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=93014 Signed-off-by: Matt Roper <matthew.d.roper@intel.com> Reviewed-by: Daniel Stone <daniels@collabora.com>
2016-04-05lib: kms: move framebuffer scanout offset/size to planeLionel Landwerlin3-20/+24
This fixes potential crashes when the framebuffer is unset from a given plane. v2: s/with/within/ typo in header Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com> Cc: Maarten Lankhorst <maarten.lankhorst@linux.intel.com> Cc: Marius Vlad <marius.c.vlad@intel.com> Cc: Ville Syrjälä <ville.syrjala@linux.intel.com> Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com> Signed-off-by: Marius Vlad <marius.c.vlad@intel.com>
2016-04-05tools/intel_reg: Fix builtin register spec for gen4Ville Syrjälä1-1/+1
Actually use the builtin register spec on gen4. Makes intel_reg dump actually do something on gen4. Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com> Reviewed-by: Matthew Auld <matthew.auld@intel.com>
2016-04-04igt/gem_shrink: Reduce oom spamChris Wilson1-1/+2
Since we are deliberately going to fail the mmap() allocation, don't assert. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2016-04-04igt/gem_shrink: Fix leak in userptr, add anotherChris Wilson1-2/+38
Hitting oom from userptr because we had N threads all consuming all of memory, wasn't the intention but the bugs it found were useful! Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2016-04-03benchmarks: Include my ezbench test runnersChris Wilson10-0/+242
Just a set of scripts to integrate these benchmarks with ezbench. They need to be revised to plugin into latest version of ezbench. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2016-04-03benchmarks/gem_latency: Add a -C switch to measure impact of cmdparserChris Wilson1-9/+23
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2016-04-03lib: Avoid assertion if sig_ioctl is unsed from a child accidentallyChris Wilson1-0/+6
The timer is tied to the creator thread, i.e. it is not inheritable across fork() or clone()/pthread_create(). Using it thus causes an assertion failure in the test after the one that aborts (and so on until we perform an interruptible test correctly) - one mistake snowballs. We can stop the snowball by doing an initial check and diverting back to drmIoctl(). Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2016-04-03lib: Don't report the last errno inside the async GPU hang detectorChris Wilson1-0/+1
Since the last errno doesn't correspond with the signal, reporting it when we detect the GPU hang is confusing. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2016-04-02igt/gem_shrink: Exercise with userptr stressChris Wilson1-11/+68
Add additional mempressure in the form of userptr. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2016-04-02igt/gem_shrink: Add pread/pwrite stressChris Wilson1-2/+22
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>