12 Commits

Author SHA1 Message Date
Chris Wilson
e3b68bb666 lib: Share common __gem_execbuf()
An oft-repeated function to check EXECBUFFER2 for a particular fail
condition.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2016-01-27 14:45:18 +00:00
Chris Wilson
e2c9a023f2 igt/gem_exec_alignment: Reduce GTT usage if !full-ppgtt
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-26 09:19:00 +00:00
Chris Wilson
49b1337881 igt/gem_exec_alignment: Actually check aligned locations after many
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-26 09:18:59 +00:00
Chris Wilson
c4bcffcd10 igt/gem_exec_alignment: Tweaks count for large alignments
We can fit a few more objects in at high alignment, so do so.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2016-01-22 16:07:23 +00:00
Chris Wilson
ad9b78f443 igt/gem_exec_alignment: Convert to subtests
Allow both parts (single, many) to be run independently.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2016-01-20 07:53:22 +00:00
Chris Wilson
28c33c6f90 igt/gem_exec_alignment: Fix off-by-one in evalation of find_last_bit()
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2016-01-19 21:13:24 +00:00
Chris Wilson
6cf9d911ab igt/gem_exec_alignment: Remember to require 48b objects!
In order to actually use the high space we need to set the can-use-48bit
flag.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2016-01-19 21:04:33 +00:00
Chris Wilson
167fb9e7b2 igt/gem_exec_alignment: Test multiple objects with alignment as well
Compute the largest alignment for the most number of objects we can create,
then trying an execbuf with them.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2016-01-19 20:48:14 +00:00
Chris Wilson
e7bdc5c916 igt/gem_exec_alignment: Test all possible pot alignments
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2016-01-19 14:03:15 +00:00
Micah Fedke
c81d293aed convert drm_open_any*() calls to drm_open_driver*(DRIVER_INTEL) calls with cocci
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-09-11 14:39:43 +01:00
Thomas Wood
804e11f40d lib: add a single include header
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-08-21 09:37:10 +01:00
Chris Wilson
0e528af623 igt: Add gem_exec_alignment
Simple test to see whether the kernel obey's the user's request
alignemnt.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2015-06-22 15:55:21 +01:00