summaryrefslogtreecommitdiff
path: root/tests/gem_exec_parse.c
AgeCommit message (Collapse)Author
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-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>
2015-09-11convert drm_open_any*() calls to drm_open_driver*(DRIVER_INTEL) calls with cocciMicah Fedke
Apply the new API to all call sites within the test suite using the following semantic patch: // Semantic patch for replacing drm_open_any* with arch-specific drm_open_driver* calls @@ identifier i =~ "\bdrm_open_any\b"; @@ - i() + drm_open_driver(DRIVER_INTEL) @@ identifier i =~ "\bdrm_open_any_master\b"; @@ - i() + drm_open_driver_master(DRIVER_INTEL) @@ identifier i =~ "\bdrm_open_any_render\b"; @@ - i() + drm_open_driver_render(DRIVER_INTEL) @@ identifier i =~ "\b__drm_open_any\b"; @@ - i() + __drm_open_driver(DRIVER_INTEL) Signed-off-by: Micah Fedke <micah.fedke@collabora.co.uk> Signed-off-by: Thomas Wood <thomas.wood@intel.com>
2015-08-21lib: add a single include headerThomas Wood
Add a header that includes all the headers for the library. This allows reorganisation of the library without affecting programs using it and also simplifies the headers that need to be included to use the library. Signed-off-by: Thomas Wood <thomas.wood@intel.com>
2015-03-29igt/gem_exec_parse: Use a macro for pretty printing the test failureChris Wilson
By moving the assert up a level, we get an much improved assertion failure message (e.g. it includes the batch string that fails). Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-11-12tests/gem_exec_parse: Go OCD about C-style commentsDaniel Vetter
Cc: Brad Volkin <bradley.d.volkin@intel.com> Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
2014-11-12tests/gem_exec_parse: fix batch_len setting for cmd-crossing-pageBrad Volkin
The size of the batch buffer passed to the kernel is significantly larger than the size of the batch buffer passed to the function. A proposed optimization as part of the batch copy kernel series is to use batch_len for the copy and parse operations, which leads to a false "batch without MI_BATCH_BUFFER_END" failure for this test. To fix this, modify the test to set batch_start_offset and batch_len such that they define the range of actual commands in the batch, including a few of the surrounding nops for alignment purposes. v2: update batch_start_offset as well Signed-off-by: Brad Volkin <bradley.d.volkin@intel.com> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2014-10-21tests/gem_exec_parse: test for chained batch buffersBrad Volkin
libva makes extensive use of chained batch buffers. The batch buffer copy portion of the command parser has the potential to break chained batches, so add a simple test to make sure that doesn't happen. Signed-off-by: Brad Volkin <bradley.d.volkin@intel.com> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2014-09-05lib: Add MI_LOAD_REGISTER_IMMMika Kuoppala
Signed-off-by: Mika Kuoppala <mika.kuoppala@intel.com>
2014-07-07tests/gem_exec_parse: use gem_uses_aliasing_ppgttDaniel Vetter
Suggested by Brad Volking. Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2014-06-26gem_exec_parse: require PPGTT as wellJesse Barnes
The command parser may be present, but not active, so check for PPGTT before allowing this test to run. Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
2014-06-16igt/gem_exec_parse: Convert to igt_assert_eqChris Wilson
For better test output on failure. References: https://bugs.freedesktop.org/show_bug.cgi?id=80083 Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-04-09tests/gem_exec_parse: Test for OACONTROL trackingBrad Volkin
Signed-off-by: Brad Volkin <bradley.d.volkin@intel.com> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2014-04-03tests/gem_cmd_parse: restrict to gen7Daniel Vetter
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=76982 Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2014-03-25tests/gem_exec_parse: fixups for the recent massive refactoringDaniel Vetter
I think we might have some use for a do_ioctl_expected_errno or some such thing. But that's for later. Cc: Brad Volkin <bradley.d.volkin@intel.com> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2014-03-25tests/gem_exec_parse: Test a command crossing a page boundaryBrad Volkin
This is a speculative test in that it's not particularly relevant today, but is important if we switch the parser implementation to use kmap_atomic instead of vmap. Signed-off-by: Brad Volkin <bradley.d.volkin@intel.com> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2014-03-25tests/gem_exec_parse: Test for batches w/o MI_BATCH_BUFFER_ENDBrad Volkin
Signed-off-by: Brad Volkin <bradley.d.volkin@intel.com> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2014-03-25tests/gem_exec_parse: Add tests for bitmask checksBrad Volkin
Signed-off-by: Brad Volkin <bradley.d.volkin@intel.com> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2014-03-25tests/gem_exec_parse: Add tests for register whitelistBrad Volkin
Signed-off-by: Brad Volkin <bradley.d.volkin@intel.com> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2014-03-25tests/gem_exec_parse: Add tests for rejected commandsBrad Volkin
Signed-off-by: Brad Volkin <bradley.d.volkin@intel.com> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2014-03-25tests: Add a test for the command parserBrad Volkin
Start with a simple testcase that should pass. v2: Switch to I915_PARAM_CMD_PARSER_VERSION Signed-off-by: Brad Volkin <bradley.d.volkin@intel.com> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>