27 Commits

Author SHA1 Message Date
Chris Wilson
5ec54d8a21 Update CONTEXT_PARAM for GTT_SIZE reporting
Add the new PARAM identifier for reporting the context's GTT size.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2015-10-19 11:37:07 +01:00
Ville Syrjälä
b8a77dd6c8 Make gem_mmap__{cpu,gtt,wc}() assert on failure
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-09 19:16:26 +03:00
Ville Syrjälä
9792e7b580 s/gem_mmap/gem_mmap__gtt/
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-10-09 16:47:05 +03:00
David Weinehall
24617ef82a tests/gem_ctx_param_basic: support NO_ZEROMAP
Signed-off-by: David Weinehall <david.weinehall@linux.intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2015-08-12 14:42:46 +02:00
Chris Wilson
fc69bb0de5 igt/gem_exec_big: Check 64bit relocation values
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-27 21:12:20 +01:00
Chris Wilson
019ae907ff lib: Fix types for gem_mmap*
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2015-04-26 12:18:15 +01:00
Chris Wilson
fb950bc17f lib: Cache static queries
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-26 12:18:15 +01:00
Chris Wilson
236bab5cfd lib: Fix types for gem_create()
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2015-04-26 11:12:38 +01:00
Tvrtko Ursulin
c7bac3c62a lib: Add support for new extension to the ADDFB2 ioctl.
New functionality accessesed via the __kms_addfb wrapper.

Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
2015-03-12 14:24:05 +00:00
Tvrtko Ursulin
0c15e068a5 tests/kms_addfb: Y tiled testcases
v2: Moved all init into fixtures.

Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
2015-03-12 14:15:26 +00:00
Tvrtko Ursulin
0a087733d2 tests/kms_addfb: Add support for fb modifiers
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-03-12 14:14:27 +00:00
Thomas Wood
a22548fec0 lib: small documentation fixes
Signed-off-by: Thomas Wood <thomas.wood@intel.com>
2015-02-17 11:24:04 +00:00
Daniel Vetter
75c075cb26 lib/ioctl: Document ctx param functions
And move them so that they're grouped with the other context wrappers.

Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
2015-02-13 09:35:35 +01:00
Daniel Vetter
09b8211d41 lib/ioctl: Add gem_context_destroy helpers
We also need a raw version for some tests.

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2015-02-13 09:35:35 +01:00
Daniel Vetter
8d21b39251 lib/ioctls: make gem_context_set/get_param infallible
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-13 09:35:35 +01:00
Daniel Vetter
15801b4dad igt/ioctls: doc for gem_mmap
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-13 09:35:35 +01:00
Daniel Vetter
a3e34ce258 lib/ioctl: gem_ prefix for igt_require_mmap_wc
We stick to the overall prefix even for magic require functions.

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2015-02-13 09:35:35 +01:00
Daniel Vetter
c18b2d57a9 lib/ioctl: api polish for gem_context_has_param
Just push the igt_require down to align with the usual style.

Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
2015-02-13 09:35:35 +01:00
Zhipeng Gong
17937a0114 i-g-t: check whether kernel has dual bsd ring
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-22 09:27:52 +01:00
Chris Wilson
16bafdf5bf igt/gem_concurrent_blit: Inject hangs before verifying contents
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-07 17:35:14 +00:00
Chris Wilson
a464fb758e igt/gem_mmap_wc: Exercise mmap(wc) interface
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2015-01-06 09:29:45 +01:00
Chris Wilson
6fff1f8787 ioctl_wrappers: Pass in offset to CPU mmaps
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-11-04 12:08:50 +00:00
Chris Wilson
b76f1d8b03 igt/gem_mmap_gtt: Check coherency between GTT and CPU mmappings with LLC
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-09-08 10:29:16 +01:00
Damien Lespiau
7bf0f7fc58 lib: Extract gem_get_tiling() from a couple of tests.
Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
2014-07-11 15:12:23 +01:00
Daniel Vetter
e49ceb8690 lib: unnecessary header removal for drmtest.h, part 1
Brought a few missing headers to light in ioctl_wrappers.h, too.

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2014-03-22 21:07:37 +01:00
Daniel Vetter
556c49f20b lib/ioctl_wrappers: api doc
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-12 16:39:39 +01:00
Daniel Vetter
766c5bc6ae lib: extract ioctl_wrappers.c
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>
2014-03-11 22:58:07 +01:00