5 Commits

Author SHA1 Message Date
Chris Wilson
e3ac13e16a tests/gem_pwrite_snooped: Fix use of GCC pragmas
Apparently GCC treats the #pragma directive as a code block and so we
returned unconditionally from memchr_inv() on the first byte fubaring
the test.

commit b04691b3e8e62bd105f0f4d8d3b9e7da187f0c90
Author: Thomas Wood <thomas.wood@intel.com>
Date:   Tue Sep 8 11:16:46 2015 +0100

    tests/gem_pwrite_snooped: disable const cast warning

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=92227
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2015-10-16 11:04:33 +01: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
b04691b3e8 tests/gem_pwrite_snooped: disable const cast warning
Disable -Wcast-qual temporarily to allow memchr_inv to return non-const
data (similar to memchr), without causing a compiler warning.

Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>
Signed-off-by: Thomas Wood <thomas.wood@intel.com>
2015-09-08 16:15:16 +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
Ville Syrjälä
a149fb238a tests/gem_pwrite_snooped: Verify set_caching vs. pwrite clflush behaviour
The test does the following
1. set_domain src GTT
2. set_caching src NONE
3. pwrite src
4. set_caching src CACHED
5. blt src->dst
6. pread dst
7. verify data matches

Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
2015-08-12 16:24:51 +03:00