diff options
| author | Joonas Lahtinen <joonas.lahtinen@linux.intel.com> | 2015-04-08 15:55:41 +0300 |
|---|---|---|
| committer | Thomas Wood <thomas.wood@intel.com> | 2015-04-14 17:43:05 +0100 |
| commit | 577fb75ed88d01f86dbfa593d90cb91ebfa37a2b (patch) | |
| tree | d57c45cb0d3416bdd7f6a68e3b40a6715e6b2c84 | |
| parent | 629759c2d1fea11a111ee79faf6afd08ff4c99d2 (diff) | |
tests/gem_mmap_gtt: clarify BO domain setting functions
Add suffix and complementary function for CPU domain.
v2:
- Change function signatures to be consistent with the rest
Signed-off-by: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
Signed-off-by: Thomas Wood <thomas.wood@intel.com>
| -rw-r--r-- | tests/gem_mmap_gtt.c | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/tests/gem_mmap_gtt.c b/tests/gem_mmap_gtt.c index 55c66a29..115e3981 100644 --- a/tests/gem_mmap_gtt.c +++ b/tests/gem_mmap_gtt.c @@ -43,11 +43,18 @@ static int OBJECT_SIZE = 16*1024*1024; -static void set_domain(int fd, uint32_t handle) +static void +set_domain_gtt(int fd, uint32_t handle) { gem_set_domain(fd, handle, I915_GEM_DOMAIN_GTT, I915_GEM_DOMAIN_GTT); } +static void +set_domain_cpu(int fd, uint32_t handle) +{ + gem_set_domain(fd, handle, I915_GEM_DOMAIN_CPU, I915_GEM_DOMAIN_CPU); +} + static void * mmap_bo(int fd, uint32_t handle) { @@ -245,7 +252,7 @@ test_write_gtt(int fd) /* prefault object into gtt */ dst_gtt = mmap_bo(fd, dst); - set_domain(fd, dst); + set_domain_gtt(fd, dst); memset(dst_gtt, 0, OBJECT_SIZE); munmap(dst_gtt, OBJECT_SIZE); |
