summaryrefslogtreecommitdiff
path: root/lib/ioctl_wrappers.h
AgeCommit message (Collapse)Author
2015-12-03igt/gem_stolen: Verifying extended gem_create ioctlAnkitprasad Sharma
This patch adds the testcases for verifying the new extended gem_create ioctl. By means of this extended ioctl, memory placement of the GEM object can be specified, i.e. either shmem or stolen memory. These testcases include functional tests and interface tests for testing the gem_create ioctl call for stolen memory placement v2: Testing pread/pwrite functionality for stolen backed objects, added local struct for extended gem_create and gem_get_aperture, until headers catch up (Chris) v3: Removed get_aperture related functions, extended gem_pread to compare speeds for user pages with and without page faults, unexposed local_gem_create struct, changed gem_create_stolen usage (Chris) v4: Splitting patch to remove changes from gem_pread/gem_pwrite to another patch (Ankit) v5: Fixed Rebase conflicts (Ankit) Added IGT_TEST_DESCRIPTION (Thomas Wood) v6: Added __gem_create_stolen for user to handle error, updated gem_create_stolen to align with gem_create function, corrected fill_purge test (out of bound access), added testcase to validate allocating of more than 32 bit sized buffers (Tvrtko) v7: Removed unused variables, Corrected comments & formatting (Tvrtko) Signed-off-by: Ankitprasad Sharma <ankitprasad.r.sharma@intel.com> Reviewed-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com> Signed-off-by: Thomas Wood <thomas.wood@intel.com>
2015-10-19Update CONTEXT_PARAM for GTT_SIZE reportingChris Wilson
Add the new PARAM identifier for reporting the context's GTT size. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2015-10-09Make gem_mmap__{cpu,gtt,wc}() assert on failureVille Syrjälä
Rename the current gem_mmap__{cpu,gtt,wc}() functions into __gem_mmap__{cpu,gtt,wc}(), and add back wrappers with the original name that assert that the pointer is valid. Most callers will expect a valid pointer and shouldn't have to bother with failures. To avoid changing anything (yet), sed 's/gem_mmap__/__gem_mmap__/g' over the entire codebase. Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com> Stochastically-reviwewed-by: Chris Wilson <chris@chris-wilson.co.uk>
2015-10-09s/gem_mmap/gem_mmap__gtt/Ville Syrjälä
Get rid of the gem_mmap() alias of gem_mmap__gtt(). I don't see any point in having it. Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com> Stochastically-reviwewed-by: Chris Wilson <chris@chris-wilson.co.uk>
2015-08-12tests/gem_ctx_param_basic: support NO_ZEROMAPDavid Weinehall
Signed-off-by: David Weinehall <david.weinehall@linux.intel.com> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2015-04-27igt/gem_exec_big: Check 64bit relocation valuesChris Wilson
On gen8, we should check that the full 64bit relocation value is correct, and we should be sure to poison the relocation offset between runs. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2015-04-26lib: Fix types for gem_mmap*Chris Wilson
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2015-04-26lib: Cache static queriesChris Wilson
We frequently check for device capabilities, for which we can safely assume that there is but one on a system and so cache the first query value and return it for all future queries. The benefit is to reduce dmesg debug spam which helps when either bringing up a test or trying to track down why a test fails. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2015-04-26lib: Fix types for gem_create()Chris Wilson
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2015-03-12lib: Add support for new extension to the ADDFB2 ioctl.Tvrtko Ursulin
New functionality accessesed via the __kms_addfb wrapper. Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
2015-03-12tests/kms_addfb: Y tiled testcasesTvrtko Ursulin
v2: Moved all init into fixtures. Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
2015-03-12tests/kms_addfb: Add support for fb modifiersTvrtko Ursulin
Just a few basic tests to make sure fb modifiers can be used and behave sanely when mixed with the old set_tiling API. v2: * Review feedback from Daniel Vetter: 1. Move cap detection into the subtest so skipping works. 2. Added some gtkdoc comments. 3. Two more test cases. 4. Removed unused parts for now. v3: * Removed two tests which do not make sense any more after the fb modifier rewrite. v4: * Moved gtkdoc comments into .c file. * Moved all initialization into fixtures. * Rebased for fb modifier changes. v5: * Added bad modifier subtest. Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
2015-02-17lib: small documentation fixesThomas Wood
Signed-off-by: Thomas Wood <thomas.wood@intel.com>
2015-02-13lib/ioctl: Document ctx param functionsDaniel Vetter
And move them so that they're grouped with the other context wrappers. Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
2015-02-13lib/ioctl: Add gem_context_destroy helpersDaniel Vetter
We also need a raw version for some tests. Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2015-02-13lib/ioctls: make gem_context_set/get_param infallibleDaniel Vetter
We have separate require checks already, so these failing is a bug in the test logic. Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
2015-02-13igt/ioctls: doc for gem_mmapDaniel Vetter
Just spotted while driving around. gtkdoc needs the full parameter list otherwise it doesn't recognize it as a function. So add them. Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2015-02-13lib/ioctl: gem_ prefix for igt_require_mmap_wcDaniel Vetter
We stick to the overall prefix even for magic require functions. Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2015-02-13lib/ioctl: api polish for gem_context_has_paramDaniel Vetter
Just push the igt_require down to align with the usual style. Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
2015-01-22i-g-t: check whether kernel has dual bsd ringZhipeng Gong
v2: change the number to be consistent with upstream (Zhipeng) Signed-off-by: Zhipeng Gong <zhipeng.gong@intel.com> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2015-01-07igt/gem_concurrent_blit: Inject hangs before verifying contentsChris Wilson
After setting up the copy operations, add a hanging batch. This should mean that we complete the copy and the compare then races against the GEM reset. Hopefully, this will catch driver bugs where the target object is no longer accessible after the hang. Note: hang injection is disabled until the required kernel interface is completed. But there are useful additional tests here... Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2015-01-06igt/gem_mmap_wc: Exercise mmap(wc) interfaceChris Wilson
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2014-11-04ioctl_wrappers: Pass in offset to CPU mmapsChris Wilson
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-09-08igt/gem_mmap_gtt: Check coherency between GTT and CPU mmappings with LLCChris Wilson
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-07-11lib: Extract gem_get_tiling() from a couple of tests.Damien Lespiau
Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
2014-03-22lib: unnecessary header removal for drmtest.h, part 1Daniel Vetter
Brought a few missing headers to light in ioctl_wrappers.h, too. Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2014-03-12lib/ioctl_wrappers: api docDaniel Vetter
Also some tiny polish to function interface: - @caching in gem_set_tiling should be uint32_t to match the ioctl struct. - s/size/length/ for gem_write/read. - move gem_get_num_rings to the other ring feature helpers. v2: Also demote gem_require_ring from static inline and move it, too. v3: Also move gem_handle_to_libdrm_bo. Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2014-03-11lib: extract ioctl_wrappers.cDaniel Vetter
I want to group the ioctl wrappers and related functions into their own documentation section. Apparently gtkdoc refuses to obey this wish without a corespdonding header. So appease it. Also gtkdoc seems to struggle with rebuilding a bit ... Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>