28 Commits

Author SHA1 Message Date
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
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
eaa1e8e127 ioct_wrappers: Add some mmap(wc) blurb dropped between authors
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2015-01-06 10:07:08 +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
Thomas Wood
f59bbf7e8f lib: fix a few documentation warnings
Signed-off-by: Thomas Wood <thomas.wood@intel.com>
2014-12-12 14:18:12 +00:00
Thomas Wood
ae3a946631 lib: fix symbol names in documentation comments
Signed-off-by: Thomas Wood <thomas.wood@intel.com>
2014-11-25 11:59:37 +00: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
Thomas Wood
519f377ddd doc: various spelling and typo fixes
Signed-off-by: Thomas Wood <thomas.wood@intel.com>
2014-09-30 17:54:02 +01: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
Thomas Wood
743dc7997a build: improve version.h generation
Move version.h generation into lib/Makefile.sources so that it can be
shared between the Autotools and Android build systems. Also make sure the
"updating version.h" message is only displayed when version.h actually
changes and remove unnecessary includes of version.h.

This also includes changes from Tvrtko Ursulin to prevent a build from
within the git repository failing when git is not available.

Signed-off-by: Thomas Wood <thomas.wood@intel.com>
Cc: Tvrtko Ursulin <tvrtko.ursulin@linux.intel.com>
2014-07-23 16:43:05 +01:00
Chris Wilson
acca724b42 Quieten valgrind
Clear all the ioctl structs to zero before use as valgrind does not our
ioctls and so complains about undefined bytes being passed to syscalls.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-07-21 16:32:42 +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
Rodrigo Vivi
82ad15fd10 Fix make distclean by fixing includes of version.h
Actually only the igt_core was breaking the make distcheck,
but let's make it consistent and let the code cleaner.

Credits-to: Reviewed-by: Ben Widawsky <ben@bwidawsk.net>
Signed-off-by: Rodrigo Vivi <rodrigo.vivi@gmail.com>
2014-06-09 11:17:20 -07:00
Daniel Vetter
e36c896a71 test: Fixup for the previous patch
Oops, failed to git add.

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2014-04-25 17:57:22 +02:00
Chris Wilson
b918a3ba15 Reset errno to 0 after success
errno is only valid after a syscall wrapper (e.g. ioctl()) reports an
error. However, we report the last errno value as a part of the
igt_assert() output and so we display spurious values such as:

Test requirement not met in function gem_require_ring, file ioctl_wrappers.c:802:
Last errno: 11, Resource temporarily unavailable
Test requirement: (!((((intel_get_drm_devid(fd)) == 0x0102 || ...

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-04-25 07:45:56 +01:00
Daniel Vetter
7bb40944e2 lib: Use @include tag for include files
Occasionally useful to read documentation ...

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2014-03-23 14:45:13 +01:00
Daniel Vetter
c03c6ceb29 lib: rename intel_gpu_tools.h to intel_io.h
With the header cleanup we can now give this header a suitable name,
since it now really only contains register access and other I/O
functions and assorted definitions.

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2014-03-22 21:34:29 +01:00
Daniel Vetter
254f19ba8d lib: unnecessary header removal for drmtest.h, part 2
I've left unistd.h in it - it's not strictly required but most users
of drmtest.h want it for the open helpers, and then you kinda need to
close that file descriptor again ...

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2014-03-22 21:29:01 +01:00
Daniel Vetter
cd6d5a61b3 lib: add #include "foo.h" lines like in manpages
Should help in alleviating the header mess we have atm.

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2014-03-22 19:39:47 +01:00
Daniel Vetter
0e22f14ed6 tests|lib: remove assert.h includes
Only the igt core and non-test tools should have asserts to catch
internal errors, tests and helper libraries should all user igt_asert
instead.

Fix things up where assert instead of igt_assert was used.

One tiny step towards header sanity.

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2014-03-22 19:39:46 +01:00
Daniel Vetter
096bb851f6 lib/ioctl_wrappers: api doc fixup
Oops.

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2014-03-12 21:22:41 +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