6 Commits

Author SHA1 Message Date
Chris Wilson
e10ba6b51c igt/drm_read: Clear O_NONBLOCK between tests
Ensure that O_NONBLOCK isn't accidentally set when we want a nonblocking
file descroptor.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2015-11-25 14:33:49 +00:00
Chris Wilson
3b1a55874d igt/drm_read: Check handling of pagefault on destination buffer
In theory, this should force i915_gem_fault() when we first use the
buffer (and not at mmap time) and so prevent a __copy_to_user_inatomic()
from writting to the buffer.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2015-11-25 11:13:25 +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
470071d4ab igt/drm_read: Require that pipe 0 is active
As we require a pipe enabled to generate vblanks, the first step is to
then to check that pipe 0 is active or else skip the test.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-12-08 07:58:13 +00:00
Chris Wilson
819e68f2ed igt/drm_read: Abuse read(drm)
Check that the more obvious userspace error conditions are handled by
the kernel, ideally without loss of data. These include nonblocking
waits, passing invalid buffers and passing buffers of the incorrect
length.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-12-05 14:34:33 +00:00