summaryrefslogtreecommitdiff
path: root/tests
AgeCommit message (Collapse)Author
2016-02-05igt/gem_workarounds: Convert to real GPU hang injectionChris Wilson
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2016-02-05igt/gem_exec_alignment: Fix off-by-one in buffer objectsChris Wilson
When reducing the buffer count to fit into the aperture whilst aligned, remember to adjust the pointer so that the batch is the last object! Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2016-02-05igt/gem_exec_alignment: Mark batch buffer as also requiring 48BChris Wilson
If we completely fill the lower 4G of address space with our alignment objects, then we also need to mark the batch as requiring high-address. Though the kernel should be reordering in this case... Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2016-02-05igt/gem_ctx_thrash: Rewrite to avoid extraneous allocationsChris Wilson
The goal of the test is to exercise what happens when we fill the Global GTT with the contexts. To that end, we only need to allocate 2/4GiB of context objects, and can forgo filling each context with buffers. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=94005 Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2016-02-04igt/gem_userptr_blits: Limit amount of mlocked surfacesChris Wilson
When testing surface eviction we don't need that many surfaces as we mlock surplus memory. Reducing the number of surfaces speeds up the test and prevents a couple of integer overflow bugs. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=94004 Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2016-02-04igt/gem_reset_stats: Convert from stop-rings to real hang injectionChris Wilson
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2016-02-04igt/gem_ctx_exec: Convert from stop-rings to a real GPU hang/resetChris Wilson
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2016-02-04tests/drv_hangman: Convert to using central list of enginesChris Wilson
Rather than encoding our own list of engines, use the common one for greater coverage. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2016-02-04igt/drv_hangman: Make the batchbuffer check more robustChris Wilson
All the external viewer expects of the GPU error capture is to extract the exact batch that triggered the hang. Everything else is internal detail to aide in post-mortem debugging of the kernel driver (i.e. subject to change) and not of the userspace portion (under control of the test). Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2016-02-04igt/drv_hangman: Inject a true hangChris Wilson
Wean drv_hangman off the atrocious stop_rings and use a real GPU hang instead. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2016-02-04igt/gem_ringfill: Add exercising the default-ring to basic testingChris Wilson
ringfill generates a few very common errors when submitting requests, and historically these have been where we have had many implementation bugs, repeated over and over again. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2016-02-04igt/gem_streaming_writes: Set bb start alignment to 64b for IronlakeChris Wilson
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2016-02-04igt/gem_busy: Refactor to use gem_require_ring()Chris Wilson
Now that gem_require_ring() does the right thing with BSD1/BSD2 we can use it to our advantage here. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2016-01-29tests/pm_rpm: find an appropriate CRTC instead of hardcoding CRTC 0Paulo Zanoni
BSW does not allow CRTC 0 to be used on every connector, so we need to write code to actually find a suitable CRTC. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=93124 Acked-by: Daniel Vetter <daniel.vetter@ffwll.ch> Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
2016-01-29tests/pm_rpm: remove POWER_DIR definitionPaulo Zanoni
Unused ever since we moved some code from pm_rpm.c to lib/. This is currently defined inside igt_aux.c. Acked-by: Daniel Vetter <daniel.vetter@ffwll.ch> Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
2016-01-29tests/igt_fb: rename igt_get_all_formats to igt_get_all_cairo_formatsPaulo Zanoni
I recently had this discussion with Daniel where I didn't want to use igt_drm_format_to_bpp() because it uses the format_desc array, and igt_fb currently assumes that all the format_desc formats have a matching valid Cairo format, so I wouldn't be able to easily add formats such as ARGB2101010. The function that has the assumption mentioned above is igt_get_all_formats: its current users call igt_get_all_formats, and then call cairo-dependent functions, such as igt_get_cairo_ctx on the returned formats. In order to document the current behavior and prevent any problems in case we start adding new formats without matching Cairo versions to format_desc, rename igt_get_all_formats to igt_get_all_cairo_formats and make it explicitly check for CAIRO_FORMAT_INVALID. Requested-by: Daniel Vetter <daniel.vetter@ffwll.ch> Acked-by: Daniel Vetter <daniel.vetter@ffwll.ch> Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
2016-01-29kms_frontbuffer_tracking: standardize the used FB sizesPaulo Zanoni
We want to make sure that both tiled and untiled buffers have the same size for the same width/height/format. This will allow better control over the failure paths exercised by our tests: when we try to flip from tiled to untiled, we'll be sure that we won't execute the error path that checks for buffer sizes. v2: Use the new igt_calc_fb_size() instead of implementing our own size calculation (Daniel). v3: We can now use igt_drm_format_to_bpp() (Daniel). Acked-by: Daniel Vetter <daniel.vetter@ffwll.ch> Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
2016-01-29kms_frontbuffer_tracking: use igt_drm_format_to_bpp()Paulo Zanoni
The only format from fb_get_bpp() not supported by igt_drm_format_to_bpp() is ARGB2101010, but we don't really use it in kms_frontbuffer_tracking, so we can do the switch. Adding ARGB2101010 to igt_fb won't be that simple since there's no equivalent Cairo format, and igt_fb users assume that all formats known by igt_fb have equivalent Cairo formats. Acked-by: Daniel Vetter <daniel.vetter@ffwll.ch> Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
2016-01-28igt/gem_cs_tlb: Increase BB start alignment to 64bytesChris Wilson
Ironlake requires 64byte alignment for its MI_BATCH_BUFFER_START. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2016-01-28igt: More MI_STORE_DWORD fixes for gen5Chris Wilson
A few other tests I have updated recently to use MI_STORE_DWORD also need the magic bit for gen4/5. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2016-01-28igt/gem_ringfill: Set MI_MEM_VIRTUAL flag for gen<6Chris Wilson
bit22 of MI_STORE_DWORD is confusing as the meaning changed between physical/virtual addressing in early gen and GTT/ppGTT in later gen. It looks like gen4 and gen5 still need the flag. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2016-01-28tests: Add gem_exec_relocChris Wilson
The first steps towards basic relocation handling. In today's edition, we ask how well does the kernel fare if we pass it relocations via mmappings of our buffer objects. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2016-01-27igt/gem_reset_stats: Convert residual calllers of gem_exec() to gem_execbuf()Chris Wilson
Missed from e3b68bb66683ad4cb4c80df904a3a21c98a2b6c2 due to rebasing fun. gem_reset_stats.c: In function 'inject_hang_ring': gem_reset_stats.c:227:19: error: implicit declaration of function 'gem_exec' [-Werror=implicit-function-declaration] gem_reset_stats.c:227:2: warning: nested extern declaration of 'gem_exec' [-Wnested-externs] Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2016-01-27igt/gem_concurrent_blit: Disable libdrm buffer cache for child inheritanceChris Wilson
It just ends up with buffer leaks all over. On the flip side, it does allow us to inherit the bufmgr directly without worry of stomping over the aliased entries (and causing double closes). Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2016-01-27igt/gem_concurrent_all: Pass buffer data downChris Wilson
In order reduce the number of parameters being passed everywhere, whilst simultaneously making more information available to the lower levels, pass the struct buffers around. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2016-01-27igt/gem_cs_prefetch: Check each ringChris Wilson
Since each engine has its own ring, each is subject to CS prefetching and has its own layout that needs probing. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2016-01-27Add I915_EXEC_DEFAULT to list of known enginesChris Wilson
I dropped this from the list of rings for some tests when refactoring to a common array. Almost all of the tests should be run over the default exec engine to ensure ABI backwards compatiblity. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2016-01-27igt/gem_sync: Use common array of ringsChris Wilson
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2016-01-27igt/gem_ringfill: Use common array of ringsChris Wilson
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2016-01-27igt/gem_cs_tlb: Use common array of ringsChris Wilson
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2016-01-27igt/gem_exec_nop: Use common array of ringsChris Wilson
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2016-01-27igt/gem_storedw_loop: Use common array of ringsChris Wilson
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2016-01-27igt: Add gem_exec_basicChris Wilson
Extremely basic check that we can dispatch an execbuf on every ring. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Acked-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2016-01-27Extract array of execution enginesChris Wilson
A few tests wish to execute on every engine, so centralise the array of known engines. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2016-01-27lib: Share common __gem_execbuf()Chris Wilson
An oft-repeated function to check EXECBUFFER2 for a particular fail condition. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2016-01-27igt/gem_ringfill: Allow listing subtests in gem_ringfillGabriel Feceoru
Moved gem_quiescent_gpu() call to the run path. Signed-off-by: Gabriel Feceoru <gabriel.feceoru@intel.com> Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
2016-01-27gem_ringfill: fix typo in test nameMaarten Lankhorst
Missing a r! Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
2016-01-27igt/gem_concurrent_blit: Tighter scoping of buffers variableChris Wilson
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2016-01-27igt/gem_concurrent_blit: Close userptr handle after importing into bufmgrChris Wilson
The bufmgr import creates a new handle from a name for the userptr - we can discard our original handle immediately. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2016-01-27igt/gem_concurrent_blit: Tidy blt-fill using gem wrappersChris Wilson
Replace the open-coded ioctls with the thin gem wrappers. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2016-01-26lib/igt_kms, tests/testdisplay: allow probing of new connector modesJesse Barnes
Fixup some fallout from the connector probing changes so testdisplay -m will pick up newly hotplugged displays correctly. Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org.
2016-01-26igt/gem_exec_alignment: Reduce GTT usage if !full-ppgttChris Wilson
If we have to share the GTT with others, we cannot rely on being able to fill it and have to factor in some slack for others. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2016-01-26igt/gem_exec_alignment: Actually check aligned locations after manyChris Wilson
As well as ensuring the kernel doesn't simply crash when asked to do lots of objects, check it actually aligns them. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2016-01-25lib/ioctl_wrappers: Add gem_has_softpinMichał Winiarski
We can move it from softpin test into lib, and since softpin support is highly unlikely to go away in-between getparam ioctl calls, let's just do a single call and store the value. v2: rebase Signed-off-by: Michał Winiarski <michal.winiarski@intel.com> Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2016-01-25lib/ioctl_wrappers: Add gem_gtt_type exposing raw HAS_ALIASING_PPGTT paramMichał Winiarski
No functional changes. While I'm here, let's also rename gem_uses_aliasing_ppgtt (since it's being used to indicate if we are using ANY kind of ppgtt) and introduce gem_uses_full_ppgtt to drop some unnecessary code from tests that were previously calling getparam directly instead of using ioctl wrapper. v2: drop gem_uses_full_48b_ppgtt since it's no longer used anywhere, s/48b/64b (Chris) v3: rebase Cc: Chris Wilson <chris@chris-wilson.co.uk> Signed-off-by: Michał Winiarski <michal.winiarski@intel.com> Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2016-01-25Promote eviction memory sizes and buffer counts to uint64_tChris Wilson
References: https://bugs.freedesktop.org/show_bug.cgi?id=93849 Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2016-01-24igt/gem_softpin: Keep last_handle around to vary hole generationChris Wilson
If we don't close the handle from the last pass, we don't free up the previous pass's vma immediately, changing the hole allocation. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2016-01-23igt/gem_softpin: Exercise snoop+uncached abuttingChris Wilson
snooped objects are not allowed to abutt uncached objects on older gen (!llc and global GTT) or else the GPU may hang if it prefetches across a page boundary into a different memory type (i.e. CS reading from snoop). The kernel should be checking the alignment rules as normal. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2016-01-23igt/gem_concurrent_blit: Switch to a shared mmap for userptrChris Wilson
If we use a MAP_SHARED mmaping for the our backing storage for userptr, then it will be inherited across the fork with the same address. ideal for continuity testing of children. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2016-01-23igt/gem_concurrent_blit: Allocate a private batch cache for the childChris Wilson
We have to avoid the COW alias for the intel_bufmgr and intel_batch cache as the child may close the object (in its local cache) leaving an alias in the parent cache pointing to a stale object. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>