Commit 40ea6f4e authored by Daniel Vetter's avatar Daniel Vetter

tests: s/cacheing/caching

Signed-off-by: Daniel Vetter's avatarDaniel Vetter <daniel.vetter@ffwll.ch>
parent 7b254f19
...@@ -380,56 +380,56 @@ skip: ...@@ -380,56 +380,56 @@ skip:
return num_rings; return num_rings;
} }
struct local_drm_i915_gem_cacheing { struct local_drm_i915_gem_caching {
uint32_t handle; uint32_t handle;
uint32_t cacheing; uint32_t caching;
}; };
#define LOCAL_DRM_I915_GEM_SET_CACHEING 0x2f #define LOCAL_DRM_I915_GEM_SET_CACHEING 0x2f
#define LOCAL_DRM_I915_GEM_GET_CACHEING 0x30 #define LOCAL_DRM_I915_GEM_GET_CACHEING 0x30
#define LOCAL_DRM_IOCTL_I915_GEM_SET_CACHEING \ #define LOCAL_DRM_IOCTL_I915_GEM_SET_CACHEING \
DRM_IOW(DRM_COMMAND_BASE + LOCAL_DRM_I915_GEM_SET_CACHEING, struct local_drm_i915_gem_cacheing) DRM_IOW(DRM_COMMAND_BASE + LOCAL_DRM_I915_GEM_SET_CACHEING, struct local_drm_i915_gem_caching)
#define LOCAL_DRM_IOCTL_I915_GEM_GET_CACHEING \ #define LOCAL_DRM_IOCTL_I915_GEM_GET_CACHEING \
DRM_IOWR(DRM_COMMAND_BASE + LOCAL_DRM_I915_GEM_GET_CACHEING, struct local_drm_i915_gem_cacheing) DRM_IOWR(DRM_COMMAND_BASE + LOCAL_DRM_I915_GEM_GET_CACHEING, struct local_drm_i915_gem_caching)
int gem_has_cacheing(int fd) int gem_has_caching(int fd)
{ {
struct local_drm_i915_gem_cacheing arg; struct local_drm_i915_gem_caching arg;
int ret; int ret;
arg.handle = gem_create(fd, 4096); arg.handle = gem_create(fd, 4096);
if (arg.handle == 0) if (arg.handle == 0)
return 0; return 0;
arg.cacheing = 0; arg.caching = 0;
ret = ioctl(fd, LOCAL_DRM_IOCTL_I915_GEM_SET_CACHEING, &arg); ret = ioctl(fd, LOCAL_DRM_IOCTL_I915_GEM_SET_CACHEING, &arg);
gem_close(fd, arg.handle); gem_close(fd, arg.handle);
return ret == 0; return ret == 0;
} }
int gem_set_cacheing(int fd, uint32_t handle, int cacheing) int gem_set_caching(int fd, uint32_t handle, int caching)
{ {
struct local_drm_i915_gem_cacheing arg; struct local_drm_i915_gem_caching arg;
int ret; int ret;
arg.handle = handle; arg.handle = handle;
arg.cacheing = cacheing; arg.caching = caching;
ret = ioctl(fd, LOCAL_DRM_IOCTL_I915_GEM_SET_CACHEING, &arg); ret = ioctl(fd, LOCAL_DRM_IOCTL_I915_GEM_SET_CACHEING, &arg);
return ret == 0 ? 0 : -errno; return ret == 0 ? 0 : -errno;
} }
int gem_get_cacheing(int fd, uint32_t handle) uint32_t gem_get_caching(int fd, uint32_t handle)
{ {
struct local_drm_i915_gem_cacheing arg; struct local_drm_i915_gem_caching arg;
int ret; int ret;
arg.handle = handle; arg.handle = handle;
arg.cacheing = 0; arg.caching = 0;
ret = ioctl(fd, LOCAL_DRM_IOCTL_I915_GEM_GET_CACHEING, &arg); ret = ioctl(fd, LOCAL_DRM_IOCTL_I915_GEM_GET_CACHEING, &arg);
assert(ret == 0); assert(ret == 0);
return arg.cacheing; return arg.caching;
} }
uint32_t gem_open(int fd, uint32_t name) uint32_t gem_open(int fd, uint32_t name)
......
...@@ -53,9 +53,9 @@ bool gem_has_bsd(int fd); ...@@ -53,9 +53,9 @@ bool gem_has_bsd(int fd);
bool gem_has_blt(int fd); bool gem_has_blt(int fd);
bool gem_has_vebox(int fd); bool gem_has_vebox(int fd);
int gem_get_num_rings(int fd); int gem_get_num_rings(int fd);
int gem_has_cacheing(int fd); int gem_has_caching(int fd);
int gem_set_cacheing(int fd, uint32_t handle, int cacheing); int gem_set_caching(int fd, uint32_t handle, int caching);
int gem_get_cacheing(int fd, uint32_t handle); uint32_t gem_get_caching(int fd, uint32_t handle);
uint32_t gem_flink(int fd, uint32_t handle); uint32_t gem_flink(int fd, uint32_t handle);
uint32_t gem_open(int fd, uint32_t name); uint32_t gem_open(int fd, uint32_t name);
void gem_close(int fd, uint32_t handle); void gem_close(int fd, uint32_t handle);
......
...@@ -9,7 +9,7 @@ gem_bad_batch ...@@ -9,7 +9,7 @@ gem_bad_batch
gem_bad_blit gem_bad_blit
gem_bad_length gem_bad_length
gem_basic gem_basic
gem_cacheing gem_caching
gem_cpu_concurrent_blit gem_cpu_concurrent_blit
gem_cpu_reloc gem_cpu_reloc
gem_cs_prefetch gem_cs_prefetch
......
...@@ -17,7 +17,7 @@ endif ...@@ -17,7 +17,7 @@ endif
TESTS_progs_M = \ TESTS_progs_M = \
gem_basic \ gem_basic \
gem_cacheing \ gem_caching \
gem_cpu_concurrent_blit \ gem_cpu_concurrent_blit \
gem_cs_tlb \ gem_cs_tlb \
gem_dummy_reloc_loop \ gem_dummy_reloc_loop \
......
...@@ -119,7 +119,7 @@ int main(int argc, char **argv) ...@@ -119,7 +119,7 @@ int main(int argc, char **argv)
fd = drm_open_any(); fd = drm_open_any();
if (!gem_has_cacheing(fd)) { if (!gem_has_caching(fd)) {
printf("no set_caching support detected\n"); printf("no set_caching support detected\n");
return 77; return 77;
} }
...@@ -138,7 +138,7 @@ int main(int argc, char **argv) ...@@ -138,7 +138,7 @@ int main(int argc, char **argv)
/* overallocate the buffers we're actually using because */ /* overallocate the buffers we're actually using because */
scratch_bo = drm_intel_bo_alloc(bufmgr, "scratch bo", BO_SIZE, 4096); scratch_bo = drm_intel_bo_alloc(bufmgr, "scratch bo", BO_SIZE, 4096);
gem_set_cacheing(fd, scratch_bo->handle, 1); gem_set_caching(fd, scratch_bo->handle, 1);
staging_bo = drm_intel_bo_alloc(bufmgr, "staging bo", BO_SIZE, 4096); staging_bo = drm_intel_bo_alloc(bufmgr, "staging bo", BO_SIZE, 4096);
......
...@@ -258,7 +258,7 @@ static void do_tests(int cache_level, const char *suffix) ...@@ -258,7 +258,7 @@ static void do_tests(int cache_level, const char *suffix)
char name[80]; char name[80];
if (cache_level != -1) { if (cache_level != -1) {
switch (gem_set_cacheing(fd, scratch_bo->handle, cache_level)) { switch (gem_set_caching(fd, scratch_bo->handle, cache_level)) {
case 0: break; case 0: break;
case -EINVAL: case -EINVAL:
case -ENOTTY: case -ENOTTY:
......
...@@ -120,7 +120,7 @@ int main(int argc, char **argv) ...@@ -120,7 +120,7 @@ int main(int argc, char **argv)
} }
for (c = cache; c->level != -1; c++) { for (c = cache; c->level != -1; c++) {
if (gem_set_cacheing(fd, dst, c->level)) if (gem_set_caching(fd, dst, c->level))
continue; continue;
for (count = 1; count <= 1<<17; count <<= 1) { for (count = 1; count <= 1<<17; count <<= 1) {
......
...@@ -131,8 +131,8 @@ static void do_test(int fd, int cache_level, ...@@ -131,8 +131,8 @@ static void do_test(int fd, int cache_level,
int loop) int loop)
{ {
if (cache_level != -1) { if (cache_level != -1) {
if (gem_set_cacheing(fd, tmp[0]->handle, cache_level) || if (gem_set_caching(fd, tmp[0]->handle, cache_level) ||
gem_set_cacheing(fd, tmp[1]->handle, cache_level)) gem_set_caching(fd, tmp[1]->handle, cache_level))
return; return;
} }
......
...@@ -127,7 +127,7 @@ int main(int argc, char **argv) ...@@ -127,7 +127,7 @@ int main(int argc, char **argv)
} }
for (c = cache; c->level != -1; c++) { for (c = cache; c->level != -1; c++) {
if (gem_set_cacheing(fd, dst, c->level)) if (gem_set_caching(fd, dst, c->level))
continue; continue;
for (count = 1; count <= 1<<17; count <<= 1) { for (count = 1; count <= 1<<17; count <<= 1) {
......
...@@ -398,8 +398,8 @@ int main(int argc, char **argv) ...@@ -398,8 +398,8 @@ int main(int argc, char **argv)
src = gem_create(fd, object_size); src = gem_create(fd, object_size);
tmp = malloc(object_size); tmp = malloc(object_size);
if (gem_set_cacheing(fd, src, 0) == 0 && if (gem_set_caching(fd, src, 0) == 0 &&
gem_set_cacheing(fd, dst, 0) == 0) { gem_set_caching(fd, dst, 0) == 0) {
if (drmtest_run_subtest("uncached-copy-correctness")) if (drmtest_run_subtest("uncached-copy-correctness"))
test_copy(fd, src, dst, tmp, object_size); test_copy(fd, src, dst, tmp, object_size);
if (drmtest_run_subtest("uncached-copy-performance")) { if (drmtest_run_subtest("uncached-copy-performance")) {
...@@ -435,8 +435,8 @@ int main(int argc, char **argv) ...@@ -435,8 +435,8 @@ int main(int argc, char **argv)
} }
} }
if (gem_set_cacheing(fd, src, 1) == 0 && if (gem_set_caching(fd, src, 1) == 0 &&
gem_set_cacheing(fd, dst, 1) == 0) { gem_set_caching(fd, dst, 1) == 0) {
if (drmtest_run_subtest("snooped-copy-correctness")) if (drmtest_run_subtest("snooped-copy-correctness"))
test_copy(fd, src, dst, tmp, object_size); test_copy(fd, src, dst, tmp, object_size);
if (drmtest_run_subtest("snooped-copy-performance")) { if (drmtest_run_subtest("snooped-copy-performance")) {
...@@ -472,8 +472,8 @@ int main(int argc, char **argv) ...@@ -472,8 +472,8 @@ int main(int argc, char **argv)
} }
} }
if (gem_set_cacheing(fd, src, 2) == 0 && if (gem_set_caching(fd, src, 2) == 0 &&
gem_set_cacheing(fd, dst, 2) == 0) { gem_set_caching(fd, dst, 2) == 0) {
if (drmtest_run_subtest("display-copy-correctness")) if (drmtest_run_subtest("display-copy-correctness"))
test_copy(fd, src, dst, tmp, object_size); test_copy(fd, src, dst, tmp, object_size);
if (drmtest_run_subtest("display-copy-performance")) { if (drmtest_run_subtest("display-copy-performance")) {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment